- 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:
Wanne
2012-10-25 19:00:12 +00:00
parent 888c76e65c
commit b1596f0c63
56 changed files with 669 additions and 1213 deletions
-5
View File
@@ -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 )
{
-5
View File
@@ -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 )
{
-5
View File
@@ -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 )
{
+1 -2
View File
@@ -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
}
}
-4
View File
@@ -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
/*
-4
View File
@@ -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
/*
-4
View File
@@ -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) )
{
-4
View File
@@ -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 ) )
{
-5
View File
@@ -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 )
{
-4
View File
@@ -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.
-4
View File
@@ -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') )
{