aboutsummaryrefslogtreecommitdiff
path: root/engines/gob
diff options
context:
space:
mode:
authorMatthew Hoops2011-06-14 16:18:33 -0400
committerMatthew Hoops2011-06-14 16:21:39 -0400
commit4926c41e01a46735747930b09cc924ecd826a215 (patch)
tree8832a663ade5b4baed0e3b426d5f72e482a12c30 /engines/gob
parent5e7acc83b7ad363014e2a6681bcba22c9bbd9c07 (diff)
parente826aaab39f02360c5fa8f249ec6b788a903b948 (diff)
downloadscummvm-rg350-4926c41e01a46735747930b09cc924ecd826a215.tar.gz
scummvm-rg350-4926c41e01a46735747930b09cc924ecd826a215.tar.bz2
scummvm-rg350-4926c41e01a46735747930b09cc924ecd826a215.zip
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'engines/gob')
-rw-r--r--engines/gob/detection.cpp22
-rw-r--r--engines/gob/detection_tables.h52
-rw-r--r--engines/gob/inter_playtoons.cpp3
-rw-r--r--engines/gob/inter_v2.cpp5
-rw-r--r--engines/gob/inter_v5.cpp4
5 files changed, 51 insertions, 35 deletions
diff --git a/engines/gob/detection.cpp b/engines/gob/detection.cpp
index 2ecd6b741e..9a554b5429 100644
--- a/engines/gob/detection.cpp
+++ b/engines/gob/detection.cpp
@@ -22,6 +22,7 @@
#include "base/plugins.h"
#include "engines/advancedDetector.h"
+#include "engines/obsolete.h"
#include "gob/gob.h"
@@ -78,7 +79,7 @@ static const PlainGameDescriptor gobGames[] = {
{0, 0}
};
-static const ADObsoleteGameID obsoleteGameIDsTable[] = {
+static const Engines::ObsoleteGameID obsoleteGameIDsTable[] = {
{"gob1", "gob", kPlatformUnknown},
{"gob2", "gob", kPlatformUnknown},
{0, 0, kPlatformUnknown}
@@ -89,10 +90,16 @@ static const ADObsoleteGameID obsoleteGameIDsTable[] = {
class GobMetaEngine : public AdvancedMetaEngine {
public:
GobMetaEngine() : AdvancedMetaEngine(Gob::gameDescriptions, sizeof(Gob::GOBGameDescription), gobGames) {
- params.obsoleteList = obsoleteGameIDsTable;
- params.singleid = "gob";
- params.fileBasedFallback = Gob::fileBased;
- params.guioptions = Common::GUIO_NOLAUNCHLOAD;
+ _singleid = "gob";
+ _guioptions = Common::GUIO_NOLAUNCHLOAD;
+ }
+
+ virtual GameDescriptor findGame(const char *gameid) const {
+ return Engines::findGameID(gameid, _gameids, obsoleteGameIDsTable);
+ }
+
+ virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
+ return detectGameFilebased(allFiles, Gob::fileBased);
}
virtual const char *getName() const {
@@ -104,6 +111,11 @@ public:
}
virtual bool hasFeature(MetaEngineFeature f) const;
+
+ virtual Common::Error createInstance(OSystem *syst, Engine **engine) const {
+ Engines::upgradeTargetIfNecessary(obsoleteGameIDsTable);
+ return AdvancedMetaEngine::createInstance(syst, engine);
+ }
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
};
diff --git a/engines/gob/detection_tables.h b/engines/gob/detection_tables.h
index 11cca2b65e..1c9811fe9e 100644
--- a/engines/gob/detection_tables.h
+++ b/engines/gob/detection_tables.h
@@ -5202,32 +5202,32 @@ static const GOBGameDescription fallbackDescs[] = {
};
static const ADFileBasedFallback fileBased[] = {
- { &fallbackDescs[ 0], { "intro.stk", "disk1.stk", "disk2.stk", "disk3.stk", "disk4.stk", 0 } },
- { &fallbackDescs[ 1], { "intro.stk", "gob.lic", 0 } },
- { &fallbackDescs[ 2], { "intro.stk", 0 } },
- { &fallbackDescs[ 2], { "intro.stk", "disk2.stk", "disk3.stk", 0 } },
- { &fallbackDescs[ 3], { "intro.stk", "disk2.stk", "disk3.stk", "musmac1.mid", 0 } },
- { &fallbackDescs[ 4], { "intro.stk", "gobnew.lic", 0 } },
- { &fallbackDescs[ 5], { "intro.stk", "scaa.imd", "scba.imd", "scbf.imd", 0 } },
- { &fallbackDescs[ 6], { "intro.stk", "imd.itk", 0 } },
- { &fallbackDescs[ 7], { "intro.stk", "mus_gob3.lic", 0 } },
- { &fallbackDescs[ 8], { "intro.stk", "woodruff.itk", 0 } },
- { &fallbackDescs[ 9], { "intro.stk", "commun1.itk", 0 } },
- { &fallbackDescs[10], { "intro.stk", "commun1.itk", "musmac1.mid", 0 } },
- { &fallbackDescs[11], { "intro.stk", "commun1.itk", "lost.lic", 0 } },
- { &fallbackDescs[12], { "intro.stk", "cd1.itk", "objet1.itk", 0 } },
- { &fallbackDescs[13], { "playtoon.stk", "archi.stk", 0 } },
- { &fallbackDescs[14], { "playtoon.stk", "spirou.stk", 0 } },
- { &fallbackDescs[15], { "playtoon.stk", "chato.stk", 0 } },
- { &fallbackDescs[16], { "playtoon.stk", "manda.stk", 0 } },
- { &fallbackDescs[17], { "playtoon.stk", "wakan.stk", 0 } },
- { &fallbackDescs[18], { "playtoon.stk", "dan.itk" } },
- { &fallbackDescs[19], { "intro.stk", "bambou.itk", 0 } },
- { &fallbackDescs[20], { "disk0.stk", "disk1.stk", "disk2.stk", "disk3.stk", 0 } },
- { &fallbackDescs[21], { "disk1.stk", "disk2.stk", "disk3.stk", 0 } },
- { &fallbackDescs[22], { "adi2.stk", 0 } },
- { &fallbackDescs[23], { "adif41.stk", "adim41.stk", 0 } },
- { &fallbackDescs[24], { "coktelplayer.scn", 0 } },
+ { &fallbackDescs[ 0].desc, { "intro.stk", "disk1.stk", "disk2.stk", "disk3.stk", "disk4.stk", 0 } },
+ { &fallbackDescs[ 1].desc, { "intro.stk", "gob.lic", 0 } },
+ { &fallbackDescs[ 2].desc, { "intro.stk", 0 } },
+ { &fallbackDescs[ 2].desc, { "intro.stk", "disk2.stk", "disk3.stk", 0 } },
+ { &fallbackDescs[ 3].desc, { "intro.stk", "disk2.stk", "disk3.stk", "musmac1.mid", 0 } },
+ { &fallbackDescs[ 4].desc, { "intro.stk", "gobnew.lic", 0 } },
+ { &fallbackDescs[ 5].desc, { "intro.stk", "scaa.imd", "scba.imd", "scbf.imd", 0 } },
+ { &fallbackDescs[ 6].desc, { "intro.stk", "imd.itk", 0 } },
+ { &fallbackDescs[ 7].desc, { "intro.stk", "mus_gob3.lic", 0 } },
+ { &fallbackDescs[ 8].desc, { "intro.stk", "woodruff.itk", 0 } },
+ { &fallbackDescs[ 9].desc, { "intro.stk", "commun1.itk", 0 } },
+ { &fallbackDescs[10].desc, { "intro.stk", "commun1.itk", "musmac1.mid", 0 } },
+ { &fallbackDescs[11].desc, { "intro.stk", "commun1.itk", "lost.lic", 0 } },
+ { &fallbackDescs[12].desc, { "intro.stk", "cd1.itk", "objet1.itk", 0 } },
+ { &fallbackDescs[13].desc, { "playtoon.stk", "archi.stk", 0 } },
+ { &fallbackDescs[14].desc, { "playtoon.stk", "spirou.stk", 0 } },
+ { &fallbackDescs[15].desc, { "playtoon.stk", "chato.stk", 0 } },
+ { &fallbackDescs[16].desc, { "playtoon.stk", "manda.stk", 0 } },
+ { &fallbackDescs[17].desc, { "playtoon.stk", "wakan.stk", 0 } },
+ { &fallbackDescs[18].desc, { "playtoon.stk", "dan.itk" } },
+ { &fallbackDescs[19].desc, { "intro.stk", "bambou.itk", 0 } },
+ { &fallbackDescs[20].desc, { "disk0.stk", "disk1.stk", "disk2.stk", "disk3.stk", 0 } },
+ { &fallbackDescs[21].desc, { "disk1.stk", "disk2.stk", "disk3.stk", 0 } },
+ { &fallbackDescs[22].desc, { "adi2.stk", 0 } },
+ { &fallbackDescs[23].desc, { "adif41.stk", "adim41.stk", 0 } },
+ { &fallbackDescs[24].desc, { "coktelplayer.scn", 0 } },
{ 0, { 0 } }
};
diff --git a/engines/gob/inter_playtoons.cpp b/engines/gob/inter_playtoons.cpp
index d57d2f354b..e05cae354c 100644
--- a/engines/gob/inter_playtoons.cpp
+++ b/engines/gob/inter_playtoons.cpp
@@ -22,6 +22,7 @@
#include "common/endian.h"
#include "common/str.h"
+#include "common/translation.h"
#include "gui/message.h"
@@ -252,7 +253,7 @@ void Inter_Playtoons::oPlaytoons_readData(OpFuncParams &params) {
WRITE_VAR(1, 1);
if (!_vm->_saveLoad->load(file.c_str(), dataVar, size, offset)) {
- GUI::MessageDialog dialog("Failed to load game state from file.");
+ GUI::MessageDialog dialog(_("Failed to load game state from file."));
dialog.runModal();
} else
WRITE_VAR(1, 0);
diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp
index 84cae3b380..2fea18343d 100644
--- a/engines/gob/inter_v2.cpp
+++ b/engines/gob/inter_v2.cpp
@@ -22,6 +22,7 @@
#include "common/endian.h"
#include "common/str.h"
+#include "common/translation.h"
#include "gui/message.h"
@@ -1279,7 +1280,7 @@ void Inter_v2::o2_readData(OpFuncParams &params) {
if (!_vm->_saveLoad->load(file, dataVar, size, offset)) {
- GUI::MessageDialog dialog("Failed to load game state from file.");
+ GUI::MessageDialog dialog(_("Failed to load game state from file."));
dialog.runModal();
} else
@@ -1349,7 +1350,7 @@ void Inter_v2::o2_writeData(OpFuncParams &params) {
if (!_vm->_saveLoad->save(file, dataVar, size, offset)) {
- GUI::MessageDialog dialog("Failed to save game state to file.");
+ GUI::MessageDialog dialog(_("Failed to save game state to file."));
dialog.runModal();
} else
diff --git a/engines/gob/inter_v5.cpp b/engines/gob/inter_v5.cpp
index ed371737bd..c0e8978afd 100644
--- a/engines/gob/inter_v5.cpp
+++ b/engines/gob/inter_v5.cpp
@@ -20,6 +20,8 @@
*
*/
+#include "common/translation.h"
+
#include "gui/message.h"
#include "gob/gob.h"
@@ -102,7 +104,7 @@ void Inter_v5::o5_deleteFile() {
if (mode == SaveLoad::kSaveModeSave) {
if (!_vm->_saveLoad->deleteFile(file)) {
- GUI::MessageDialog dialog("Failed to delete file.");
+ GUI::MessageDialog dialog(_("Failed to delete file."));
dialog.runModal();
}