aboutsummaryrefslogtreecommitdiff
path: root/devtools/create_xeen/clouds.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2018-02-23 15:14:59 -0500
committerPaul Gilbert2018-02-23 15:23:21 -0500
commit6b4d3f70dd8f6b13dcf379c239363559e2a82278 (patch)
tree8d502da4cace04df4e861df5e311cafcd1257b79 /devtools/create_xeen/clouds.cpp
parentd132d66c2825cddf215b19d787a2797e8dbad8ed (diff)
downloadscummvm-rg350-6b4d3f70dd8f6b13dcf379c239363559e2a82278.tar.gz
scummvm-rg350-6b4d3f70dd8f6b13dcf379c239363559e2a82278.tar.bz2
scummvm-rg350-6b4d3f70dd8f6b13dcf379c239363559e2a82278.zip
XEEN: Add data to create_xeen for Clouds of Xeen on it's own
Diffstat (limited to 'devtools/create_xeen/clouds.cpp')
-rw-r--r--devtools/create_xeen/clouds.cpp82
1 files changed, 82 insertions, 0 deletions
diff --git a/devtools/create_xeen/clouds.cpp b/devtools/create_xeen/clouds.cpp
new file mode 100644
index 0000000000..2e41263bde
--- /dev/null
+++ b/devtools/create_xeen/clouds.cpp
@@ -0,0 +1,82 @@
+/* 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.
+ *
+ */
+
+ // Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
+// HACK to allow building with the SDL backend on MinGW
+// see bug #1800764 "TOOLS: MinGW tools building broken"
+#ifdef main
+#undef main
+#endif // main
+
+#include "file.h"
+#include "clouds.h"
+
+static const char *const MAP_NAMES[86] = {
+ "", "Area A1", "Area A2", "Area A3", "Area A4", "Area B1", "Area B2",
+ "Area B3", "Area B4", "Area C1", "Area C2", "Area C3", "Area C4",
+ "Area D1", "Area D2", "Area D3", "Area D4", "Area E1", "Area E2",
+ "Area E3", "Area E4", "Area F1", "Area F2", "Area F3", "Area F4",
+ "Witch Clouds", "High Magic Clouds", "Clouds of Xeen", "Vertigo",
+ "Nightshadow", "Rivercity", "Asp", "Winterkill", "Dwarf Mine 1",
+ "Dwarf Mine 2", "Dwarf Mine 3", "Dwarf Mine 4", "Dwarf Mine 5",
+ "Deep Mine Alpha", "Deep Mine Theta", "Deep Mine Kappa",
+ "Deep Mine Omega", "Cave of Illusion Level 1", "Cave of Illusion Level 2",
+ "Cave of Illusion Level 3", "Cave of Illusion Level 4",
+ "Volcano Cave Level 1", "Volcano Cave Level 2", "Volcano Cave Level 3",
+ "Shangri-La", "Dragon Cave", "Witch Tower Level 1", "Witch Tower Level 2",
+ "Witch Tower Level 3", "Witch Tower Level 4", "Tower of High Magic Level 1",
+ "Tower of High Magic Level 2", "Tower of High Magic Level 3",
+ "Tower of High Magic Level 4", "Darzog's Tower Level 1",
+ "Darzog's Tower Level 2", "Darzog's Tower Level 3", "Darzog's Tower Level 4",
+ "Burlock Dungeon", "Castle Burlock Level 1", "Castle Burlock Level 2",
+ "Castle Burlock Level 3", "Basenji Dungeon", "Castle Basenji Level 1",
+ "Castle Basenji Level 2", "Castle Basenji Level 3", "Newcastle Dungeon",
+ "Newcastle Foundation", "Newcastle Level 1", "Newcastle Level 2",
+ "Xeen's Castle Level 1", "Xeen's Castle Level 2", "Xeen's Castle Level 3",
+ "Xeen's Castle Level 4", "Ancient Temple of Yak", "Tomb of a 1000 Terrors",
+ "Golem Dungeon", "Sphinx Body", "Sphinx Head", "Sphinx Dungeon",
+ "The Warzone"
+};
+
+void writeCloudsData(CCArchive &cc, const char *darkName) {
+ Common::File darkFile;
+ if (darkFile.open(darkName, Common::kFileReadMode)) {
+ CCArchive darkCc(darkFile, kRead);
+
+ cc.add("mae.cld", darkCc.getMember("mae.xen"));
+ cc.add("spells.cld", darkCc.getMember("spells.xen"));
+ cc.add("animinfo.cld", darkCc.getMember("clouds.dat"));
+ cc.add("monsters.cld", darkCc.getMember("xeen.mon"));
+ cc.add("wallpics.cld", darkCc.getMember("xeenpic.dat"));
+
+ Common::MemFile mapNames;
+ for (int idx = 0; idx < 86; ++idx)
+ mapNames.syncString(MAP_NAMES[idx]);
+ cc.add("mapnames.cld", mapNames);
+
+ darkFile.close();
+ } else {
+ printf("Could not find %s to get Clouds data\n", darkName);
+ }
+}