diff options
author | Eugene Sandulenko | 2007-01-24 23:13:00 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2007-01-24 23:13:00 +0000 |
commit | 3d8e290f3ce0591f1cda00f9344a47e5ee9aad0c (patch) | |
tree | 10ae72b0698610aae10bc176d06d2f64b01593ed /engines/saga | |
parent | 3a74dedb5717a7151979dc0a77b60cb8448f8e8e (diff) | |
download | scummvm-rg350-3d8e290f3ce0591f1cda00f9344a47e5ee9aad0c.tar.gz scummvm-rg350-3d8e290f3ce0591f1cda00f9344a47e5ee9aad0c.tar.bz2 scummvm-rg350-3d8e290f3ce0591f1cda00f9344a47e5ee9aad0c.zip |
Sync with last AdvancedDetector changes
svn-id: r25167
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/game.cpp | 40 | ||||
-rw-r--r-- | engines/saga/sagagame.cpp | 2 |
2 files changed, 23 insertions, 19 deletions
diff --git a/engines/saga/game.cpp b/engines/saga/game.cpp index 76f16591b4..36113e022f 100644 --- a/engines/saga/game.cpp +++ b/engines/saga/game.cpp @@ -85,28 +85,40 @@ const Common::ADGameFileDescription *SagaEngine::getFilesDescriptions() const { static GameList GAME_detectGames(const FSList &fslist); } -static const PlainGameDescriptor saga_games[] = { +static const PlainGameDescriptor sagaGames[] = { {"ite", "Inherit the Earth: Quest for the Orb"}, {"ihnm", "I Have No Mouth and I Must Scream"}, {0, 0} }; -ADVANCED_DETECTOR_DEFINE_PLUGIN(SAGA, Saga::SagaEngine, Saga::GAME_detectGames, saga_games, 0); +namespace Saga { + +#include "sagagame.cpp" + +} +static const Common::ADParams detectionParams = { + // Pointer to ADGameDescription or its superset structure + (const byte *)Saga::gameDescriptions, + // Size of that superset structure + sizeof(Saga::SAGAGameDescription), + // Number of bytes to compute MD5 sum for + 5000, + // List of all engine targets + sagaGames, + // Structure for autoupgrading obsolete targets + 0 +}; + +ADVANCED_DETECTOR_DEFINE_PLUGIN(SAGA, Saga::SagaEngine, Saga::GAME_detectGames, detectionParams); REGISTER_PLUGIN(SAGA, "SAGA Engine", "Inherit the Earth (C) Wyrmkeep Entertainment"); namespace Saga { -#include "sagagame.cpp" - bool SagaEngine::initGame() { - int i = Common::ADVANCED_DETECTOR_DETECT_INIT_GAME( - (const byte *)gameDescriptions, - sizeof(SAGAGameDescription), - FILE_MD5_BYTES, - saga_games - ); + int i = Common::ADVANCED_DETECTOR_DETECT_INIT_GAME(detectionParams); + _gameDescription = &gameDescriptions[i]; _gameDisplayInfo = *_gameDescription->gameDisplayInfo; @@ -117,13 +129,7 @@ bool SagaEngine::initGame() { } GameList GAME_detectGames(const FSList &fslist) { - return Common::ADVANCED_DETECTOR_DETECT_GAMES_FUNCTION( - fslist, - (const byte *)gameDescriptions, - sizeof(SAGAGameDescription), - FILE_MD5_BYTES, - saga_games - ); + return Common::ADVANCED_DETECTOR_DETECT_GAMES_FUNCTION(fslist, detectionParams); } } // End of namespace Saga diff --git a/engines/saga/sagagame.cpp b/engines/saga/sagagame.cpp index 00548cc54a..f549d65b3a 100644 --- a/engines/saga/sagagame.cpp +++ b/engines/saga/sagagame.cpp @@ -560,8 +560,6 @@ static const GameSoundInfo IHNM_GameSound = { true }; -#define FILE_MD5_BYTES 5000 - static const SAGAGameDescription gameDescriptions[] = { // Inherit the earth - DOS Demo version // sound unchecked |