[ scummvm-Patches-2258906 ] SCUMM: fix builtin load game screen for v1-v5
SourceForge.net
noreply at sourceforge.net
Tue Nov 11 01:41:55 CET 2008
Patches item #2258906, was opened at 2008-11-10 18:41
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=2258906&group_id=37116
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Quietust (quietust)
Assigned to: Nobody/Anonymous (nobody)
Summary: SCUMM: fix builtin load game screen for v1-v5
Initial Comment:
The "0xC0" case for o5_saveLoadGame currently fails to work correctly, appending the standard savegame extension to an uninitialized string and attempting to locate the filename. This results in numerous "FSNode::openForReading: FSNode does not exist" warnings when attempting to open the game's Load screen.
@@ -1259,13 +1259,14 @@
case 0xC0: // test if save exists
+ {
Common::InSaveFile *file;
bool avail_saves[100];
- char filename[256];
listSavegames(avail_saves, ARRAYSIZE(avail_saves));
- makeSavegameName(filename, slot, false);
+ Common::String filename = makeSavegameName(slot, false);
- if (avail_saves[slot] && (file = _saveFileMan->openForLoading(filename))) {
+ if (avail_saves[slot] && (file = _saveFileMan->openForLoading(filename.c_str()))) {
result = 6; // save file exists
delete file;
} else
result = 7; // save file does not exist
+ }
break;
The extra curly braces were needed to get rid of a compiler error (error C2361: initialization of 'filename' is skipped by 'default' label) in MSVC71; alternatively, filename could be declared at the top of the function and initialized with an empty string.
With this change, the builtin Load screens for Maniac Mansion (classic/enhanced), Zak McKracken (classic/enhanced), Indiana Jones and the Last Crusade (ega/vga), and Loom (ega) all work correctly.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=2258906&group_id=37116
More information about the Scummvm-tracker
mailing list