diff options
author | Eugene Sandulenko | 2007-01-24 22:42:44 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2007-01-24 22:42:44 +0000 |
commit | 318210ad962ec294b5d74f8f1d81a9e845e2696f (patch) | |
tree | d9361ae2cd4ac4c266ae0ce13d2847baf124392a /engines/agi | |
parent | edd2422a55caeb5a46ee240feaea70a5aa4a4da2 (diff) | |
download | scummvm-rg350-318210ad962ec294b5d74f8f1d81a9e845e2696f.tar.gz scummvm-rg350-318210ad962ec294b5d74f8f1d81a9e845e2696f.tar.bz2 scummvm-rg350-318210ad962ec294b5d74f8f1d81a9e845e2696f.zip |
Add optional size parameter to ADGameFileDescription. Not used now.
svn-id: r25164
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/detection.cpp | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index a5e320631d..305db31f53 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -57,14 +57,9 @@ static const PlainGameDescriptor agiGames[] = { {0, 0} }; -ADVANCED_DETECTOR_DEFINE_PLUGIN(AGI, Agi::AgiEngine, Agi::GAME_detectGames, agiGames, 0); - -REGISTER_PLUGIN(AGI, "AGI v2 + v3 Engine", "Sierra AGI Engine (C) Sierra On-Line Software"); - namespace Agi { -#define FILE_MD5_BYTES 5000 #define FANMADE_LV(name,md5,lang,ver) { \ { \ "agi", \ @@ -961,28 +956,39 @@ static const AGIGameDescription gameDescriptions[] = { FANMADE("Voodoo Girl - Queen of the Darned (v1.2 2002 Mar 29)", "11d0417b7b886f963d0b36789dac4c8f"), FANMADE("Wizaro (v0.1)", "abeec1eda6eaf8dbc52443ea97ff140c"), - { { NULL, NULL, {NULL, 0, NULL}, Common::UNK_LANG, Common::kPlatformUnknown }, 0, 0, 0 } + { { NULL, NULL, {NULL, 0, NULL, 0}, Common::UNK_LANG, Common::kPlatformUnknown }, 0, 0, 0 } +}; + +} + +static const Common::ADParams detectionParams = { + // Pointer to ADGameDescription or its superset structure + (const byte *)Agi::gameDescriptions, + // Size of that superset structure + sizeof(Agi::AGIGameDescription), + // Number of bytes to compute MD5 sum for + 5000, + // List of all engine targets + agiGames, + // Structure for autoupgrading obsolete targets + 0 }; +ADVANCED_DETECTOR_DEFINE_PLUGIN(AGI, Agi::AgiEngine, Agi::GAME_detectGames, detectionParams); + +REGISTER_PLUGIN(AGI, "AGI v2 + v3 Engine", "Sierra AGI Engine (C) Sierra On-Line Software"); + +namespace Agi { + bool AgiEngine::initGame() { - int i = Common::ADVANCED_DETECTOR_DETECT_INIT_GAME( - (const byte *)gameDescriptions, - sizeof(AGIGameDescription), - FILE_MD5_BYTES, - agiGames - ); + int i = Common::ADVANCED_DETECTOR_DETECT_INIT_GAME(detectionParams); + _gameDescription = &gameDescriptions[i]; return true; } GameList GAME_detectGames(const FSList &fslist) { - return Common::ADVANCED_DETECTOR_DETECT_GAMES_FUNCTION( - fslist, - (const byte *)gameDescriptions, - sizeof(AGIGameDescription), - FILE_MD5_BYTES, - agiGames - ); + return Common::ADVANCED_DETECTOR_DETECT_GAMES_FUNCTION(fslist, detectionParams); } } // End of namespace Agi |