mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- Made the "Highspeed timer game loop (FF-MOD by tazpn)" optional, so we can decide if we like to build an executable with/without the highspeed timer
o See: builddefines.h: #define USE_HIGHSPEED_GAMELOOP_TIMER o Gamers reported on the Bears Pit, that an executable compiled WITH the highspeed timer enabled makes the game unplayable slow in mapscreen mode when doing certain actions (repair, ...). That is the reason, why I made the compilation of the highspeed timer optional. Currently it is disabled. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5355 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+31
-2
@@ -6811,6 +6811,7 @@ void InitializeWorldSize(INT16 sSectorX, INT16 sSectorY , INT8 bSectorZ)
|
||||
void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
{
|
||||
InputAtom InputEvent;
|
||||
POINT MousePos;
|
||||
INT8 bSquadNumber;
|
||||
UINT8 ubGroupId = 0;
|
||||
BOOLEAN fCtrl, fAlt;
|
||||
@@ -6822,9 +6823,37 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
fCtrl = _KeyDown( CTRL );
|
||||
fAlt = _KeyDown( ALT );
|
||||
|
||||
// while( DequeueEvent( &InputEvent ) )
|
||||
while( DequeueSpecificEvent( &InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT ) ) // doesn't work for some reason -- MM: fixed? it works better for me like this
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user