diff options
| author | Nicola Mettifogo | 2010-03-29 18:47:40 +0000 | 
|---|---|---|
| committer | Nicola Mettifogo | 2010-03-29 18:47:40 +0000 | 
| commit | 2872f197d81df8a804546207dc8388d7f4f87997 (patch) | |
| tree | a53ec13e357d105720d1c75f4c0edfc2e7a9f874 | |
| parent | b39222d6112f857b3d066da6e4f869c780c3e338 (diff) | |
| download | scummvm-rg350-2872f197d81df8a804546207dc8388d7f4f87997.tar.gz scummvm-rg350-2872f197d81df8a804546207dc8388d7f4f87997.tar.bz2 scummvm-rg350-2872f197d81df8a804546207dc8388d7f4f87997.zip  | |
Fixed bug 2969234 by tampering with the gameId. Probably not a nice solution, but hopefully ok for a while.
svn-id: r48415
| -rw-r--r-- | engines/parallaction/detection.cpp | 15 | ||||
| -rw-r--r-- | engines/parallaction/saveload.cpp | 27 | 
2 files changed, 11 insertions, 31 deletions
diff --git a/engines/parallaction/detection.cpp b/engines/parallaction/detection.cpp index af5fb99180..9aae2d26c8 100644 --- a/engines/parallaction/detection.cpp +++ b/engines/parallaction/detection.cpp @@ -295,11 +295,18 @@ bool ParallactionMetaEngine::createInstance(OSystem *syst, Engine **engine, cons  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; diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp index 08bae50db0..66515127da 100644 --- a/engines/parallaction/saveload.cpp +++ b/engines/parallaction/saveload.cpp @@ -193,34 +193,7 @@ void SaveLoad_ns::doSaveGame(uint16 slot, const char* name) { -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);  | 
