gRestartPointName -> gSaveGame.mRestartPointName

This commit is contained in:
krystalgamer 2024-09-28 18:58:13 +02:00
parent f21363246e
commit ceb18d4869
5 changed files with 10 additions and 8 deletions

View File

@ -8,7 +8,8 @@
CMenu* pYesNoMenu;
EXPORT i32 gFrontGauge;
char gRestartPointName[50];
SSaveGame gSaveGame;
// @FIXME add content
SLevel Levels[FRONT_NUM_LEVELS];
@ -186,7 +187,7 @@ void Front_SaveGameState(void)
v4.vz = 0;
char *pName = &reinterpret_cast<char*>(Trig_GetPosition(&v4, RestartNode))[6];
char *pDestBuf = gRestartPointName;
char *pDestBuf = &gSaveGame.mRestartPointName[0];
i32 i = 0;
while (*pName)

View File

@ -6,8 +6,9 @@
#include "export.h"
#include "main.h"
#include "pshell.h"
#include "shell.h"
EXPORT extern char gRestartPointName[50];
EXPORT extern SSaveGame gSaveGame;
struct SLevel
{
@ -112,9 +113,6 @@ public:
void validate_SEntry(void);
void validate_CMenu(void);
// @FIXME
struct SSaveGame;
EXPORT void Front_GaugeOff(void);
EXPORT void Front_ClearScreen(void);
EXPORT void Front_Display(void);

View File

@ -237,7 +237,7 @@ void Init_Cleanup(i32 a1)
Spool_ClearAllPSXs();
Trig_DeleteTrigFile();
gRestartPointName[0] = 0;
gSaveGame.mRestartPointName[0] = 0;
Reloc_UnloadAll();
M3dZone_Init();
}

View File

@ -1500,6 +1500,8 @@ void validate_SSaveGame(void)
VALIDATE(SSaveGame, mChecksum, 0x0);
VALIDATE(SSaveGame, field_4, 0x4);
VALIDATE(SSaveGame, mRestartPointName, 0xD);
VALIDATE(SSaveGame, field_3F, 0x3F);
VALIDATE(SSaveGame, mDifficulty, 0x54);

View File

@ -15,7 +15,8 @@ struct SSaveGame
// @FIXME: figure out proper size
char field_4[1];
u8 padAfter4[0x3F-0x4-1];
u8 padAfter4[0xD-0x4-1];
char mRestartPointName[50];
// @FIXME: figure proper size
char field_3F[1];