API refactoring

This commit is contained in:
elasota
2020-06-01 00:33:50 -04:00
parent a4abb0d95f
commit 6fe0f2d964
9 changed files with 13 additions and 20 deletions

View File

@@ -163,7 +163,7 @@ void DoGameOverStarAnimation (void)
nextLoop = TickCount() + 2;
count = 0;
pass = 0;
FlushEvents(everyEvent, 0);
FlushEvents();
if (workSrcRect.bottom - angelDest.bottom > kMaxFramesAlive * starFallSpeed)
starFallSpeed = (workSrcRect.bottom - angelDest.bottom + kMaxFramesAlive - 1) / kMaxFramesAlive;
@@ -465,7 +465,7 @@ void DoDiedGameOver (void)
InitDiedGameOver();
CopyRectMainToWork(&workSrcRect);
CopyRectMainToBack(&workSrcRect);
FlushEvents(everyEvent, 0);
FlushEvents();
nextLoop = TickCount() + 2;
while (pagesStuck < 8)

View File

@@ -397,7 +397,7 @@ Boolean TestHighScore (void)
else if (scoreTimestamp > 0xffffffff)
scoreTimestamp = 0xffffffff;
FlushEvents(everyEvent, 0);
FlushEvents();
GetHighScoreName(placing + 1);
PasStringCopy(highName, thisHousePtr->highScores.names[kMaxScores - 1]);
if (placing == 0)
@@ -503,7 +503,7 @@ void GetHighScoreName (short place)
PlayPrioritySound(kEnergizeSound, kEnergizePriority);
BringUpDialog(&theDial, kHighNameDialogID, &substitutions);
FlushEvents(everyEvent, 0);
FlushEvents();
SetDialogString(theDial, kHighNameItem, highName);
SelectDialogItemText(theDial, kHighNameItem, 0, 1024);
leaving = false;

View File

@@ -468,7 +468,7 @@ Boolean QuerySaveGame (void)
short hitWhat;
InitCursor();
FlushEvents(everyEvent, 0);
FlushEvents();
// CenterAlert(kSaveGameAlert);
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kSaveGameAlert, nullptr);
if (hitWhat == kYesSaveGameButton)

View File

@@ -396,7 +396,7 @@ int gpAppMain()
}
WriteOutPrefs();
RestoreColorDepth();
PL_DEAD(FlushEvents(everyEvent, 0));
PL_DEAD(FlushEvents());
// theErr = LoadScrap();
return 0;

View File

@@ -54,7 +54,7 @@ void SaveGame2 (void)
PortabilityLayer::MemoryManager *mm = PortabilityLayer::MemoryManager::GetInstance();
PortabilityLayer::FileManager *fm = PortabilityLayer::FileManager::GetInstance();
FlushEvents(everyEvent, 0);
FlushEvents();
thisHousePtr = *thisHouse;

View File

@@ -1270,7 +1270,7 @@ void DoSettingsMain (void)
FlashSettingsButton(surface, 1);
DoSoundPrefs();
SetGraphicsPort(prefDlg->GetWindow()->GetDrawSurface());
FlushEvents(everyEvent, 0);
FlushEvents();
break;
case kControlsButton:

View File

@@ -424,7 +424,7 @@ Boolean WaitForInputEvent (short seconds)
Boolean waiting, didResume;
timeToBail = TickCount() + 60L * (long)seconds;
FlushEvents(everyEvent, 0);
FlushEvents();
waiting = true;
didResume = false;
@@ -446,7 +446,7 @@ Boolean WaitForInputEvent (short seconds)
Delay(1, nullptr);
}
FlushEvents(everyEvent, 0);
FlushEvents();
return (didResume);
}
@@ -469,7 +469,7 @@ void WaitCommandQReleased (void)
Delay(1, nullptr);
}
FlushEvents(everyEvent, 0);
FlushEvents();
}
//-------------------------------------------------------------- KeyMapOffsetFromRawKey