aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2009-03-08 09:31:35 +0000
committerTravis Howell2009-03-08 09:31:35 +0000
commit6b76f72f322d4b3e5d9d9dc18ace84c6c1b8f919 (patch)
tree46827681ecc3db258415b648c2e1bcd3ca6e7680
parent2620d6836c001f2f295cb6efd6beab78f5a3c50f (diff)
downloadscummvm-rg350-6b76f72f322d4b3e5d9d9dc18ace84c6c1b8f919.tar.gz
scummvm-rg350-6b76f72f322d4b3e5d9d9dc18ace84c6c1b8f919.tar.bz2
scummvm-rg350-6b76f72f322d4b3e5d9d9dc18ace84c6c1b8f919.zip
Re-use save game slot, if the name matches, when saving in PN.
svn-id: r39217
-rw-r--r--engines/agos/script_pn.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/agos/script_pn.cpp b/engines/agos/script_pn.cpp
index f46f6db7df..34a5a9ec0e 100644
--- a/engines/agos/script_pn.cpp
+++ b/engines/agos/script_pn.cpp
@@ -388,17 +388,22 @@ void AGOSEngine_PN::opn_opcode31() {
void AGOSEngine_PN::opn_opcode32() {
char bf[60];
- int a;
+ int a, slot;
if ((a = varval()) > 2) {
setScriptReturn(true);
return;
}
+ uint16 curSlot = countSaveGames();
switch (a) {
case 0:
getFilename();
- strcpy(bf, genSaveName(countSaveGames()));
+ slot = matchSaveGame(_saveFile, curSlot);
+ if (slot != -1)
+ strcpy(bf, genSaveName(slot));
+ else
+ strcpy(bf, genSaveName(curSlot));
break;
case 1:
strcpy(bf, "test.sav");