#include "defines.h"
#include "aigs.h"

void gettext(int sx,int sy,int ex,int ey,unchar *work)
{
unint c,wx,wy;
	c=curmode(0); /* カーソルＯＦＦ */
	
	wx=ex-sx+1;
	*((short *)work)=wx;
	wy=ey-sy+1;
	*((short *)(work+sizeof(short)))=wy;
	
	_tgsub(textadrs0(sx,sy),work+sizeof(short)*2,wx,wy);
	
	curmode(c); /* カーソルＯＮ */
}
