[Scummvm-cvs-logs] SF.net SVN: scummvm: [25154] scummvm/trunk/engines/agos
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Jan 21 17:57:13 CET 2007
Revision: 25154
http://scummvm.svn.sourceforge.net/scummvm/?rev=25154&view=rev
Author: fingolfin
Date: 2007-01-21 08:57:13 -0800 (Sun, 21 Jan 2007)
Log Message:
-----------
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)
Modified Paths:
--------------
scummvm/trunk/engines/agos/agos.h
scummvm/trunk/engines/agos/game.cpp
scummvm/trunk/engines/agos/script_ff.cpp
Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h 2007-01-21 16:34:18 UTC (rev 25153)
+++ scummvm/trunk/engines/agos/agos.h 2007-01-21 16:57:13 UTC (rev 25154)
@@ -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,14 +118,8 @@
GType_PP = 7
};
-struct AGOSGameDescription {
- Common::ADGameDescription desc;
+struct AGOSGameDescription;
- int gameType;
- int gameId;
- uint32 features;
-};
-
struct GameSpecificSettings;
class Debugger;
@@ -175,18 +167,13 @@
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);
Modified: scummvm/trunk/engines/agos/game.cpp
===================================================================
--- scummvm/trunk/engines/agos/game.cpp 2007-01-21 16:34:18 UTC (rev 25153)
+++ scummvm/trunk/engines/agos/game.cpp 2007-01-21 16:57:13 UTC (rev 25154)
@@ -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 @@
);
}
+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
Modified: scummvm/trunk/engines/agos/script_ff.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_ff.cpp 2007-01-21 16:34:18 UTC (rev 25153)
+++ scummvm/trunk/engines/agos/script_ff.cpp 2007-01-21 16:57:13 UTC (rev 25154)
@@ -232,9 +232,9 @@
// 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)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list