SetSavePath 100% match

This commit is contained in:
Misha 2023-07-03 18:17:52 +03:00
parent d64a04705c
commit 60ff012dfb
2 changed files with 18 additions and 2 deletions

View File

@ -1,4 +1,5 @@
#include "legogamestate.h"
#include "legoomni.h"
// OFFSET: LEGO1 0x10039550
LegoGameState::LegoGameState()
@ -39,7 +40,19 @@ void LegoGameState::SerializeScoreHistory(MxS16 p)
}
// OFFSET: LEGO1 0x10039f00
void LegoGameState::SetSavePath(char *p)
void LegoGameState::SetSavePath(char *p_SavePath)
{
// TODO
if (m_SavePath != NULL)
{
delete[] m_SavePath;
}
if (p_SavePath)
{
m_SavePath = new char[strlen(p_SavePath) + 1];
strcpy(m_SavePath, p_SavePath);
}
else
{
m_SavePath = NULL;
}
}

View File

@ -13,6 +13,9 @@ class LegoGameState
__declspec(dllexport) void SerializePlayersInfo(MxS16 p);
__declspec(dllexport) void SerializeScoreHistory(MxS16 p);
__declspec(dllexport) void SetSavePath(char *p);
private:
char *m_SavePath;
};
#endif // LEGOGAMESTATE_H