[Scummvm-cvs-logs] SF.net SVN: scummvm:[48415] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Mon Mar 29 20:47:40 CEST 2010
Revision: 48415
http://scummvm.svn.sourceforge.net/scummvm/?rev=48415&view=rev
Author: peres001
Date: 2010-03-29 18:47:40 +0000 (Mon, 29 Mar 2010)
Log Message:
-----------
Fixed bug 2969234 by tampering with the gameId. Probably not a nice solution, but hopefully ok for a while.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/detection.cpp
scummvm/trunk/engines/parallaction/saveload.cpp
Modified: scummvm/trunk/engines/parallaction/detection.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/detection.cpp 2010-03-28 21:10:47 UTC (rev 48414)
+++ scummvm/trunk/engines/parallaction/detection.cpp 2010-03-29 18:47:40 UTC (rev 48415)
@@ -295,11 +295,18 @@
SaveStateList ParallactionMetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
- Common::StringArray 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::StringArray filenames = saveFileMan->listSavefiles(pattern);
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
Modified: scummvm/trunk/engines/parallaction/saveload.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/saveload.cpp 2010-03-28 21:10:47 UTC (rev 48414)
+++ scummvm/trunk/engines/parallaction/saveload.cpp 2010-03-29 18:47:40 UTC (rev 48415)
@@ -193,34 +193,7 @@
-int SaveLoad::buildSaveFileList(Common::StringArray& l) {
- Common::String pattern = _saveFilePrefix + ".???";
- Common::StringArray 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::StringArray 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