diff options
-rw-r--r-- | engines/sci/detection.cpp | 20 | ||||
-rw-r--r-- | engines/sci/sci.cpp | 3 | ||||
-rw-r--r-- | engines/sci/sci.h | 10 |
3 files changed, 29 insertions, 4 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index 27329c0db8..1aae7aae31 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -89,6 +89,26 @@ static const PlainGameDescriptor SciGameTitles[] = { {0, 0} }; +const char* SciEngine::getGameID() const { + return _gameDescription->desc.gameid; +} + +Common::Platform SciEngine::getPlatform() const { + return _gameDescription->desc.platform; +} + +Common::Language SciEngine::getLanguage() const { + return _gameDescription->desc.language; +} + +uint32 SciEngine::getFlags() const { + return _gameDescription->desc.flags; +} + +uint16 SciEngine::getVersion() const { + return _gameDescription->version; +} + /* // Missing - from FreeSCI { 0x980CEAD3, SCI_VERSION(0, 000, 629), "Demo Quest" }, diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 02e92e7d11..dda8d54bc4 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -129,7 +129,7 @@ init_gamestate(state_t *gamestate, sci_version_t version) { } SciEngine::SciEngine(OSystem *syst, const SciGameDescription *desc) - : Engine(syst) { + : Engine(syst), _gameDescription(desc) { // Put your engine in a sane state, but do nothing big yet; // in particular, do not load data from files; rather, if you // need to do such things, do them from init(). @@ -141,7 +141,6 @@ SciEngine::SciEngine(OSystem *syst, const SciGameDescription *desc) // Set up the engine specific debug levels //Common::addSpecialDebugLevel(SCI_DEBUG_RESOURCES, "resources", "Debug the resources loading"); - _version = desc->version; printf("SciEngine::SciEngine\n"); } diff --git a/engines/sci/sci.h b/engines/sci/sci.h index 5b6919e4b2..57d140f01a 100644 --- a/engines/sci/sci.h +++ b/engines/sci/sci.h @@ -61,9 +61,15 @@ public: virtual Common::Error init(void); virtual Common::Error go(void); - int getVersion() { return _version; } + + const SciGameDescription *_gameDescription; + const char* getGameID() const; + uint16 getVersion() const; + Common::Language getLanguage() const; + Common::Platform getPlatform() const; + uint32 getFlags() const; + private: - int _version; //Console *_console; }; |