aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorMax Horn2006-03-09 14:33:07 +0000
committerMax Horn2006-03-09 14:33:07 +0000
commit6db0289f3032a3df3200210a4a2a173fd9805858 (patch)
tree41d02e84cd4b47959031acc4b555f1123702d0b8 /engines/saga
parent6b988a51bde099d5080be96aaefaa19edf59a8d9 (diff)
downloadscummvm-rg350-6db0289f3032a3df3200210a4a2a173fd9805858.tar.gz
scummvm-rg350-6db0289f3032a3df3200210a4a2a173fd9805858.tar.bz2
scummvm-rg350-6db0289f3032a3df3200210a4a2a173fd9805858.zip
Moved SAGA plugin interface code from saga.cpp to game.cpp
svn-id: r21181
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/game.cpp42
-rw-r--r--engines/saga/saga.cpp40
-rw-r--r--engines/saga/saga.h3
3 files changed, 42 insertions, 43 deletions
diff --git a/engines/saga/game.cpp b/engines/saga/game.cpp
index 9a2d85f68d..68becbcca3 100644
--- a/engines/saga/game.cpp
+++ b/engines/saga/game.cpp
@@ -49,6 +49,48 @@
#define IHNM_CONVERSE_TEXT_LINES 10
namespace Saga {
+static DetectedGameList GAME_ProbeGame(const FSList &fslist, int **matches = NULL);
+}
+
+static const PlainGameDescriptor saga_games[] = {
+ {"ite", "Inherit the Earth: Quest for the Orb"},
+ {"ihnm", "I Have No Mouth and I Must Scream"},
+ {0, 0}
+};
+
+GameList Engine_SAGA_gameIDList() {
+ GameList games;
+ const PlainGameDescriptor *g = saga_games;
+
+ while (g->gameid) {
+ games.push_back(*g);
+ g++;
+ }
+
+ return games;
+}
+
+GameDescriptor Engine_SAGA_findGameID(const char *gameid) {
+ const PlainGameDescriptor *g = saga_games;
+ while (g->gameid) {
+ if (0 == scumm_stricmp(gameid, g->gameid))
+ break;
+ g++;
+ }
+ return *g;
+}
+
+DetectedGameList Engine_SAGA_detectGames(const FSList &fslist) {
+ return Saga::GAME_ProbeGame(fslist);
+}
+
+Engine *Engine_SAGA_create(GameDetector *detector, OSystem *syst) {
+ return new Saga::SagaEngine(detector, syst);
+}
+
+REGISTER_PLUGIN(SAGA, "SAGA Engine")
+
+namespace Saga {
static int detectGame(const FSList &fslist, bool mode = false, int start = -1);
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index b81c151456..208893b20e 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -24,8 +24,6 @@
#include "common/stdafx.h"
#include "base/gameDetector.h"
-#include "base/plugins.h"
-#include "backends/fs/fs.h"
#include "common/file.h"
#include "common/config-manager.h"
@@ -56,44 +54,6 @@
#include "saga/objectmap.h"
#include "saga/resnames.h"
-static const PlainGameDescriptor saga_games[] = {
- {"ite", "Inherit the Earth: Quest for the Orb"},
- {"ihnm", "I Have No Mouth and I Must Scream"},
- {0, 0}
-};
-
-GameList Engine_SAGA_gameIDList() {
- GameList games;
- const PlainGameDescriptor *g = saga_games;
-
- while (g->gameid) {
- games.push_back(*g);
- g++;
- }
-
- return games;
-}
-
-GameDescriptor Engine_SAGA_findGameID(const char *gameid) {
- const PlainGameDescriptor *g = saga_games;
- while (g->gameid) {
- if (0 == scumm_stricmp(gameid, g->gameid))
- break;
- g++;
- }
- return *g;
-}
-
-DetectedGameList Engine_SAGA_detectGames(const FSList &fslist) {
- return Saga::GAME_ProbeGame(fslist);
-}
-
-Engine *Engine_SAGA_create(GameDetector *detector, OSystem *syst) {
- return new Saga::SagaEngine(detector, syst);
-}
-
-REGISTER_PLUGIN(SAGA, "SAGA Engine")
-
namespace Saga {
#define MAX_TIME_DELTA 100
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index c4f9967284..ef38895352 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -26,7 +26,6 @@
#define SAGA_H
#include "base/engine.h"
-#include "base/plugins.h"
#include "common/stream.h"
@@ -563,8 +562,6 @@ inline uint16 objectIndexToId(int type, int index) {
}
-DetectedGameList GAME_ProbeGame(const FSList &fslist, int **matches = NULL);
-
class SagaEngine : public Engine {
friend class Scene;