aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2011-03-12 17:21:55 +1100
committerPaul Gilbert2011-03-12 17:21:55 +1100
commit7e0d120ce18c7e2fb3d1a8b4f43679e97a8a89d9 (patch)
tree2fca500aeaa310a83ce810eb7fd7afa5c25f7d41
parent56db3c17a52973a5f5b0019fa8787d5987ae261c (diff)
downloadscummvm-rg350-7e0d120ce18c7e2fb3d1a8b4f43679e97a8a89d9.tar.gz
scummvm-rg350-7e0d120ce18c7e2fb3d1a8b4f43679e97a8a89d9.tar.bz2
scummvm-rg350-7e0d120ce18c7e2fb3d1a8b4f43679e97a8a89d9.zip
TSAGE: Separated out detection tables into the standard detection_tables.h
-rw-r--r--engines/tsage/detection.cpp87
-rw-r--r--engines/tsage/detection_tables.h78
-rw-r--r--engines/tsage/ringworld_logic.cpp2
-rw-r--r--engines/tsage/tsage.cpp2
-rw-r--r--engines/tsage/tsage.h16
5 files changed, 118 insertions, 67 deletions
diff --git a/engines/tsage/detection.cpp b/engines/tsage/detection.cpp
index 421c5ff9df..f2e61b0f84 100644
--- a/engines/tsage/detection.cpp
+++ b/engines/tsage/detection.cpp
@@ -33,82 +33,47 @@
#include "tsage/tsage.h"
-static const PlainGameDescriptor TSAgeGameTitles[] = {
- { "tsage", "Unknown Tsunami TSAGE-based Game" },
- { "ring", "Ringworld: Revenge of the Patriarch" },
- { "blue", "Blue Force" },
- { 0, 0 }
-};
-
namespace tSage {
-static const ADGameDescription TSAgeGameDescriptions[] = {
- // Ringworld English CD version
- {
- "ring",
- "CD",
- AD_ENTRY1s("ring.rlb", "466f0e6492d9d0f34d35c5cd088de90f", 37847618),
- Common::EN_ANY,
- Common::kPlatformPC,
- ADGF_NO_FLAGS,
- Common::GUIO_NONE
- },
- // Ringworld English Floppy version
- {
- "ring",
- "Floppy",
- AD_ENTRY1s("ring.rlb", "61f78f68a56832ae95fe06748c403234", 8438770),
- Common::EN_ANY,
- Common::kPlatformPC,
- ADGF_NO_FLAGS,
- Common::GUIO_NONE
- },
- // Blue Force
- {
- "blue",
- "",
- AD_ENTRY1s("blue.rlb", "467da43c848cc0e800b547c59d84ccb1", 10032614),
- Common::EN_ANY,
- Common::kPlatformPC,
- ADGF_NO_FLAGS,
- Common::GUIO_NONE
- },
-
- AD_TABLE_END_MARKER,
+struct tSageGameDescription {
+ ADGameDescription desc;
+
+ int gameID;
+ uint32 features;
};
const char *TSageEngine::getGameId() const {
- return _gameDescription->gameid;
+ return _gameDescription->desc.gameid;
+}
+
+uint32 TSageEngine::getGameID() const {
+ return _gameDescription->gameID;
+}
+
+uint32 TSageEngine::getFeatures() const {
+ return _gameDescription->features;
}
} // End of namespace tSage
-static const ADGameDescription TSAgeGameGeneric[] = {
- {"tsage", 0,
- AD_ENTRY1("tsage.rlb", NULL),
- Common::UNK_LANG,
- Common::kPlatformUnknown,
- 0,
- Common::GUIO_NONE
- },
- AD_TABLE_END_MARKER
+static const PlainGameDescriptor tSageGameTitles[] = {
+ { "tsage", "Unknown Tsunami TSAGE-based Game" },
+ { "ring", "Ringworld: Revenge of the Patriarch" },
+ { "blueforce", "Blue Force" },
+ { 0, 0 }
};
-static const ADFileBasedFallback TSAgeGameFallback[] = {
- {(const void*)&TSAgeGameGeneric[0], {"ring.rlb", NULL} },
- {(const void*)&TSAgeGameGeneric[0], {"blue.rlb", NULL} },
- {0, {NULL}}
-};
+#include "engines/tsage/detection_tables.h"
static const ADParams detectionParams = {
- (const byte *)tSage::TSAgeGameDescriptions,
- sizeof(ADGameDescription),
+ (const byte *)tSage::gameDescriptions,
+ sizeof(tSage::tSageGameDescription),
0,
- TSAgeGameTitles,
+ tSageGameTitles,
0,
"tsage",
- TSAgeGameFallback,
- kADFlagPrintWarningOnFileBasedFallback,
+ NULL,
+ NULL,
Common::GUIO_NONE,
0,
NULL
@@ -146,7 +111,7 @@ public:
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
if (desc) {
- *engine = new tSage::TSageEngine(syst, desc);
+ *engine = new tSage::TSageEngine(syst, (const tSage::tSageGameDescription *)desc);
}
return desc != 0;
}
diff --git a/engines/tsage/detection_tables.h b/engines/tsage/detection_tables.h
new file mode 100644
index 0000000000..eac11c3e07
--- /dev/null
+++ b/engines/tsage/detection_tables.h
@@ -0,0 +1,78 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+namespace tSage {
+
+static const tSageGameDescription gameDescriptions[] = {
+
+ // Ringworld English CD version
+ {
+ {
+ "ring",
+ "CD",
+ AD_ENTRY1s("ring.rlb", "466f0e6492d9d0f34d35c5cd088de90f", 37847618),
+ Common::EN_ANY,
+ Common::kPlatformPC,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+ GType_Ringworld,
+ GF_CD
+ },
+
+ // Ringworld English Floppy version
+ {
+ {
+ "ring",
+ "Floppy",
+ AD_ENTRY1s("ring.rlb", "61f78f68a56832ae95fe06748c403234", 8438770),
+ Common::EN_ANY,
+ Common::kPlatformPC,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+ GType_Ringworld,
+ GF_FLOPPY
+ },
+
+ // Blue Force
+ {
+ {
+ "blueforce",
+ "",
+ AD_ENTRY1s("blue.rlb", "467da43c848cc0e800b547c59d84ccb1", 10032614),
+ Common::EN_ANY,
+ Common::kPlatformPC,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+ GType_BlueForce,
+ GF_FLOPPY
+ },
+
+ { AD_TABLE_END_MARKER, 0, 0 }
+};
+
+} // End of namespace tSage
diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp
index 6f4d03230b..83806f28c7 100644
--- a/engines/tsage/ringworld_logic.cpp
+++ b/engines/tsage/ringworld_logic.cpp
@@ -90,6 +90,8 @@ Scene *SceneFactory::createScene(int sceneNumber) {
case 2280: return new Scene2280();
// Starcraft - Hanger Bay
case 2300: return new Scene2300();
+ // Starcraft - Copy Protection Screen
+ case 2310: return new Scene2310();
/* Scene group 4 */
diff --git a/engines/tsage/tsage.cpp b/engines/tsage/tsage.cpp
index 36c835ce8d..5a1d8d3f76 100644
--- a/engines/tsage/tsage.cpp
+++ b/engines/tsage/tsage.cpp
@@ -41,7 +41,7 @@ namespace tSage {
TSageEngine *_vm = NULL;
-TSageEngine::TSageEngine(OSystem *system, const ADGameDescription *gameDesc): Engine(system),
+TSageEngine::TSageEngine(OSystem *system, const tSageGameDescription *gameDesc): Engine(system),
_gameDescription(gameDesc) {
_vm = this;
DebugMan.addDebugChannel(kRingDebugScripts, "scripts", "Scripts debugging");
diff --git a/engines/tsage/tsage.h b/engines/tsage/tsage.h
index 0f5b75ae8a..2bb9e3803f 100644
--- a/engines/tsage/tsage.h
+++ b/engines/tsage/tsage.h
@@ -43,18 +43,22 @@
namespace tSage {
enum {
- GType_Ringworld = 0
+ GType_Ringworld = 0,
+ GType_BlueForce = 1
};
enum {
- GF_CD = 1 << 0,
- GF_LNGUNK = 1 << 15
+ GF_DEMO = 1 << 0,
+ GF_CD = 1 << 1,
+ GF_FLOPPY = 1 << 2
};
enum {
kRingDebugScripts = 1 << 0
};
+struct tSageGameDescription;
+
#define SCREEN_WIDTH 320
#define SCREEN_HEIGHT 200
#define SCREEN_CENTRE_X 160
@@ -62,9 +66,9 @@ enum {
class TSageEngine : public Engine {
private:
- const ADGameDescription *_gameDescription;
+ const tSageGameDescription *_gameDescription;
public:
- TSageEngine(OSystem *system, const ADGameDescription *gameDesc);
+ TSageEngine(OSystem *system, const tSageGameDescription *gameDesc);
~TSageEngine();
virtual bool hasFeature(EngineFeature f) const;
@@ -74,6 +78,8 @@ public:
RlbManager *_dataManager;
const char *getGameId() const;
+ uint32 getGameID() const;
+ uint32 getFeatures() const;
virtual Common::Error init();
virtual Common::Error run();