mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-26 09:38:14 -05:00
[lego] Implement LegoGameState::SetSavepath (#76)
* SetSavePath 100% match * fix naming convention
This commit is contained in:
parent
e0e338ee44
commit
fb56735fbd
2 changed files with 18 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
#include "legogamestate.h"
|
#include "legogamestate.h"
|
||||||
|
#include "legoomni.h"
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x10039550
|
// OFFSET: LEGO1 0x10039550
|
||||||
LegoGameState::LegoGameState()
|
LegoGameState::LegoGameState()
|
||||||
|
@ -39,7 +40,19 @@ void LegoGameState::SerializeScoreHistory(MxS16 p)
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x10039f00
|
// 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,9 @@ class LegoGameState
|
||||||
__declspec(dllexport) void SerializePlayersInfo(MxS16 p);
|
__declspec(dllexport) void SerializePlayersInfo(MxS16 p);
|
||||||
__declspec(dllexport) void SerializeScoreHistory(MxS16 p);
|
__declspec(dllexport) void SerializeScoreHistory(MxS16 p);
|
||||||
__declspec(dllexport) void SetSavePath(char *p);
|
__declspec(dllexport) void SetSavePath(char *p);
|
||||||
|
|
||||||
|
private:
|
||||||
|
char *m_savePath;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LEGOGAMESTATE_H
|
#endif // LEGOGAMESTATE_H
|
||||||
|
|
Loading…
Reference in a new issue