Unified
Split
Showing
with
14 additions
and 15 deletions.
- +1 −1 engines/zvision/detection.cpp
- +8 −9 engines/zvision/{core → file}/save_manager.cpp
- 0 engines/zvision/{core → file}/save_manager.h
- +1 −1 engines/zvision/module.mk
- +1 −1 engines/zvision/scripting/actions.cpp
- +1 −1 engines/zvision/scripting/controls/save_control.cpp
- +1 −1 engines/zvision/scripting/script_manager.cpp
- +1 −1 engines/zvision/zvision.cpp
| @@ -26,7 +26,7 @@ | ||
|
|
||
| #include "zvision/zvision.h" | ||
| #include "zvision/detection.h" | ||
| #include "zvision/core/save_manager.h" | ||
| #include "zvision/file/save_manager.h" | ||
| #include "zvision/scripting/script_manager.h" | ||
|
|
||
| #include "common/translation.h" | ||
| @@ -22,8 +22,8 @@ | ||
|
|
||
| #include "common/scummsys.h" | ||
|
|
||
| #include "zvision/core/save_manager.h" | ||
| #include "zvision/zvision.h" | ||
| #include "zvision/file/save_manager.h" | ||
| #include "zvision/scripting/script_manager.h" | ||
| #include "zvision/graphics/render_manager.h" | ||
|
|
||
| @@ -78,9 +78,6 @@ bool SaveManager::scummVMSaveLoadDialog(bool isSave) { | ||
| } | ||
|
|
||
| void SaveManager::saveGame(uint slot, const Common::String &saveName) { | ||
| // The games only support 20 slots | ||
| //assert(slot <= 1 && slot <= 20); | ||
|
|
||
| Common::SaveFileManager *saveFileManager = g_system->getSavefileManager(); | ||
| Common::OutSaveFile *file = saveFileManager->openForSaving(_engine->generateSaveFileName(slot)); | ||
|
|
||
| @@ -124,7 +121,6 @@ void SaveManager::autoSave() { | ||
| } | ||
|
|
||
| void SaveManager::writeSaveGameHeader(Common::OutSaveFile *file, const Common::String &saveName) { | ||
|
|
||
| file->writeUint32BE(SAVEGAME_ID); | ||
|
|
||
| // Write version | ||
| @@ -148,9 +144,6 @@ void SaveManager::writeSaveGameHeader(Common::OutSaveFile *file, const Common::S | ||
| } | ||
|
|
||
| Common::Error SaveManager::loadGame(uint slot) { | ||
| // The games only support 20 slots | ||
| //assert(slot <= 1 && slot <= 20); | ||
|
|
||
| Common::SeekableReadStream *saveFile = getSlotFile(slot); | ||
| if (saveFile == 0) { | ||
| return Common::kPathDoesNotExist; | ||
| @@ -226,7 +219,13 @@ bool SaveManager::readSaveGameHeader(Common::InSaveFile *in, SaveGameHeader &hea | ||
| // Check that the save version isn't newer than this binary | ||
| if (header.version > SAVE_VERSION) { | ||
| uint tempVersion = header.version; | ||
| GUI::MessageDialog dialog(Common::String::format("This save file uses version %u, but this engine only supports up to version %d. You will need an updated version of the engine to use this save file.", tempVersion, SAVE_VERSION), "OK"); | ||
| GUI::MessageDialog dialog( | ||
| Common::String::format( | ||
| "This save file uses version %u, but this engine only " | ||
| "supports up to version %d. You will need an updated version " | ||
| "of the engine to use this save file.", tempVersion, SAVE_VERSION | ||
| ), | ||
| "OK"); | ||
| dialog.runModal(); | ||
| } | ||
|
|
||
File renamed without changes.
| @@ -4,9 +4,9 @@ MODULE_OBJS := \ | ||
| core/console.o \ | ||
| core/clock.o \ | ||
| core/events.o \ | ||
| core/save_manager.o \ | ||
| detection.o \ | ||
| file/lzss_read_stream.o \ | ||
| file/save_manager.o \ | ||
| file/search_manager.o \ | ||
| file/zfs_archive.o \ | ||
| graphics/cursors/cursor_manager.o \ | ||
| @@ -29,6 +29,7 @@ | ||
| #include "zvision/graphics/render_manager.h" | ||
| #include "zvision/sound/zork_raw.h" | ||
| #include "zvision/video/zork_avi_decoder.h" | ||
| #include "zvision/file/save_manager.h" | ||
| #include "zvision/scripting/sidefx/timer_node.h" | ||
| #include "zvision/scripting/sidefx/music_node.h" | ||
| #include "zvision/scripting/sidefx/syncsound_node.h" | ||
| @@ -42,7 +43,6 @@ | ||
| #include "zvision/graphics/effects/fog.h" | ||
| #include "zvision/graphics/effects/light.h" | ||
| #include "zvision/graphics/effects/wave.h" | ||
| #include "zvision/core/save_manager.h" | ||
| #include "zvision/graphics/cursors/cursor_manager.h" | ||
|
|
||
| #include "common/file.h" | ||
| @@ -29,7 +29,7 @@ | ||
| #include "zvision/scripting/script_manager.h" | ||
| #include "zvision/text/string_manager.h" | ||
|
|
||
| #include "zvision/core/save_manager.h" | ||
| #include "zvision/file/save_manager.h" | ||
|
|
||
| #include "common/str.h" | ||
| #include "common/stream.h" | ||
| @@ -27,7 +27,7 @@ | ||
| #include "zvision/zvision.h" | ||
| #include "zvision/graphics/render_manager.h" | ||
| #include "zvision/graphics/cursors/cursor_manager.h" | ||
| #include "zvision/core/save_manager.h" | ||
| #include "zvision/file/save_manager.h" | ||
| #include "zvision/scripting/actions.h" | ||
| #include "zvision/scripting/sidefx/timer_node.h" | ||
|
|
||
| @@ -27,7 +27,7 @@ | ||
| #include "zvision/scripting/script_manager.h" | ||
| #include "zvision/graphics/render_manager.h" | ||
| #include "zvision/graphics/cursors/cursor_manager.h" | ||
| #include "zvision/core/save_manager.h" | ||
| #include "zvision/file/save_manager.h" | ||
| #include "zvision/text/string_manager.h" | ||
| #include "zvision/detection.h" | ||
| #include "zvision/scripting/menu.h" | ||