home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_300
/
328_02
/
wmousemv.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-03-17
|
757b
|
44 lines
/* wmousemv.c = routine to move mouse to a specified position
*/
#include "wsys.h"
void wmouse_move ( int x, int y )
{
int xabs, yabs;
PSEUDOREGS
#ifdef TEXTONLY
/* TEXT MODE - translate characters into mickeys.
*/
xabs = 8* ( x + w0-> winleft );
yabs = 8* ( y + w0-> wintop );
#else /* TEXTONLY */
if ( wmode == 'T' )
{
xabs = 8* ( x + w0-> winleft );
yabs = 8* ( y + w0-> wintop );
}
else
{
/* graphics mode translate 'characters' into pixels, 1 pixel=1 mickey
*/
xabs = wpxchar * (x + w0-> winleft);
yabs = wpxchar * (y + w0-> wintop );
}
#endif /* ! TEXTONLY */
_DX = yabs;
_CX = xabs;
_AX = 0x04;
INTERRUPT ( 0x33 );
return; /* wmouse_move */
}