aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2014-12-27 12:23:20 +0100
committerEugene Sandulenko2015-12-15 00:05:02 +0100
commit60388893a95e8ef3044dd00dd10087967be04fdf (patch)
tree2a4c84796b54bde0b19933b96756b6c2bd2c102d
parent01e290e4c3cbea59690b1e0283627bd4d3242eb1 (diff)
downloadscummvm-rg350-60388893a95e8ef3044dd00dd10087967be04fdf.tar.gz
scummvm-rg350-60388893a95e8ef3044dd00dd10087967be04fdf.tar.bz2
scummvm-rg350-60388893a95e8ef3044dd00dd10087967be04fdf.zip
LAB: propagate gamePlatform()
-rw-r--r--engines/lab/detection.cpp18
-rw-r--r--engines/lab/lab.cpp6
-rw-r--r--engines/lab/lab.h11
3 files changed, 25 insertions, 10 deletions
diff --git a/engines/lab/detection.cpp b/engines/lab/detection.cpp
index 5c69a1a253..3c9174aa8c 100644
--- a/engines/lab/detection.cpp
+++ b/engines/lab/detection.cpp
@@ -40,10 +40,6 @@ static const PlainGameDescriptor lab_setting[] = {
{ 0, 0 }
};
-enum GameFeatures {
- GF_LOWRES = 1 << 0
-};
-
static const ADGameDescription labDescriptions[] = {
{
"lab",
@@ -70,7 +66,7 @@ static const ADGameDescription labDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformDOS,
- GF_LOWRES,
+ Lab::GF_LOWRES,
GUIO0()
},
{
@@ -125,6 +121,14 @@ static const char *const directoryGlobs[] = {
0
};
+namespace Lab {
+
+Common::Platform LabEngine::getPlatform() const {
+ return _gameDescription->platform;
+}
+
+} // End of namespace Lab
+
class LabMetaEngine : public AdvancedMetaEngine {
public:
LabMetaEngine() : AdvancedMetaEngine(labDescriptions, sizeof(ADGameDescription), lab_setting) {
@@ -142,9 +146,9 @@ public:
return "Labytinth of Time (c) 2004 The Wyrmkeep Entertainment Co.";
}
- virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription * /* desc */) const {
+ virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
// Instantiate Engine even if the game data is not found.
- *engine = new Lab::LabEngine(syst);
+ *engine = new Lab::LabEngine(syst, desc);
return true;
}
diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp
index 971543a3f2..911ad6d255 100644
--- a/engines/lab/lab.cpp
+++ b/engines/lab/lab.cpp
@@ -39,6 +39,8 @@
#include "lab/lab.h"
#include "lab/labfun.h"
+#include "engines/advancedDetector.h"
+
namespace Lab {
bool LabEngine::hasFeature(EngineFeature f) const {
@@ -47,8 +49,8 @@ bool LabEngine::hasFeature(EngineFeature f) const {
LabEngine *g_lab;
-LabEngine::LabEngine(OSystem *syst)
- : Engine(syst) {
+LabEngine::LabEngine(OSystem *syst, const ADGameDescription *gameDesc)
+ : Engine(syst), _gameDescription(gameDesc) {
g_lab = this;
}
diff --git a/engines/lab/lab.h b/engines/lab/lab.h
index bdb0b4d89b..72e359c291 100644
--- a/engines/lab/lab.h
+++ b/engines/lab/lab.h
@@ -36,17 +36,26 @@
#include "engines/engine.h"
#include "lab/labfun.h"
+struct ADGameDescription;
+
namespace Lab {
+enum GameFeatures {
+ GF_LOWRES = 1 << 0
+};
+
class LabEngine : public Engine {
public:
- LabEngine(OSystem *syst);
+ LabEngine(OSystem *syst, const ADGameDescription *gameDesc);
~LabEngine();
virtual Common::Error run();
bool hasFeature(EngineFeature f) const;
+ const ADGameDescription *_gameDescription;
+ Common::Platform getPlatform() const;
+
LargeSet *_conditions, *_roomsFound;
};