diff options
Diffstat (limited to 'src/save/PCSave.cpp')
-rw-r--r-- | src/save/PCSave.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/save/PCSave.cpp b/src/save/PCSave.cpp index 0c228a6d..a33e9d90 100644 --- a/src/save/PCSave.cpp +++ b/src/save/PCSave.cpp @@ -19,7 +19,7 @@ C_PcSave PcSaveHelper; void C_PcSave::SetSaveDirectory(const char *path) { - sprintf(DefaultPCSaveFileName, "%s\\%s", path, "GTA3sf"); + sprintf(DefaultPCSaveFileName, "%s\\%s", path, "GTAVCsf"); } bool @@ -38,7 +38,7 @@ C_PcSave::DeleteSlot(int32 slot) return true; } -bool +int8 C_PcSave::SaveSlot(int32 slot) { MakeValidSaveName(slot); @@ -53,10 +53,10 @@ C_PcSave::SaveSlot(int32 slot) if (GenericSave(file)) { if (!!CFileMgr::CloseFile(file)) nErrorCode = SAVESTATUS_ERR_SAVE_CLOSE; - return true; + return 0; } - return false; + return 2; } PcSaveHelper.nErrorCode = SAVESTATUS_ERR_SAVE_CREATE; return false; @@ -93,7 +93,7 @@ void C_PcSave::PopulateSlotInfo() { for (int i = 0; i < SLOT_COUNT; i++) { - Slots[i + 1] = SLOT_EMPTY; + Slots[i] = SLOT_EMPTY; SlotFileName[i][0] = '\0'; SlotSaveDate[i][0] = '\0'; } @@ -113,19 +113,19 @@ C_PcSave::PopulateSlotInfo() if (file != 0) { CFileMgr::Read(file, (char*)&header, sizeof(header)); if (strncmp((char*)&header, TopLineEmptyFile, sizeof(TopLineEmptyFile)-1) != 0) { - Slots[i + 1] = SLOT_OK; + Slots[i] = SLOT_OK; memcpy(SlotFileName[i], &header.FileName, sizeof(header.FileName)); SlotFileName[i][24] = '\0'; } CFileMgr::CloseFile(file); } - if (Slots[i + 1] == SLOT_OK) { + if (Slots[i] == SLOT_OK) { if (CheckDataNotCorrupt(i, savename)) { #ifdef FIX_INCOMPATIBLE_SAVES if (!FixSave(i, GetSaveType(savename))) { CMessages::InsertNumberInString(TheText.Get("FEC_SLC"), i + 1, -1, -1, -1, -1, -1, SlotFileName[i]); - Slots[i + 1] = SLOT_CORRUPTED; + Slots[i] = SLOT_CORRUPTED; continue; } #endif @@ -159,7 +159,7 @@ C_PcSave::PopulateSlotInfo() } else { CMessages::InsertNumberInString(TheText.Get("FEC_SLC"), i + 1, -1, -1, -1, -1, -1, SlotFileName[i]); - Slots[i + 1] = SLOT_CORRUPTED; + Slots[i] = SLOT_CORRUPTED; } } } |