HDB: Put both data and Lua saves into single file

This commit is contained in:
Eugene Sandulenko 2019-07-21 20:38:56 +02:00
parent cfe228d7bb
commit d4f927f338
5 changed files with 28 additions and 38 deletions

View file

@ -60,7 +60,7 @@ Common::Error HDBGame::saveGameState(int slot, const Common::String &desc) {
// Actual Save Data
saveGame(out);
_lua->save(out, slot);
_lua->save(out);
out->finalize();
if (out->err())
@ -91,8 +91,7 @@ Common::Error HDBGame::loadGameState(int slot) {
_lua->loadLua(_currentLuaName); // load the Lua code FIRST! (if no file, it's ok)
saveFileName = genSaveFileName(slot, true);
_lua->loadSaveFile(in, saveFileName.c_str());
_lua->loadSaveFile(in);
delete in;