[Scummvm-cvs-logs] SF.net SVN: scummvm:[48416] scummvm/branches/branch-1-1-0/engines/ parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Mon Mar 29 20:58:47 CEST 2010
Revision: 48416
http://scummvm.svn.sourceforge.net/scummvm/?rev=48416&view=rev
Author: peres001
Date: 2010-03-29 18:58:47 +0000 (Mon, 29 Mar 2010)
Log Message:
-----------
(Backport) Fixed bug 2969234 by tampering with the gameId. Probably not a nice solution, but hopefully ok for a while.
Modified Paths:
--------------
scummvm/branches/branch-1-1-0/engines/parallaction/detection.cpp
scummvm/branches/branch-1-1-0/engines/parallaction/saveload.cpp
Modified: scummvm/branches/branch-1-1-0/engines/parallaction/detection.cpp
===================================================================
--- scummvm/branches/branch-1-1-0/engines/parallaction/detection.cpp 2010-03-29 18:47:40 UTC (rev 48415)
+++ scummvm/branches/branch-1-1-0/engines/parallaction/detection.cpp 2010-03-29 18:58:47 UTC (rev 48416)
@@ -295,11 +295,18 @@
SaveStateList ParallactionMetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
- Common::StringList filenames;
- Common::String pattern = target;
- pattern += ".0??";
- filenames = saveFileMan->listSavefiles(pattern);
+ // HACK: Parallaction game saves are compatible across platforms and use the
+ // gameId as pattern. Butchering the target to get the gameId is probably not
+ // robust...
+ Common::String pattern(target);
+ if (pattern.hasPrefix("nippon")) {
+ pattern = "nippon.0??";
+ } else {
+ pattern = "bra.0??";
+ }
+
+ Common::StringList filenames = saveFileMan->listSavefiles(pattern);
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
Modified: scummvm/branches/branch-1-1-0/engines/parallaction/saveload.cpp
===================================================================
--- scummvm/branches/branch-1-1-0/engines/parallaction/saveload.cpp 2010-03-29 18:47:40 UTC (rev 48415)
+++ scummvm/branches/branch-1-1-0/engines/parallaction/saveload.cpp 2010-03-29 18:58:47 UTC (rev 48416)
@@ -193,34 +193,7 @@
-int SaveLoad::buildSaveFileList(Common::StringList& l) {
- Common::String pattern = _saveFilePrefix + ".???";
- Common::StringList filenames = _saveFileMan->listSavefiles(pattern);
-
- Common::String s;
-
- int count = 0;
-
- for (int i = 0; i < NUM_SAVESLOTS; i++) {
- s.clear();
-
- Common::InSaveFile *f = getInSaveFile(i);
- if (f) {
- s = f->readLine();
- count++;
- }
-
- delete f;
- l.push_back(s);
- }
-
- return count;
-}
-
-
int SaveLoad::selectSaveFile(Common::String &selectedName, bool saveMode, const Common::String &caption, const Common::String &button) {
- Common::StringList list;
- buildSaveFileList(list);
GUI::SaveLoadChooser slc(caption, button);
slc.setSaveMode(saveMode);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list