[lego] Implement LegoGameState::SetSavepath (#76)

* SetSavePath 100% match

* fix naming convention
This commit is contained in:
MishaProductions 2023-07-03 20:25:37 +03:00 committed by GitHub
parent e0e338ee44
commit fb56735fbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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