diff options
author | Travis Howell | 2003-09-01 09:08:48 +0000 |
---|---|---|
committer | Travis Howell | 2003-09-01 09:08:48 +0000 |
commit | ebf9114f68eaf9c6111cfb81ea311f120f763f09 (patch) | |
tree | 26a6b134c68954c2eb07c1c8a6f60e98c43bfe8e /scumm | |
parent | 97545e41fb44aa37c419061abd5bc9282740f796 (diff) | |
download | scummvm-rg350-ebf9114f68eaf9c6111cfb81ea311f120f763f09.tar.gz scummvm-rg350-ebf9114f68eaf9c6111cfb81ea311f120f763f09.tar.bz2 scummvm-rg350-ebf9114f68eaf9c6111cfb81ea311f120f763f09.zip |
Add v1 maniac load/save screen support
Detect save files
svn-id: r9954
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/script_v5.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp index 86c3b7e627..a5446a3f49 100644 --- a/scumm/script_v5.cpp +++ b/scumm/script_v5.cpp @@ -1089,7 +1089,19 @@ void Scumm_v5::o5_saveLoadGame() { byte slot = (a & 0x1F) + 1; byte result = 0; - switch(a & 0xE0) { + if ((_gameId == GID_MANIAC) && (_version == 1)) { + // Convert older load/save screen + // 1 Load + // 2 Save + slot = 1; + if (a == 1) + _opcode = 0x40; + else if (a == 2) + _opcode = 0x80; + } else + _opcode = a & 0xE0; + + switch (_opcode) { case 0x00: // num slots available result = 100; break; @@ -1110,10 +1122,11 @@ void Scumm_v5::o5_saveLoadGame() { break; case 0xC0: // test if save exists bool avail_saves[100]; + char filename[256]; SaveFileManager *mgr = _system->get_savefile_manager(); listSavegames(avail_saves, ARRAYSIZE(avail_saves), mgr); - delete mgr; - if (avail_saves[slot]) + makeSavegameName(filename, slot, false); + if (avail_saves[slot] && (mgr->open_savefile(filename, getSavePath(), false))) result = 6; // save file exists else result = 7; // save file does not exist |