mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +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:
+14
-18
@@ -148,12 +148,10 @@ 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,22 +597,20 @@ void NextLoopCheckForEnoughFreeHardDriveSpace()
|
||||
gubCheckForFreeSpaceOnHardDriveCount = 0;
|
||||
}
|
||||
|
||||
// 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;
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
// Called by any game loop after all known events were handled
|
||||
void HandleDefaultEvent(InputAtom *Event)
|
||||
if (Event != NULL && Event->usEvent & MouseButtonEvents)
|
||||
{
|
||||
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);
|
||||
}
|
||||
POINT MousePos;
|
||||
GetCursorPos(&MousePos);
|
||||
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
||||
MouseSystemHook(Event->usEvent, (UINT16)MousePos.x ,(UINT16)MousePos.y ,_LeftButtonDown, _RightButtonDown);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user