More stuff, fix saved games

This commit is contained in:
elasota
2020-01-05 02:33:03 -05:00
parent a4b8db1065
commit aca18df74b
58 changed files with 1075 additions and 454 deletions

View File

@@ -20,6 +20,7 @@
#include "RectUtils.h"
#include "ResourceManager.h"
#include <assert.h>
#define kGoToDialogID 1043
@@ -69,6 +70,11 @@ Boolean CreateNewHouse (void)
if (!fm->PromptSaveFile(theSpec.m_dir, savePath, savePathLength, sizeof(theSpec.m_name), PSTR("My House")))
return false;
assert(savePathLength < sizeof(theSpec.m_name) - 1);
theSpec.m_name[0] = static_cast<uint8_t>(savePathLength);
memcpy(theSpec.m_name + 1, savePath, savePathLength);
if (fm->FileExists(theSpec.m_dir, theSpec.m_name))
{
if (!fm->DeleteFile(theSpec.m_dir, theSpec.m_name))