X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_in.c;h=72dcadf54b6bcb5f74e5f214bd01bf2cf0b87ec1;hb=24760854cf1668b8b0eba2bfaf63ab083da14ea8;hp=8c0dbc695bd54210d249c3e8850c0b54a1c298d2;hpb=c893d4ba14f47b7bbf91139cc4c701b6b80ca973;p=16.git diff --git a/src/lib/16_in.c b/src/lib/16_in.c index 8c0dbc69..72dcadf5 100755 --- a/src/lib/16_in.c +++ b/src/lib/16_in.c @@ -42,6 +42,8 @@ boolean dbg_testkeyin=0,dbg_testcontrolnoisy=0; #endif +static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */ + /* ============================================================================= @@ -166,6 +168,7 @@ static Direction DirTable[] = // Quick lookup for total direction #endif // Internal routines + /////////////////////////////////////////////////////////////////////////// // // INL_KeyService() - Handles a keyboard interrupt (key up/down) @@ -245,9 +248,13 @@ static boolean special; void Mouse(int x) { - union REGS CPURegs; - x = CPURegs.x.ax; - int86(MouseInt,&CPURegs,&CPURegs); + //union REGS CPURegs; + //x = CPURegs.x.ax; + __asm { + mov ax,x + int MouseInt + } + //int86(MouseInt,&CPURegs,&CPURegs); } /////////////////////////////////////////////////////////////////////////// @@ -301,8 +308,7 @@ IN_GetJoyAbs(word joy,word *xp,word *yp) yb = 1 << ys; // Read the absolute joystick values - __asm - { + __asm { pushf // Save some registers push si push di @@ -322,8 +328,13 @@ IN_GetJoyAbs(word joy,word *xp,word *yp) push bp // Don't mess up stack frame mov bp,MaxJoyValue - +#ifdef __BORLANDC__ + } +#endif loo: +#ifdef __BORLANDC__ + __asm { +#endif in al,dx // Get bits indicating whether all are finished dec bp // Check bounding register @@ -340,8 +351,13 @@ loo: add cl,bl jnz loo // If both bits were 0, drop out - +#ifdef __BORLANDC__ + } +#endif done: +#ifdef __BORLANDC__ + __asm { +#endif pop bp mov cl,[xs] // Get the number of bits to shift @@ -639,9 +655,9 @@ IN_Startup() checkjoys = true; checkmouse = true; - for (i = 1;i < __argc;i++) + for (i = 1;i < _argc;i++) { - switch (US_CheckParm(__argv[i],ParmStringsIN)) + switch (US_CheckParm(_argv[i],ParmStringsIN)) { case 0: checkjoys = false; @@ -735,7 +751,7 @@ IN_SetKeyHook(void (*hook)()) void IN_ClearKeysDown() { - int i; + //int i; inpu.LastScan = sc_None; inpu.LastASCII = key_None; @@ -805,7 +821,9 @@ void near IN_ReadControl(int pn,player_t *player) { boolean realdelta; +#if DEMO0 byte dbyte; +#endif word buttons; int dx,dy; Motion mx,my;