aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/agos/agos.h29
-rw-r--r--engines/agos/game.cpp42
-rw-r--r--engines/agos/script_ff.cpp4
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)