mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 12:09:36 +00:00
File system refactoring
This commit is contained in:
@@ -19,7 +19,7 @@ void SavedGameMismatchError (StringPtr);
|
||||
|
||||
gameType smallGame;
|
||||
|
||||
extern FSSpecPtr theHousesSpecs;
|
||||
extern VFileSpec *theHousesSpecs;
|
||||
extern short numStarsRemaining, thisHouseIndex;
|
||||
extern Boolean twoPlayerGame;
|
||||
|
||||
@@ -36,7 +36,7 @@ void SaveGame2 (void)
|
||||
FSSpec tempSpec;
|
||||
Str255 gameNameStr;
|
||||
Size byteCount;
|
||||
OSErr theErr;
|
||||
PLError_t theErr;
|
||||
houseType *thisHousePtr;
|
||||
roomType *srcRoom;
|
||||
savedRoom *destRoom;
|
||||
@@ -58,7 +58,7 @@ void SaveGame2 (void)
|
||||
savedGame = (gamePtr)NewPtr(byteCount);
|
||||
if (savedGame == nil)
|
||||
{
|
||||
YellowAlert(kYellowFailedSaveGame, MemError());
|
||||
YellowAlert(kYellowFailedSaveGame, PLErrors::kOutOfMemory);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ return false; // TEMP fix this iwth NavServices
|
||||
savedRoom *srcRoom;
|
||||
gamePtr savedGame;
|
||||
long byteCount;
|
||||
OSErr theErr;
|
||||
PLError_t theErr;
|
||||
short r, i, gameRefNum;
|
||||
char wasState;
|
||||
|
||||
@@ -201,7 +201,7 @@ return false; // TEMP fix this iwth NavServices
|
||||
savedGame = (gamePtr)NewPtr(byteCount);
|
||||
if (savedGame == nil)
|
||||
{
|
||||
YellowAlert(kYellowFailedSaveGame, MemError());
|
||||
YellowAlert(kYellowFailedSaveGame, PLErrors::kOutOfMemory);
|
||||
theErr = FSClose(gameRefNum);
|
||||
return(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user