mirror of
https://github.com/halpz/re3.git
synced 2025-06-28 13:56:21 +00:00
Continue to Frontend, fix savegame list bug
This commit is contained in:
@ -57,7 +57,7 @@ wchar SlotSaveDate[SLOT_COUNT][70];
|
||||
int CheckSum;
|
||||
eLevelName m_LevelToLoad;
|
||||
char SaveFileNameJustSaved[260];
|
||||
int Slots[SLOT_COUNT+1];
|
||||
int Slots[SLOT_COUNT];
|
||||
CDate CompileDateAndTime;
|
||||
|
||||
bool b_FoundRecentSavedGameWantToLoad;
|
||||
|
@ -31,7 +31,7 @@ extern wchar SlotFileName[SLOT_COUNT][260];
|
||||
extern wchar SlotSaveDate[SLOT_COUNT][70];
|
||||
extern int CheckSum;
|
||||
extern enum eLevelName m_LevelToLoad;
|
||||
extern int Slots[SLOT_COUNT+1];
|
||||
extern int Slots[SLOT_COUNT];
|
||||
|
||||
extern bool b_FoundRecentSavedGameWantToLoad;
|
||||
extern bool JustLoadedDontFadeInYet;
|
||||
|
@ -88,7 +88,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';
|
||||
}
|
||||
@ -108,14 +108,14 @@ 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)) {
|
||||
SYSTEMTIME st;
|
||||
memcpy(&st, &header.SaveDateTime, sizeof(SYSTEMTIME));
|
||||
@ -147,7 +147,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user