aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2013-08-13 08:34:36 +0200
committerStrangerke2013-08-13 08:34:36 +0200
commit0d1772b95d35a88f18977aeda5149c98cf619a0c (patch)
tree71a947a2d98bd6b3630ebdc26ac8415f8029e5ae /engines
parentef3c4689b3bfb558bb257da9c1c3c9d6b5dcb3ad (diff)
downloadscummvm-rg350-0d1772b95d35a88f18977aeda5149c98cf619a0c.tar.gz
scummvm-rg350-0d1772b95d35a88f18977aeda5149c98cf619a0c.tar.bz2
scummvm-rg350-0d1772b95d35a88f18977aeda5149c98cf619a0c.zip
MORTEVIELLE: Introduce original language in detection
Diffstat (limited to 'engines')
-rw-r--r--engines/mortevielle/detection.cpp16
-rw-r--r--engines/mortevielle/detection_tables.h93
-rw-r--r--engines/mortevielle/mortevielle.cpp2
-rw-r--r--engines/mortevielle/mortevielle.h6
4 files changed, 75 insertions, 42 deletions
diff --git a/engines/mortevielle/detection.cpp b/engines/mortevielle/detection.cpp
index 28cbc77b8b..7d0f3c4d88 100644
--- a/engines/mortevielle/detection.cpp
+++ b/engines/mortevielle/detection.cpp
@@ -24,13 +24,17 @@
#include "engines/advancedDetector.h"
#include "mortevielle/mortevielle.h"
-#include "mortevielle/detection_tables.h"
#include "mortevielle/saveload.h"
namespace Mortevielle {
-uint32 MortevielleEngine::getGameFlags() const { return _gameDescription->flags; }
+struct MortevielleGameDescription {
+ ADGameDescription desc;
+ Common::Language originalLanguage;
+};
+
+uint32 MortevielleEngine::getGameFlags() const { return _gameDescription->desc.flags; }
-Common::Language MortevielleEngine::getLanguage() const { return _gameDescription->language; }
+Common::Language MortevielleEngine::getLanguage() const { return _gameDescription->desc.language; }
}
@@ -39,9 +43,11 @@ static const PlainGameDescriptor MortevielleGame[] = {
{0, 0}
};
+#include "mortevielle/detection_tables.h"
+
class MortevielleMetaEngine : public AdvancedMetaEngine {
public:
- MortevielleMetaEngine() : AdvancedMetaEngine(Mortevielle::MortevielleGameDescriptions, sizeof(ADGameDescription),
+ MortevielleMetaEngine() : AdvancedMetaEngine(Mortevielle::MortevielleGameDescriptions, sizeof(Mortevielle::MortevielleGameDescription),
MortevielleGame) {
_md5Bytes = 512;
_singleid = "mortevielle";
@@ -63,7 +69,7 @@ public:
bool MortevielleMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
if (desc) {
- *engine = new Mortevielle::MortevielleEngine(syst, desc);
+ *engine = new Mortevielle::MortevielleEngine(syst, (const Mortevielle::MortevielleGameDescription *)desc);
}
return desc != 0;
}
diff --git a/engines/mortevielle/detection_tables.h b/engines/mortevielle/detection_tables.h
index 5d59a4872b..9bb5fbea87 100644
--- a/engines/mortevielle/detection_tables.h
+++ b/engines/mortevielle/detection_tables.h
@@ -22,53 +22,78 @@
namespace Mortevielle {
-static const ADGameDescription MortevielleGameDescriptions[] = {
+static const MortevielleGameDescription MortevielleGameDescriptions[] = {
// French
{
- "mortevielle",
- "",
{
- {"menufr.mor", 0, "e413f36b9e14eef16130adc347a9391f", 144},
- {"dxx.mor", 0, "949e68e829ecd5ad29e36a00347a9e7e", 207744},
- AD_LISTEND
- },
- Common::FR_FRA,
- Common::kPlatformDOS,
- ADGF_NO_FLAGS,
- GUIO0()
+ "mortevielle",
+ "",
+ {
+ {"menufr.mor", 0, "e413f36b9e14eef16130adc347a9391f", 144},
+ {"dxx.mor", 0, "949e68e829ecd5ad29e36a00347a9e7e", 207744},
+ AD_LISTEND
+ },
+ Common::FR_FRA,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO0()
+ }, Common::FR_FRA
},
// German
{
- "mortevielle",
- "",
{
- {"menual.mor", 0, "792aea282b07a1d74c4a4abeabc90c19", 144},
- {"dxx.mor", 0, "949e68e829ecd5ad29e36a00347a9e7e", 207744},
- AD_LISTEND
- },
- Common::DE_DEU,
- Common::kPlatformDOS,
- ADGF_NO_FLAGS,
- GUIO0()
+ "mortevielle",
+ "",
+ {
+ {"menual.mor", 0, "792aea282b07a1d74c4a4abeabc90c19", 144},
+ {"dxx.mor", 0, "949e68e829ecd5ad29e36a00347a9e7e", 207744},
+ AD_LISTEND
+ },
+ Common::DE_DEU,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO0()
+ }, Common::DE_DEU
},
- // English. Note that this is technically the French version, but English strings in mort.dat
- // will automatically replace all the French strings
+ // DOS English version doesn't exist. Technically, they are French or German versions,
+ // using English strings stored mort.dat
+
+ // English on top of French version
{
- "mortevielle",
- "",
{
- {"menufr.mor", 0, "e413f36b9e14eef16130adc347a9391f", 144},
- {"dxx.mor", 0, "949e68e829ecd5ad29e36a00347a9e7e", 207744},
- AD_LISTEND
- },
- Common::EN_ANY,
- Common::kPlatformDOS,
- ADGF_NO_FLAGS,
- GUIO0()
+ "mortevielle",
+ "",
+ {
+ {"menufr.mor", 0, "e413f36b9e14eef16130adc347a9391f", 144},
+ {"dxx.mor", 0, "949e68e829ecd5ad29e36a00347a9e7e", 207744},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO0()
+ }, Common::FR_FRA
},
- AD_TABLE_END_MARKER
+ // English on top of German version
+ {
+ {
+ "mortevielle",
+ "",
+ {
+ {"menual.mor", 0, "792aea282b07a1d74c4a4abeabc90c19", 144},
+ {"dxx.mor", 0, "949e68e829ecd5ad29e36a00347a9e7e", 207744},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO0()
+ }, Common::DE_DEU
+ },
+
+ { AD_TABLE_END_MARKER , Common::EN_ANY}
};
} // End of namespace Mortevielle
diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp
index 0b6b82c1a9..d657bda7ab 100644
--- a/engines/mortevielle/mortevielle.cpp
+++ b/engines/mortevielle/mortevielle.cpp
@@ -46,7 +46,7 @@ namespace Mortevielle {
MortevielleEngine *g_vm;
-MortevielleEngine::MortevielleEngine(OSystem *system, const ADGameDescription *gameDesc):
+MortevielleEngine::MortevielleEngine(OSystem *system, const MortevielleGameDescription *gameDesc):
Engine(system), _gameDescription(gameDesc), _randomSource("mortevielle"),
_soundManager(_mixer) {
g_vm = this;
diff --git a/engines/mortevielle/mortevielle.h b/engines/mortevielle/mortevielle.h
index 699ee3f37a..820046b17c 100644
--- a/engines/mortevielle/mortevielle.h
+++ b/engines/mortevielle/mortevielle.h
@@ -169,9 +169,11 @@ struct Hint {
byte _point;
};
+struct MortevielleGameDescription;
+
class MortevielleEngine : public Engine {
private:
- const ADGameDescription *_gameDescription;
+ const MortevielleGameDescription *_gameDescription;
Common::Stack<int> _keypresses;
uint32 _lastGameFrame;
Common::Point _mousePos;
@@ -449,7 +451,7 @@ public:
TextHandler _text;
DialogManager _dialogManager;
- MortevielleEngine(OSystem *system, const ADGameDescription *gameDesc);
+ MortevielleEngine(OSystem *system, const MortevielleGameDescription *gameDesc);
~MortevielleEngine();
virtual bool hasFeature(EngineFeature f) const;
virtual bool canLoadGameStateCurrently();