EMI: Save LState sleepFor and bump savegame to 22.3

This commit is contained in:
Joel Teichroeb 2012-12-22 10:35:33 -08:00
parent d67ca007ca
commit 478d9c2505
3 changed files with 5 additions and 1 deletions

View File

@ -585,6 +585,9 @@ void lua_Restore(SaveGame *savedState) {
state->Cblocks[i].num = savedState->readLESint32();
}
if (savedState->saveMinorVersion() >= 3) {
state->sleepFor = savedState->readLEUint32();
}
state->id = savedState->readLEUint32();
restoreObjectValue(&state->taskFunc, savedState);
if (state->taskFunc.ttype == LUA_T_PROTO || state->taskFunc.ttype == LUA_T_CPROTO)

View File

@ -401,6 +401,7 @@ void lua_Save(SaveGame *savedState) {
savedState->writeLESint32(state->Cblocks[i].num);
}
savedState->writeLEUint32(state->sleepFor);
savedState->writeLEUint32(state->id);
saveObjectValue(&state->taskFunc, savedState);

View File

@ -34,7 +34,7 @@ namespace Grim {
#define SAVEGAME_FOOTERTAG 'ESAV'
uint SaveGame::SAVEGAME_MAJOR_VERSION = 22;
uint SaveGame::SAVEGAME_MINOR_VERSION = 2;
uint SaveGame::SAVEGAME_MINOR_VERSION = 3;
SaveGame *SaveGame::openForLoading(const Common::String &filename) {
Common::InSaveFile *inSaveFile = g_system->getSavefileManager()->openForLoading(filename);