mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 20:19:38 +00:00
API refactoring
This commit is contained in:
@@ -163,7 +163,7 @@ void DoGameOverStarAnimation (void)
|
|||||||
nextLoop = TickCount() + 2;
|
nextLoop = TickCount() + 2;
|
||||||
count = 0;
|
count = 0;
|
||||||
pass = 0;
|
pass = 0;
|
||||||
FlushEvents(everyEvent, 0);
|
FlushEvents();
|
||||||
|
|
||||||
if (workSrcRect.bottom - angelDest.bottom > kMaxFramesAlive * starFallSpeed)
|
if (workSrcRect.bottom - angelDest.bottom > kMaxFramesAlive * starFallSpeed)
|
||||||
starFallSpeed = (workSrcRect.bottom - angelDest.bottom + kMaxFramesAlive - 1) / kMaxFramesAlive;
|
starFallSpeed = (workSrcRect.bottom - angelDest.bottom + kMaxFramesAlive - 1) / kMaxFramesAlive;
|
||||||
@@ -465,7 +465,7 @@ void DoDiedGameOver (void)
|
|||||||
InitDiedGameOver();
|
InitDiedGameOver();
|
||||||
CopyRectMainToWork(&workSrcRect);
|
CopyRectMainToWork(&workSrcRect);
|
||||||
CopyRectMainToBack(&workSrcRect);
|
CopyRectMainToBack(&workSrcRect);
|
||||||
FlushEvents(everyEvent, 0);
|
FlushEvents();
|
||||||
|
|
||||||
nextLoop = TickCount() + 2;
|
nextLoop = TickCount() + 2;
|
||||||
while (pagesStuck < 8)
|
while (pagesStuck < 8)
|
||||||
|
|||||||
@@ -397,7 +397,7 @@ Boolean TestHighScore (void)
|
|||||||
else if (scoreTimestamp > 0xffffffff)
|
else if (scoreTimestamp > 0xffffffff)
|
||||||
scoreTimestamp = 0xffffffff;
|
scoreTimestamp = 0xffffffff;
|
||||||
|
|
||||||
FlushEvents(everyEvent, 0);
|
FlushEvents();
|
||||||
GetHighScoreName(placing + 1);
|
GetHighScoreName(placing + 1);
|
||||||
PasStringCopy(highName, thisHousePtr->highScores.names[kMaxScores - 1]);
|
PasStringCopy(highName, thisHousePtr->highScores.names[kMaxScores - 1]);
|
||||||
if (placing == 0)
|
if (placing == 0)
|
||||||
@@ -503,7 +503,7 @@ void GetHighScoreName (short place)
|
|||||||
|
|
||||||
PlayPrioritySound(kEnergizeSound, kEnergizePriority);
|
PlayPrioritySound(kEnergizeSound, kEnergizePriority);
|
||||||
BringUpDialog(&theDial, kHighNameDialogID, &substitutions);
|
BringUpDialog(&theDial, kHighNameDialogID, &substitutions);
|
||||||
FlushEvents(everyEvent, 0);
|
FlushEvents();
|
||||||
SetDialogString(theDial, kHighNameItem, highName);
|
SetDialogString(theDial, kHighNameItem, highName);
|
||||||
SelectDialogItemText(theDial, kHighNameItem, 0, 1024);
|
SelectDialogItemText(theDial, kHighNameItem, 0, 1024);
|
||||||
leaving = false;
|
leaving = false;
|
||||||
|
|||||||
@@ -468,7 +468,7 @@ Boolean QuerySaveGame (void)
|
|||||||
short hitWhat;
|
short hitWhat;
|
||||||
|
|
||||||
InitCursor();
|
InitCursor();
|
||||||
FlushEvents(everyEvent, 0);
|
FlushEvents();
|
||||||
// CenterAlert(kSaveGameAlert);
|
// CenterAlert(kSaveGameAlert);
|
||||||
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kSaveGameAlert, nullptr);
|
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kSaveGameAlert, nullptr);
|
||||||
if (hitWhat == kYesSaveGameButton)
|
if (hitWhat == kYesSaveGameButton)
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ int gpAppMain()
|
|||||||
}
|
}
|
||||||
WriteOutPrefs();
|
WriteOutPrefs();
|
||||||
RestoreColorDepth();
|
RestoreColorDepth();
|
||||||
PL_DEAD(FlushEvents(everyEvent, 0));
|
PL_DEAD(FlushEvents());
|
||||||
// theErr = LoadScrap();
|
// theErr = LoadScrap();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ void SaveGame2 (void)
|
|||||||
PortabilityLayer::MemoryManager *mm = PortabilityLayer::MemoryManager::GetInstance();
|
PortabilityLayer::MemoryManager *mm = PortabilityLayer::MemoryManager::GetInstance();
|
||||||
PortabilityLayer::FileManager *fm = PortabilityLayer::FileManager::GetInstance();
|
PortabilityLayer::FileManager *fm = PortabilityLayer::FileManager::GetInstance();
|
||||||
|
|
||||||
FlushEvents(everyEvent, 0);
|
FlushEvents();
|
||||||
|
|
||||||
thisHousePtr = *thisHouse;
|
thisHousePtr = *thisHouse;
|
||||||
|
|
||||||
|
|||||||
@@ -1270,7 +1270,7 @@ void DoSettingsMain (void)
|
|||||||
FlashSettingsButton(surface, 1);
|
FlashSettingsButton(surface, 1);
|
||||||
DoSoundPrefs();
|
DoSoundPrefs();
|
||||||
SetGraphicsPort(prefDlg->GetWindow()->GetDrawSurface());
|
SetGraphicsPort(prefDlg->GetWindow()->GetDrawSurface());
|
||||||
FlushEvents(everyEvent, 0);
|
FlushEvents();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kControlsButton:
|
case kControlsButton:
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ Boolean WaitForInputEvent (short seconds)
|
|||||||
Boolean waiting, didResume;
|
Boolean waiting, didResume;
|
||||||
|
|
||||||
timeToBail = TickCount() + 60L * (long)seconds;
|
timeToBail = TickCount() + 60L * (long)seconds;
|
||||||
FlushEvents(everyEvent, 0);
|
FlushEvents();
|
||||||
waiting = true;
|
waiting = true;
|
||||||
didResume = false;
|
didResume = false;
|
||||||
|
|
||||||
@@ -446,7 +446,7 @@ Boolean WaitForInputEvent (short seconds)
|
|||||||
|
|
||||||
Delay(1, nullptr);
|
Delay(1, nullptr);
|
||||||
}
|
}
|
||||||
FlushEvents(everyEvent, 0);
|
FlushEvents();
|
||||||
return (didResume);
|
return (didResume);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -469,7 +469,7 @@ void WaitCommandQReleased (void)
|
|||||||
|
|
||||||
Delay(1, nullptr);
|
Delay(1, nullptr);
|
||||||
}
|
}
|
||||||
FlushEvents(everyEvent, 0);
|
FlushEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------- KeyMapOffsetFromRawKey
|
//-------------------------------------------------------------- KeyMapOffsetFromRawKey
|
||||||
|
|||||||
@@ -547,7 +547,7 @@ void GetTime(DateTimeRec *dateTime)
|
|||||||
dateTime->minute = minute;
|
dateTime->minute = minute;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FlushEvents(int mask, int unknown)
|
void FlushEvents()
|
||||||
{
|
{
|
||||||
PortabilityLayer::EventQueue *queue = PortabilityLayer::EventQueue::GetInstance();
|
PortabilityLayer::EventQueue *queue = PortabilityLayer::EventQueue::GetInstance();
|
||||||
|
|
||||||
|
|||||||
@@ -204,11 +204,6 @@ typedef WindowPtr WindowRef; // wtf?
|
|||||||
|
|
||||||
struct KeyDownStates;
|
struct KeyDownStates;
|
||||||
|
|
||||||
static const int everyEvent = -1;
|
|
||||||
|
|
||||||
static const int iBeamCursor = 1;
|
|
||||||
static const int watchCursor = 4;
|
|
||||||
|
|
||||||
static const Boolean TRUE = 1;
|
static const Boolean TRUE = 1;
|
||||||
static const Boolean FALSE = 0;
|
static const Boolean FALSE = 0;
|
||||||
|
|
||||||
@@ -216,8 +211,6 @@ static const Boolean FALSE = 0;
|
|||||||
|
|
||||||
static const int nullEvent = 0;
|
static const int nullEvent = 0;
|
||||||
|
|
||||||
//void FlushEvents(int eventMask, int stopMask);
|
|
||||||
|
|
||||||
void InitCursor();
|
void InitCursor();
|
||||||
void HideCursor();
|
void HideCursor();
|
||||||
|
|
||||||
@@ -261,7 +254,7 @@ Boolean WaitMouseUp();
|
|||||||
short Random();
|
short Random();
|
||||||
void GetTime(DateTimeRec *dateTime);
|
void GetTime(DateTimeRec *dateTime);
|
||||||
|
|
||||||
void FlushEvents(int mask, int unknown);
|
void FlushEvents();
|
||||||
|
|
||||||
Handle NewHandle(Size size);
|
Handle NewHandle(Size size);
|
||||||
long GetHandleSize(Handle handle);
|
long GetHandleSize(Handle handle);
|
||||||
|
|||||||
Reference in New Issue
Block a user