- 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:
Wanne
2012-06-25 15:06:04 +00:00
parent f4d47f38e2
commit e8027d6663
55 changed files with 1277 additions and 687 deletions
+18 -15
View File
@@ -148,11 +148,12 @@ BOOLEAN InitializeGame(void)
InitButtonSystem();
InitCursors( );
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
SetFastForwardPeriod(gGameExternalOptions.iFastForwardPeriod);
SetFastForwardKey(gGameExternalOptions.iFastForwardKey);
SetNotifyFrequencyKey(gGameExternalOptions.iNotifyFrequency);
SetClockSpeedPercent(gGameExternalOptions.fClockSpeedPercent);
#endif
// Init Fonts
if ( !InitializeFonts( ) )
@@ -599,19 +600,21 @@ void NextLoopCheckForEnoughFreeHardDriveSpace()
}
// Called by any game loop after all known events were handled
void HandleDefaultEvent(InputAtom *Event)
{
const int MouseButtonEvents = LEFT_BUTTON_REPEAT|RIGHT_BUTTON_REPEAT|
LEFT_BUTTON_DOWN|LEFT_BUTTON_UP|MIDDLE_BUTTON_UP|X1_BUTTON_UP|X2_BUTTON_UP|
RIGHT_BUTTON_DOWN|RIGHT_BUTTON_UP|MIDDLE_BUTTON_DOWN|X1_BUTTON_DOWN|X2_BUTTON_DOWN|
MOUSE_WHEEL_UP|MOUSE_WHEEL_DOWN;
if (Event != NULL && Event->usEvent & MouseButtonEvents)
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
// Called by any game loop after all known events were handled
void HandleDefaultEvent(InputAtom *Event)
{
POINT MousePos;
GetCursorPos(&MousePos);
ScreenToClient(ghWindow, &MousePos); // In window coords!
MouseSystemHook(Event->usEvent, (UINT16)MousePos.x ,(UINT16)MousePos.y ,_LeftButtonDown, _RightButtonDown);
const int MouseButtonEvents = LEFT_BUTTON_REPEAT|RIGHT_BUTTON_REPEAT|
LEFT_BUTTON_DOWN|LEFT_BUTTON_UP|MIDDLE_BUTTON_UP|X1_BUTTON_UP|X2_BUTTON_UP|
RIGHT_BUTTON_DOWN|RIGHT_BUTTON_UP|MIDDLE_BUTTON_DOWN|X1_BUTTON_DOWN|X2_BUTTON_DOWN|
MOUSE_WHEEL_UP|MOUSE_WHEEL_DOWN;
if (Event != NULL && Event->usEvent & MouseButtonEvents)
{
POINT MousePos;
GetCursorPos(&MousePos);
ScreenToClient(ghWindow, &MousePos); // In window coords!
MouseSystemHook(Event->usEvent, (UINT16)MousePos.x ,(UINT16)MousePos.y ,_LeftButtonDown, _RightButtonDown);
}
}
}
#endif