home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-06-14 | 930 b | 32 lines | [TEXT/R*ch] |
- // (C) 1992 Stuart Cheshire <cheshire@cs.stanford.edu>
- // The user moves the mouse pointer with the mouse.
- // A program moving the mouse pointer is stricly against Apple guidelines,
- // and is guaranteed to annoy your users in 99% of cases.
- //
- // However, Bolo moves the mouse pointer when the map scrolls, so that the
- // building cursor stays in the same place relative to the map, and amazingly,
- // no one has flamed me for it. Not even anyone at Apple.
- //
- // So, it can be done, and here is how:
-
- #include "StuTypes.h"
-
- Point MTemp : 0x828;
- Point RawMouse : 0x82C;
- Point Mouse : 0x830;
- char CrsrNew : 0x8CE;
- char CrsrCouple : 0x8CF;
-
- export void offset_mouse_location(short xoff, short yoff)
- {
- short statusregister = Disableinterrupts();
- Mouse.h += xoff;
- Mouse.v += yoff;
- MTemp.h += xoff;
- MTemp.v += yoff;
- RawMouse.h += xoff;
- RawMouse.v += yoff;
- CrsrNew = CrsrCouple;
- RestoreInterrupts(statusregister);
- }
-