aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen
diff options
context:
space:
mode:
Diffstat (limited to 'engines/xeen')
-rw-r--r--engines/xeen/module.mk1
-rw-r--r--engines/xeen/resources.cpp45
-rw-r--r--engines/xeen/resources.h14
-rw-r--r--engines/xeen/worldofxeen/clouds_cutscenes.cpp2
-rw-r--r--engines/xeen/worldofxeen/darkside_cutscenes.cpp6
-rw-r--r--engines/xeen/worldofxeen/worldofxeen_resources.cpp62
-rw-r--r--engines/xeen/worldofxeen/worldofxeen_resources.h50
-rw-r--r--engines/xeen/xeen.cpp2
8 files changed, 138 insertions, 44 deletions
diff --git a/engines/xeen/module.mk b/engines/xeen/module.mk
index 968a30c23d..400e273cb6 100644
--- a/engines/xeen/module.mk
+++ b/engines/xeen/module.mk
@@ -4,6 +4,7 @@ MODULE_OBJS := \
worldofxeen/clouds_cutscenes.o \
worldofxeen/darkside_cutscenes.o \
worldofxeen/worldofxeen.o \
+ worldofxeen/worldofxeen_resources.o \
character.o \
combat.o \
cutscenes.o \
diff --git a/engines/xeen/resources.cpp b/engines/xeen/resources.cpp
index e3d720c85a..b2d8c6d495 100644
--- a/engines/xeen/resources.cpp
+++ b/engines/xeen/resources.cpp
@@ -23,11 +23,23 @@
#include "common/scummsys.h"
#include "xeen/resources.h"
#include "xeen/files.h"
+#include "xeen/xeen.h"
+#include "xeen/worldofxeen/worldofxeen_resources.h"
namespace Xeen {
Resources *g_resources;
+Resources *Resources::init(XeenEngine *vm) {
+ if (vm->getGameID() == GType_Clouds || vm->getGameID() == GType_DarkSide
+ || vm->getGameID() == GType_WorldOfXeen)
+ g_resources = new WorldOfXeen::WorldOfXeenResources();
+ else
+ g_resources = new Resources();
+
+ return g_resources;
+}
+
Resources::Resources() {
g_resources = this;
_globalSprites.load("global.icn");
@@ -1591,37 +1603,4 @@ const char *const Resources::EVENT_SAMPLES[6] = {
"ahh.voc", "whereto.voc", "gulp.voc", "null.voc", "scream.voc", "laff1.voc"
};
-const char *const Resources::CLOUDS_INTRO1 = "\xC" "00\xB" "082\x9" "040\x3"
- "cKing Burlock\xB" "190\x9" "040Peasants\xB" "082\x9" "247"
- "Lord Xeen\xB" "190\x9" "258Xeen's Pet\xB" "179\x9" "150Crodo";
-
-const char *const Resources::DARKSIDE_ENDING1 = "\n\x3" "cCongratulations\n"
- "\n"
- "Your Final Score is:\n"
- "\n"
- "%010lu\n"
- "\x3" "l\n"
- "Please send this score to the Ancient's Headquarters "
- "where you'll be added to the Hall of Legends!\n"
- "\n"
- "Ancient's Headquarters\n"
- "New World Computing, Inc.\n"
- "P.O. Box 4302\n"
- "Hollywood, CA 90078";
-
-const char *const Resources::DARKSIDE_ENDING2 = "\n"
- "Adventurers,\n"
- "\n"
- "I have saved your game in Castleview.\n"
- "\n"
- "The World of Xeen still needs you!\n"
- "\n"
- "Load your game and come visit me in the Great Pyramid "
- "for further instructions";
-
-const char *const Resources::PHAROAH_ENDING_TEXT1 = "\xC" "d\xB"
- "001\x9" "001%s\x3" "c\x9" "000\xB" "180Press a Key!\x3" "l";
-const char *const Resources::PHAROAH_ENDING_TEXT2 = "\xC" "04\xB"
- "000\x9" "000%s\x3" "c\x9" "000\xB" "180Press a Key!\x3" "l\xC" "d";
-
} // End of namespace Xeen
diff --git a/engines/xeen/resources.h b/engines/xeen/resources.h
index 232de88af6..1ca6c62453 100644
--- a/engines/xeen/resources.h
+++ b/engines/xeen/resources.h
@@ -33,7 +33,11 @@ namespace Xeen {
#define Res (*g_resources)
+class XeenEngine;
+
class Resources {
+protected:
+ Resources();
public:
SpriteResource _globalSprites;
Common::StringArray _maeNames; // Magic and equipment names
@@ -338,13 +342,11 @@ public:
static const char *const MONSTER_SPECIAL_ATTACKS[23];
static const char *const IDENTIFY_MONSTERS;
static const char *const EVENT_SAMPLES[6];
- static const char *const CLOUDS_INTRO1;
- static const char *const DARKSIDE_ENDING1;
- static const char *const DARKSIDE_ENDING2;
- static const char *const PHAROAH_ENDING_TEXT1;
- static const char *const PHAROAH_ENDING_TEXT2;
public:
- Resources();
+ /**
+ * Initializes an instnace of the resources
+ */
+ static Resources *init(XeenEngine *vm);
};
extern Resources *g_resources;
diff --git a/engines/xeen/worldofxeen/clouds_cutscenes.cpp b/engines/xeen/worldofxeen/clouds_cutscenes.cpp
index 2c8d5f0c38..74fabe507b 100644
--- a/engines/xeen/worldofxeen/clouds_cutscenes.cpp
+++ b/engines/xeen/worldofxeen/clouds_cutscenes.cpp
@@ -21,7 +21,7 @@
*/
#include "xeen/worldofxeen/clouds_cutscenes.h"
-#include "xeen/resources.h"
+#include "xeen/worldofxeen/worldofxeen_resources.h"
#include "xeen/sound.h"
namespace Xeen {
diff --git a/engines/xeen/worldofxeen/darkside_cutscenes.cpp b/engines/xeen/worldofxeen/darkside_cutscenes.cpp
index f3bae10f45..e40fee680f 100644
--- a/engines/xeen/worldofxeen/darkside_cutscenes.cpp
+++ b/engines/xeen/worldofxeen/darkside_cutscenes.cpp
@@ -20,11 +20,11 @@
*
*/
-#include "xeen/worldofxeen/darkside_cutscenes.h"
-#include "xeen/worldofxeen/worldofxeen.h"
-#include "xeen/resources.h"
#include "xeen/sound.h"
#include "xeen/xeen.h"
+#include "xeen/worldofxeen/darkside_cutscenes.h"
+#include "xeen/worldofxeen/worldofxeen.h"
+#include "xeen/worldofxeen/worldofxeen_resources.h"
namespace Xeen {
namespace WorldOfXeen {
diff --git a/engines/xeen/worldofxeen/worldofxeen_resources.cpp b/engines/xeen/worldofxeen/worldofxeen_resources.cpp
new file mode 100644
index 0000000000..fec30158e9
--- /dev/null
+++ b/engines/xeen/worldofxeen/worldofxeen_resources.cpp
@@ -0,0 +1,62 @@
+/* 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.
+ *
+ */
+
+#include "xeen/worldofxeen/worldofxeen_resources.h"
+
+namespace Xeen {
+namespace WorldOfXeen {
+
+const char *const WorldOfXeenResources::CLOUDS_INTRO1 = "\xC" "00\xB" "082\x9" "040\x3"
+ "cKing Burlock\xB" "190\x9" "040Peasants\xB" "082\x9" "247"
+ "Lord Xeen\xB" "190\x9" "258Xeen's Pet\xB" "179\x9" "150Crodo";
+
+const char *const WorldOfXeenResources::DARKSIDE_ENDING1 = "\n\x3" "cCongratulations\n"
+ "\n"
+ "Your Final Score is:\n"
+ "\n"
+ "%010lu\n"
+ "\x3" "l\n"
+ "Please send this score to the Ancient's Headquarters "
+ "where you'll be added to the Hall of Legends!\n"
+ "\n"
+ "Ancient's Headquarters\n"
+ "New World Computing, Inc.\n"
+ "P.O. Box 4302\n"
+ "Hollywood, CA 90078";
+
+const char *const WorldOfXeenResources::DARKSIDE_ENDING2 = "\n"
+ "Adventurers,\n"
+ "\n"
+ "I have saved your game in Castleview.\n"
+ "\n"
+ "The World of Xeen still needs you!\n"
+ "\n"
+ "Load your game and come visit me in the Great Pyramid "
+ "for further instructions";
+
+const char *const WorldOfXeenResources::PHAROAH_ENDING_TEXT1 = "\xC" "d\xB"
+ "001\x9" "001%s\x3" "c\x9" "000\xB" "180Press a Key!\x3" "l";
+const char *const WorldOfXeenResources::PHAROAH_ENDING_TEXT2 = "\xC" "04\xB"
+ "000\x9" "000%s\x3" "c\x9" "000\xB" "180Press a Key!\x3" "l\xC" "d";
+
+} // End of namespace WorldOfXeen
+} // End of namespace Xeen
diff --git a/engines/xeen/worldofxeen/worldofxeen_resources.h b/engines/xeen/worldofxeen/worldofxeen_resources.h
new file mode 100644
index 0000000000..18a8df6f7f
--- /dev/null
+++ b/engines/xeen/worldofxeen/worldofxeen_resources.h
@@ -0,0 +1,50 @@
+/* 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.
+ *
+ */
+
+#ifndef XEEN_WORLDOFXEEN_RESOURCES_H
+#define XEEN_WORLDOFXEEN_RESOURCES_H
+
+#include "xeen/resources.h"
+
+namespace Xeen {
+namespace WorldOfXeen {
+
+#ifdef Res
+#undef Res
+#endif
+#define Res (*(WorldOfXeenResources *)g_resources)
+
+class WorldOfXeenResources : public Resources {
+public:
+ static const char *const CLOUDS_INTRO1;
+ static const char *const DARKSIDE_ENDING1;
+ static const char *const DARKSIDE_ENDING2;
+ static const char *const PHAROAH_ENDING_TEXT1;
+ static const char *const PHAROAH_ENDING_TEXT2;
+};
+
+extern Resources *g_resources;
+
+} // End of namespace WorldOfXeen
+} // End of namespace Xeen
+
+#endif /* XEEN_RESOURCES_H */
diff --git a/engines/xeen/xeen.cpp b/engines/xeen/xeen.cpp
index a04ab80f84..493ffbf129 100644
--- a/engines/xeen/xeen.cpp
+++ b/engines/xeen/xeen.cpp
@@ -89,7 +89,7 @@ XeenEngine::~XeenEngine() {
void XeenEngine::initialize() {
// Create sub-objects of the engine
_files = new FileManager(this);
- _resources = new Resources();
+ _resources = Resources::init(this);
_combat = new Combat(this);
_debugger = new Debugger(this);
_events = new EventsManager(this);