mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
- Removed the "USE_HIGHSPEED_GAMELOOP_TIMER" define. Now highspeed timer and new way of dequeuing events are always enabled when building an executable
o This makes the code more easy to maintain o Highspeed timer seems to run fine (after months of tests) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5643 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -933,11 +933,7 @@ void HandleViewerInput()
|
||||
SECTORINFO *pSector;
|
||||
InputAtom Event;
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
while( DequeueSpecificEvent(&Event, KEY_DOWN|KEY_UP) )
|
||||
#else
|
||||
while( DequeueEvent( &Event ) )
|
||||
#endif
|
||||
{
|
||||
if( !HandleTextInput( &Event ) && Event.usEvent == KEY_DOWN )
|
||||
{
|
||||
|
||||
@@ -3411,11 +3411,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Autoresolve3");
|
||||
InputAtom InputEvent;
|
||||
BOOLEAN fResetAutoResolve = FALSE;
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
while( DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT) )
|
||||
#else
|
||||
while( DequeueEvent( &InputEvent ) )
|
||||
#endif
|
||||
{
|
||||
if( InputEvent.usEvent == KEY_DOWN || InputEvent.usEvent == KEY_REPEAT )
|
||||
{
|
||||
|
||||
@@ -1311,11 +1311,7 @@ void GetUserInput()
|
||||
GetCursorPos(&MousePos);
|
||||
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
while( DequeueSpecificEvent(&Event, KEY_DOWN|KEY_UP|KEY_REPEAT) )
|
||||
#else
|
||||
while( DequeueEvent( &Event ) )
|
||||
#endif
|
||||
{
|
||||
if( !HandleTextInput( &Event ) && Event.usEvent == KEY_DOWN )
|
||||
{
|
||||
|
||||
+1
-29
@@ -6825,35 +6825,6 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
|
||||
while( DequeueEvent( &InputEvent ) )
|
||||
{
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
#else
|
||||
GetCursorPos(&MousePos);
|
||||
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
||||
|
||||
// HOOK INTO MOUSE HOOKS
|
||||
switch(InputEvent.usEvent)
|
||||
{
|
||||
case LEFT_BUTTON_DOWN:
|
||||
MouseSystemHook(LEFT_BUTTON_DOWN, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
|
||||
break;
|
||||
case LEFT_BUTTON_UP:
|
||||
MouseSystemHook(LEFT_BUTTON_UP, (INT16)MousePos.x, (INT16)MousePos.y ,_LeftButtonDown, _RightButtonDown);
|
||||
break;
|
||||
case RIGHT_BUTTON_DOWN:
|
||||
MouseSystemHook(RIGHT_BUTTON_DOWN, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
|
||||
break;
|
||||
case RIGHT_BUTTON_UP:
|
||||
MouseSystemHook(RIGHT_BUTTON_UP, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
|
||||
break;
|
||||
case RIGHT_BUTTON_REPEAT:
|
||||
MouseSystemHook(RIGHT_BUTTON_REPEAT, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
|
||||
break;
|
||||
case LEFT_BUTTON_REPEAT:
|
||||
MouseSystemHook(LEFT_BUTTON_REPEAT, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
if( InputEvent.usEvent == KEY_DOWN )
|
||||
{
|
||||
// if game is paused because of player, unpause with any key
|
||||
@@ -8293,6 +8264,7 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
}
|
||||
else
|
||||
{
|
||||
extern void HandleDefaultEvent(InputAtom *Event);
|
||||
HandleDefaultEvent(&InputEvent);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user