X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_in.c;h=3c6a2465c94912b26444bed3cba9a18cbf91c68a;hb=301b6cec901de3e3f4c27f85c672c0600a90a528;hp=0745278085c103014153d35b4b1b83c2dea355f6;hpb=a565be31ce92d6168ae6983042da75b0b683e52b;p=16.git diff --git a/src/lib/16_in.c b/src/lib/16_in.c index 07452780..3c6a2465 100755 --- a/src/lib/16_in.c +++ b/src/lib/16_in.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2019 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2022 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -377,9 +377,9 @@ done: void INL_GetJoyDelta(word joy,int *dx,int *dy/*,boolean adaptive*/, global_game_variables_t *gvar) { word x,y; -//00 word TimeCount = *clockw; +//00++++ word TimeCount = *clockw; JoystickDef *def; -//00static word lasttime; +//00++++static word lasttime; IN_GetJoyAbs(joy,&x,&y); def = gvar->in.JoyDefs + joy; @@ -440,7 +440,7 @@ void INL_GetJoyDelta(word joy,int *dx,int *dy/*,boolean adaptive*/, global_game_ // *dy *= time; // } // } -//00 lasttime = TimeCount; +//00++++ lasttime = TimeCount; } /////////////////////////////////////////////////////////////////////////// @@ -470,15 +470,15 @@ register word result; word IN_GetJoyButtonsDB(word joy) { -//00 word TimeCount = *clockw; -//00 word lasttime; +//00++++ word TimeCount = *clockw; +//00++++ word lasttime; word result1,result2; do { result1 = INL_GetJoyButtons(joy); -//00 lasttime = TimeCount; -//00 while(TimeCount == lasttime) +//00++++ lasttime = TimeCount; +//00++++ while(TimeCount == lasttime) //; result2 = INL_GetJoyButtons(joy); } while(result1 != result2); @@ -1298,9 +1298,9 @@ byte IN_MouseButtons (global_game_variables_t *gvar) =================== */ -byte IN_JoyButtons (void) +word IN_JoyButtons (void) { - byte joybits; + word joybits; joybits = inportb(0x201); // Get all the joystick buttons joybits >>= 4; // only the high bits are useful