mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +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:
@@ -505,12 +505,7 @@ void HandleAimFacialIndexKeyBoardInput()
|
||||
InputAtom InputEvent;
|
||||
UINT32 i;
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||
#else
|
||||
while (DequeueEvent(&InputEvent) == TRUE)
|
||||
#endif
|
||||
|
||||
{//!HandleTextInput( &InputEvent ) &&
|
||||
if( InputEvent.usEvent == KEY_DOWN )
|
||||
{
|
||||
|
||||
@@ -5028,12 +5028,7 @@ void HandleAimMemberKeyBoardInput()
|
||||
{
|
||||
InputAtom InputEvent;
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||
#else
|
||||
while (DequeueEvent(&InputEvent) == TRUE)
|
||||
#endif
|
||||
|
||||
{//!HandleTextInput( &InputEvent ) &&
|
||||
if( InputEvent.usEvent == KEY_DOWN )
|
||||
{
|
||||
|
||||
@@ -1088,12 +1088,7 @@ void HandleAimSortKeyBoardInput()
|
||||
{
|
||||
InputAtom InputEvent;
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||
#else
|
||||
while (DequeueEvent(&InputEvent) == TRUE)
|
||||
#endif
|
||||
|
||||
{//!HandleTextInput( &InputEvent ) &&
|
||||
if( InputEvent.usEvent == KEY_DOWN )
|
||||
{
|
||||
|
||||
@@ -3879,6 +3879,7 @@ void HandleBobbyRGunsKeyBoardInput()
|
||||
fCtrl = _KeyDown( CTRL );
|
||||
fAlt = _KeyDown( ALT );
|
||||
|
||||
//while (DequeueSpecificEvent(&InputEvent, KEY_DOWN |KEY_REPEAT) == TRUE)
|
||||
while (DequeueEvent(&InputEvent) == TRUE)
|
||||
{
|
||||
if( InputEvent.usEvent == KEY_DOWN )
|
||||
@@ -4101,12 +4102,10 @@ void HandleBobbyRGunsKeyBoardInput()
|
||||
break;
|
||||
}
|
||||
}
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
else
|
||||
{
|
||||
extern void HandleDefaultEvent(InputAtom *Event);
|
||||
HandleDefaultEvent(&InputEvent);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -426,11 +426,7 @@ void GetPlayerKeyBoardInputForBriefingRoomHomePage( void )
|
||||
GetCursorPos(&MousePos);
|
||||
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||
#else
|
||||
while (DequeueEvent(&InputEvent) == TRUE)
|
||||
#endif
|
||||
{
|
||||
// HOOK INTO MOUSE HOOKS
|
||||
/*
|
||||
|
||||
@@ -493,11 +493,7 @@ void GetPlayerKeyBoardInputForBriefingRoomEnterHomePage( void )
|
||||
GetCursorPos(&MousePos);
|
||||
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||
#else
|
||||
while (DequeueEvent(&InputEvent) == TRUE)
|
||||
#endif
|
||||
{
|
||||
// HOOK INTO MOUSE HOOKS
|
||||
/*
|
||||
|
||||
@@ -458,11 +458,7 @@ void GetPlayerKeyBoardInputForIMPBeginScreen( void )
|
||||
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
||||
|
||||
// handle input events
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||
#else
|
||||
while( DequeueEvent(&InputEvent) )
|
||||
#endif
|
||||
{
|
||||
if( !HandleTextInput( &InputEvent ) && (InputEvent.usEvent == KEY_DOWN || InputEvent.usEvent == KEY_REPEAT) )
|
||||
{
|
||||
|
||||
@@ -266,11 +266,7 @@ void GetPlayerKeyBoardInputForIMPHomePage( void )
|
||||
GetCursorPos(&MousePos);
|
||||
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||
#else
|
||||
while (DequeueEvent(&InputEvent) == TRUE)
|
||||
#endif
|
||||
{
|
||||
if( !HandleTextInput( &InputEvent ) && (InputEvent.usEvent == KEY_DOWN || InputEvent.usEvent == KEY_REPEAT || InputEvent.usEvent == KEY_UP ) )
|
||||
{
|
||||
|
||||
@@ -1315,12 +1315,7 @@ void HandleAimKeyBoardInput()
|
||||
{
|
||||
InputAtom InputEvent;
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||
#else
|
||||
while (DequeueEvent(&InputEvent) == TRUE)
|
||||
#endif
|
||||
|
||||
{//!HandleTextInput( &InputEvent ) &&
|
||||
if( InputEvent.usEvent == KEY_DOWN )
|
||||
{
|
||||
|
||||
@@ -1257,11 +1257,7 @@ void HandleFloristOrderKeyBoardInput()
|
||||
{
|
||||
InputAtom InputEvent;
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||
#else
|
||||
while (DequeueEvent(&InputEvent) == TRUE)
|
||||
#endif
|
||||
{
|
||||
if( !HandleTextInput( &InputEvent ) && InputEvent.usEvent == KEY_DOWN )
|
||||
{
|
||||
|
||||
Binary file not shown.
@@ -6445,11 +6445,7 @@ void HandlePersonnelKeyboard( void )
|
||||
GetCursorPos(&MousePos);
|
||||
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
||||
|
||||
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
|
||||
while (DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT))
|
||||
#else
|
||||
while (DequeueEvent(&InputEvent) == TRUE)
|
||||
#endif
|
||||
{
|
||||
if ( (InputEvent.usEvent == KEY_DOWN ) && (InputEvent.usParam >= '0' ) && ( InputEvent.usParam <= '9') )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user