diff options
author | Eugene Sandulenko | 2008-06-02 05:56:53 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2008-06-02 05:56:53 +0000 |
commit | aaf8b5810c4e4c689e31cef8c03dd5fc1b3ad519 (patch) | |
tree | 22a0d8503821689d3272e67b988cf2c1ed8bb90d /engines/drascula | |
parent | 4352bd1d88a0481b70ff9dcdc74193a95cea8a7c (diff) | |
download | scummvm-rg350-aaf8b5810c4e4c689e31cef8c03dd5fc1b3ad519.tar.gz scummvm-rg350-aaf8b5810c4e4c689e31cef8c03dd5fc1b3ad519.tar.bz2 scummvm-rg350-aaf8b5810c4e4c689e31cef8c03dd5fc1b3ad519.zip |
Proper detection for packed German and French versions. Removed unneeded code.
svn-id: r32489
Diffstat (limited to 'engines/drascula')
-rw-r--r-- | engines/drascula/detection.cpp | 96 | ||||
-rw-r--r-- | engines/drascula/drascula.cpp | 5 | ||||
-rw-r--r-- | engines/drascula/drascula.h | 8 |
3 files changed, 15 insertions, 94 deletions
diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp index 172f73291e..358a2bc1c3 100644 --- a/engines/drascula/detection.cpp +++ b/engines/drascula/detection.cpp @@ -36,28 +36,13 @@ namespace Drascula { struct DrasculaGameDescription { Common::ADGameDescription desc; - int gameID; - int gameType; uint32 features; - uint16 version; }; -uint32 DrasculaEngine::getGameID() const { - return _gameDescription->gameID; -} - uint32 DrasculaEngine::getFeatures() const { return _gameDescription->features; } -Common::Platform DrasculaEngine::getPlatform() const { - return _gameDescription->desc.platform; -} - -uint16 DrasculaEngine::getVersion() const { - return _gameDescription->version; -} - Common::Language DrasculaEngine::getLanguage() const { return _gameDescription->desc.language; } @@ -85,9 +70,6 @@ static const DrasculaGameDescription gameDescriptions[] = { Common::ADGF_NO_FLAGS }, 0, - 0, - 0, - 0, }, { @@ -100,10 +82,7 @@ static const DrasculaGameDescription gameDescriptions[] = { Common::kPlatformPC, Common::ADGF_NO_FLAGS }, - 0, - 0, - 0, - 0, + GF_PACKED, }, { @@ -111,15 +90,16 @@ static const DrasculaGameDescription gameDescriptions[] = { { "drascula", 0, - AD_ENTRY1s("packet.003", "e8f4dc6091037329bab4ddb1cba35807", 719728), + { + {"packet.001", 0, "c6a8697396e213a18472542d5f547cb4", 32847563}, + {"packet.003", 0, "e8f4dc6091037329bab4ddb1cba35807", 719728}, + {NULL, 0, NULL, 0} + }, Common::DE_DEU, Common::kPlatformPC, Common::ADGF_NO_FLAGS }, - 0, - 0, - 0, - 0, + GF_PACKED, }, { @@ -127,15 +107,16 @@ static const DrasculaGameDescription gameDescriptions[] = { { "drascula", 0, - AD_ENTRY1s("packet.002", "4401123400f22f212b89f15fb4b43013", 721122), + { + {"packet.001", 0, "c6a8697396e213a18472542d5f547cb4", 32847563}, + {"packet.003", 0, "4401123400f22f212b89f15fb4b43013", 721122}, + {NULL, 0, NULL, 0} + }, Common::FR_FRA, Common::kPlatformPC, Common::ADGF_NO_FLAGS }, - 0, - 0, - 0, - 0, + GF_PACKED, }, { @@ -149,9 +130,6 @@ static const DrasculaGameDescription gameDescriptions[] = { Common::ADGF_NO_FLAGS }, 0, - 0, - 0, - 0, }, { @@ -165,9 +143,6 @@ static const DrasculaGameDescription gameDescriptions[] = { Common::ADGF_NO_FLAGS }, 0, - 0, - 0, - 0, }, { @@ -181,9 +156,6 @@ static const DrasculaGameDescription gameDescriptions[] = { Common::ADGF_NO_FLAGS }, 0, - 0, - 0, - 0, }, { @@ -197,31 +169,9 @@ static const DrasculaGameDescription gameDescriptions[] = { Common::ADGF_NO_FLAGS }, 0, - 0, - 0, - 0, }, - { AD_TABLE_END_MARKER, 0, 0, 0, 0 } -}; - -/** - * The fallback game descriptor used by the Drascula engine's fallbackDetector. - * Contents of this struct are to be overwritten by the fallbackDetector. - */ -static DrasculaGameDescription g_fallbackDesc = { - { - "", - "", - AD_ENTRY1(0, 0), // This should always be AD_ENTRY1(0, 0) in the fallback descriptor - Common::UNK_LANG, - Common::kPlatformPC, - Common::ADGF_NO_FLAGS - }, - 0, - 0, - 0, - 0, + { AD_TABLE_END_MARKER, 0, } }; } // End of namespace Drascula @@ -258,9 +208,6 @@ public: } virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const; - - const Common::ADGameDescription *fallbackDetect(const FSList *fslist) const; - }; bool DrasculaMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const { @@ -271,21 +218,6 @@ bool DrasculaMetaEngine::createInstance(OSystem *syst, Engine **engine, const Co return gd != 0; } -const Common::ADGameDescription *DrasculaMetaEngine::fallbackDetect(const FSList *fslist) const { - // Set the default values for the fallback descriptor's ADGameDescription part. - Drascula::g_fallbackDesc.desc.language = Common::UNK_LANG; - Drascula::g_fallbackDesc.desc.platform = Common::kPlatformPC; - Drascula::g_fallbackDesc.desc.flags = Common::ADGF_NO_FLAGS; - - // Set default values for the fallback descriptor's DrasculaGameDescription part. - Drascula::g_fallbackDesc.gameID = 0; - Drascula::g_fallbackDesc.features = 0; - Drascula::g_fallbackDesc.version = 0; - - //return (const Common::ADGameDescription *)&Drascula::g_fallbackDesc; - return NULL; -} - #if PLUGIN_ENABLED_DYNAMIC(DRASCULA) REGISTER_PLUGIN_DYNAMIC(DRASCULA, PLUGIN_TYPE_ENGINE, DrasculaMetaEngine); #else diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index b9e3354dec..513581eb13 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -60,11 +60,6 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam const GameSettings *g; - const char *gameid = ConfMan.get("gameid").c_str(); - for (g = drasculaSettings; g->gameid; ++g) - if (!scumm_stricmp(g->gameid, gameid)) - _gameId = g->id; - _rnd = new Common::RandomSource(); syst->getEventManager()->registerRandomSource(*_rnd, "drascula"); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index cca8f50be0..4f9a487a6b 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -47,6 +47,7 @@ namespace Drascula { enum DrasculaGameFeatures { + GF_PACKED = (1 << 0) }; enum Languages { @@ -144,7 +145,6 @@ static const int interf_x[] ={ 1, 65, 129, 193, 1, 65, 129 }; static const int interf_y[] ={ 51, 51, 51, 51, 83, 83, 83 }; class DrasculaEngine : public ::Engine { - int _gameId; Common::KeyState _keyPressed; protected: @@ -155,16 +155,10 @@ protected: public: DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gameDesc); virtual ~DrasculaEngine(); - int getGameId() { - return _gameId; - } Common::RandomSource *_rnd; const DrasculaGameDescription *_gameDescription; - uint32 getGameID() const; uint32 getFeatures() const; - uint16 getVersion() const; - Common::Platform getPlatform() const; Common::Language getLanguage() const; void updateEvents(); |