|
|
| version 1.6, 2003/12/08 00:55:32 | version 1.7, 2004/01/13 05:30:58 |
|---|---|
| Line 41 static void calc_mousexy(void) { | Line 41 static void calc_mousexy(void) { |
| diff /= 1000; | diff /= 1000; |
| dx = mouseif.sx; | dx = mouseif.sx; |
| if (dx > 0) { | if (dx > 0) { |
| dx = dx * diff / pc.frame1000; | dx = dx * diff / mouseif.moveclock; |
| if (dx > mouseif.rx) { | if (dx > mouseif.rx) { |
| dx = mouseif.rx; | dx = mouseif.rx; |
| } | } |
| } | } |
| else if (dx < 0) { | else if (dx < 0) { |
| dx *= -1; | dx *= -1; |
| dx = dx * diff / pc.frame1000; | dx = dx * diff / mouseif.moveclock; |
| dx *= -1; | dx *= -1; |
| if (dx < mouseif.rx) { | if (dx < mouseif.rx) { |
| dx = mouseif.rx; | dx = mouseif.rx; |
| Line 59 static void calc_mousexy(void) { | Line 59 static void calc_mousexy(void) { |
| dy = mouseif.sy; | dy = mouseif.sy; |
| if (dy > 0) { | if (dy > 0) { |
| dy = dy * diff / pc.frame1000; | dy = dy * diff / mouseif.moveclock; |
| if (dy > mouseif.ry) { | if (dy > mouseif.ry) { |
| dy = mouseif.ry; | dy = mouseif.ry; |
| } | } |
| } | } |
| else if (dy < 0) { | else if (dy < 0) { |
| dy *= -1; | dy *= -1; |
| dy = dy * diff / pc.frame1000; | dy = dy * diff / mouseif.moveclock; |
| dy *= -1; | dy *= -1; |
| if (dy < mouseif.ry) { | if (dy < mouseif.ry) { |
| dy = mouseif.ry; | dy = mouseif.ry; |
| Line 83 void mouseint(NEVENTITEM item) { | Line 83 void mouseint(NEVENTITEM item) { |
| if (item->flag & NEVENT_SETEVENT) { | if (item->flag & NEVENT_SETEVENT) { |
| if (!(mouseif.portc & 0x10)) { | if (!(mouseif.portc & 0x10)) { |
| pic_setirq(0x0d); | pic_setirq(0x0d); |
| nevent_set(NEVENT_MOUSE, pc.mouseclock << mouseif.timing, | nevent_set(NEVENT_MOUSE, mouseif.intrclock << mouseif.timing, |
| mouseint, NEVENT_RELATIVE); | mouseint, NEVENT_RELATIVE); |
| } | } |
| } | } |
| Line 113 static void setportc(REG8 value) { | Line 113 static void setportc(REG8 value) { |
| if ((value ^ mouseif.portc) & 0x10) { | if ((value ^ mouseif.portc) & 0x10) { |
| if (!(value & 0x10)) { | if (!(value & 0x10)) { |
| if (!nevent_iswork(NEVENT_MOUSE)) { | if (!nevent_iswork(NEVENT_MOUSE)) { |
| nevent_set(NEVENT_MOUSE, pc.mouseclock << mouseif.timing, | nevent_set(NEVENT_MOUSE, mouseif.intrclock << mouseif.timing, |
| mouseint, NEVENT_ABSOLUTE); | mouseint, NEVENT_ABSOLUTE); |
| } | } |
| } | } |
| Line 226 void mouseif_reset(void) { | Line 226 void mouseif_reset(void) { |
| ZeroMemory(&mouseif, sizeof(mouseif)); | ZeroMemory(&mouseif, sizeof(mouseif)); |
| mouseif.mode = 0x93; | mouseif.mode = 0x93; |
| mouseif.portc = 0x10; // ver0.28 | mouseif.portc = 0x10; |
| mouseif.intrclock = pccore.realclock / 120; | |
| mouseif.moveclock = pccore.realclock / 56400; | |
| } | } |
| void mouseif_bind(void) { | void mouseif_bind(void) { |