|
|
| version 1.1, 2003/10/16 17:57:55 | version 1.2, 2003/10/18 00:35:35 |
|---|---|
| Line 32 static void calc_mousexy(void) { | Line 32 static void calc_mousexy(void) { |
| clock = nevent.clock + nevent.baseclock - nevent.remainclock; | clock = nevent.clock + nevent.baseclock - nevent.remainclock; |
| diff = clock - mouseif.lastc; | diff = clock - mouseif.lastc; |
| if (diff >= 2000) { | if (diff >= 2000) { |
| short dx, dy; | SINT16 dx; |
| SINT16 dy; | |
| mouseif.rapid ^= 0xa0; | mouseif.rapid ^= 0xa0; |
| diff /= 1000; | diff /= 1000; |
| dx = (short)((long)mouseif.sx * diff / (long)pc.frame1000); | dx = (SINT16)(mouseif.sx * diff / pc.frame1000); |
| if (dx >= 0) { // ˵ | if (dx >= 0) { // ˵ |
| if (dx > mouseif.rx) { | if (dx > mouseif.rx) { |
| dx = mouseif.rx; | dx = mouseif.rx; |
| Line 48 static void calc_mousexy(void) { | Line 49 static void calc_mousexy(void) { |
| } | } |
| mouseif.x += dx; | mouseif.x += dx; |
| mouseif.rx -= dx; | mouseif.rx -= dx; |
| dy = (short)((long)mouseif.sy * diff / (long)pc.frame1000); | dy = (SINT16)(mouseif.sy * diff / pc.frame1000); |
| if (dy >= 0) { // ˵ | if (dy >= 0) { // ˵ |
| if (dy > mouseif.ry) { | if (dy > mouseif.ry) { |
| dy = mouseif.ry; | dy = mouseif.ry; |