diff --git a/LEGO1/legogamestate.cpp b/LEGO1/legogamestate.cpp index c12a5e06..344cf1ca 100644 --- a/LEGO1/legogamestate.cpp +++ b/LEGO1/legogamestate.cpp @@ -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; + } } diff --git a/LEGO1/legogamestate.h b/LEGO1/legogamestate.h index 80437051..ef2eeb1e 100644 --- a/LEGO1/legogamestate.h +++ b/LEGO1/legogamestate.h @@ -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