diff options
author | Max Horn | 2007-01-21 16:57:13 +0000 |
---|---|---|
committer | Max Horn | 2007-01-21 16:57:13 +0000 |
commit | 44cbf4996b7a26832e566bfada4d186643056234 (patch) | |
tree | 0ecbed3664cbdd69401d4b89a3a9478f642047ff | |
parent | 0a9276092fbd946f82a2ea7440d68f2fdaf33cc3 (diff) | |
download | scummvm-rg350-44cbf4996b7a26832e566bfada4d186643056234.tar.gz scummvm-rg350-44cbf4996b7a26832e566bfada4d186643056234.tar.bz2 scummvm-rg350-44cbf4996b7a26832e566bfada4d186643056234.zip |
Removed common/advancedDetector.h from agos.h, thus reducing the number of build deps on base/plugins.h and base/game.h from about 155 to 113 (and also reducing the deps on advancedDetector.h, of course). The same should be done to all other engines using the advanced detector (AGI, CINE, SAGA, Parallaction)
svn-id: r25154
-rw-r--r-- | engines/agos/agos.h | 29 | ||||
-rw-r--r-- | engines/agos/game.cpp | 42 | ||||
-rw-r--r-- | engines/agos/script_ff.cpp | 4 |
3 files changed, 52 insertions, 23 deletions
diff --git a/engines/agos/agos.h b/engines/agos/agos.h index 043ab9709b..48df0472f6 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -34,8 +34,6 @@ #include "agos/sound.h" #include "agos/vga.h" -#include "common/advancedDetector.h" - namespace AGOS { /* Enable and set to zone number number to dump */ @@ -120,13 +118,7 @@ enum SIMONGameType { GType_PP = 7 }; -struct AGOSGameDescription { - Common::ADGameDescription desc; - - int gameType; - int gameId; - uint32 features; -}; +struct AGOSGameDescription; struct GameSpecificSettings; @@ -175,18 +167,13 @@ public: bool initGame(void); void setupGame(); - int getGameId() const { return _gameDescription->gameId; } - int getGameType() const { return _gameDescription->gameType; } - uint32 getFeatures() const { return _gameDescription->features; } - Common::Language getLanguage() const { return _gameDescription->desc.language; } - Common::Platform getPlatform() const { return _gameDescription->desc.platform; } - const char *getFileName(int type) const { - for (int i = 0; _gameDescription->desc.filesDescriptions[i].fileType; i++) { - if (_gameDescription->desc.filesDescriptions[i].fileType == type) - return _gameDescription->desc.filesDescriptions[i].fileName; - } - return NULL; - } + int getGameId() const; + int getGameType() const; + uint32 getFeatures() const; + const char *getExtra() const; + Common::Language getLanguage() const; + Common::Platform getPlatform() const; + const char *getFileName(int type) const; protected: void playSting(uint a); diff --git a/engines/agos/game.cpp b/engines/agos/game.cpp index 545b1800d3..d2e0e496c9 100644 --- a/engines/agos/game.cpp +++ b/engines/agos/game.cpp @@ -25,6 +25,7 @@ #include "base/plugins.h" +#include "common/advancedDetector.h" #include "common/config-manager.h" #include "common/file.h" #include "common/fs.h" @@ -32,6 +33,15 @@ #include "agos/agos.h" namespace AGOS { + +struct AGOSGameDescription { + Common::ADGameDescription desc; + + int gameType; + int gameId; + uint32 features; +}; + static GameList GAME_detectGames(const FSList &fslist); } @@ -98,4 +108,36 @@ GameList GAME_detectGames(const FSList &fslist) { ); } +int AGOSEngine::getGameId() const { + return _gameDescription->gameId; +} + +int AGOSEngine::getGameType() const { + return _gameDescription->gameType; +} + +uint32 AGOSEngine::getFeatures() const { + return _gameDescription->features; +} + +const char *AGOSEngine::getExtra() const { + return _gameDescription->desc.extra; +} + +Common::Language AGOSEngine::getLanguage() const { + return _gameDescription->desc.language; +} + +Common::Platform AGOSEngine::getPlatform() const { + return _gameDescription->desc.platform; +} + +const char *AGOSEngine::getFileName(int type) const { + for (int i = 0; _gameDescription->desc.filesDescriptions[i].fileType; i++) { + if (_gameDescription->desc.filesDescriptions[i].fileType == type) + return _gameDescription->desc.filesDescriptions[i].fileName; + } + return NULL; +} + } // End of namespace AGOS diff --git a/engines/agos/script_ff.cpp b/engines/agos/script_ff.cpp index cf5d57ec70..59c42c94ed 100644 --- a/engines/agos/script_ff.cpp +++ b/engines/agos/script_ff.cpp @@ -232,9 +232,9 @@ void AGOSEngine::off_checkCD() { // 135: switch CD uint disc = readVariable(97); - if (!strcmp(_gameDescription->desc.extra, "4CD")) { + if (!strcmp(getExtra(), "4CD")) { _sound->switchVoiceFile(gss, disc); - } else if (!strcmp(_gameDescription->desc.extra, "2CD")) { + } else if (!strcmp(getExtra(), "2CD")) { if (disc == 1 || disc == 2) _sound->switchVoiceFile(gss, 1); else if (disc == 3 || disc == 4) |