[Scummvm-git-logs] scummvm master -> 461171ced17993aec5ec6ff6dacaf5057870eb62

dreammaster dreammaster at scummvm.org
Sat Apr 28 02:45:36 CEST 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
461171ced1 XEEN: Move some few overlooked strings and spell array into xeen.ccs


Commit: 461171ced17993aec5ec6ff6dacaf5057870eb62
    https://github.com/scummvm/scummvm/commit/461171ced17993aec5ec6ff6dacaf5057870eb62
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-04-27T20:45:20-04:00

Commit Message:
XEEN: Move some few overlooked strings and spell array into xeen.ccs

Changed paths:
  R engines/xeen/worldofxeen/worldofxeen_resources.cpp
  R engines/xeen/worldofxeen/worldofxeen_resources.h
    devtools/create_xeen/constants.cpp
    dists/engine-data/xeen.ccs
    engines/xeen/dialogs/dialogs_spells.cpp
    engines/xeen/module.mk
    engines/xeen/resources.cpp
    engines/xeen/resources.h
    engines/xeen/worldofxeen/clouds_cutscenes.cpp
    engines/xeen/worldofxeen/darkside_cutscenes.cpp


diff --git a/devtools/create_xeen/constants.cpp b/devtools/create_xeen/constants.cpp
index 65903f5..92e0d1f 100644
--- a/devtools/create_xeen/constants.cpp
+++ b/devtools/create_xeen/constants.cpp
@@ -1043,6 +1043,12 @@ const int DARK_SPELL_RANGES[12][2] = {
 	{ 0, 20 }, { 16, 35 }, { 27, 37 }, { 29, 39 }
 };
 
+const int SWORDS_SPELL_RANGES[12][2] = {
+	{ 0, 20 },{ 16, 35 },{ 27, 39 },{ 29, 39 },
+	{ 0, 17 },{ 14, 34 },{ 26, 39 },{ 29, 39 },
+	{ 0, 20 },{ 16, 35 },{ 27, 39 },{ 29, 39 }
+};
+
 const int CLOUDS_GUILD_SPELLS[5][20] = {
 	{
 		1, 10, 20, 26, 27, 38, 40, 42, 45, 50,
@@ -1936,6 +1942,38 @@ const char *const DIFFICULTY_TEXT = "\v000\t000\x3""cSelect Game Preference";
 const char *const SAVE_OFF_LIMITS = "\x3""c\v002\t000The Gods of Game Restoration deem this area off limits!\n"
 	"Sorry, no saving in this maze.";
 
+const char *const CLOUDS_INTRO1 = "\f00\v082\t040\x3"
+	"cKing Burlock\v190\t040Peasants\v082\t247"
+	"Lord Xeen\v190\t258Xeen's Pet\v179\t150Crodo";
+
+const char *const 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 DARKSIDE_ENDING2 = "\n"
+	"Adventurers,\n"
+	"\n"
+	"I will save your game in Castleview.\n"
+	"\n"
+	"The World of Xeen still needs you!\n"
+	"\n"
+	"Load your game afterwards and come visit me in the "
+	"Great Pyramid for further instructions";
+
+const char *const PHAROAH_ENDING_TEXT1 = "\fd\v001\t001%s\x3" "c\t000\v180Press a Key!\x3" "l";
+const char *const PHAROAH_ENDING_TEXT2 = "\f04\v000\t000%s\x3" "c\t000\v180Press a Key!\x3" "l\fd";
+
+
 void writeConstants(CCArchive &cc) {
 	Common::MemFile file;
 	file.syncString(CLOUDS_CREDITS);
@@ -2062,6 +2100,7 @@ void writeConstants(CCArchive &cc) {
 	file.syncNumbers2D((const int *)CLOUDS_GUILD_SPELLS, 5, 20);
 	file.syncNumbers2D((const int *)DARK_SPELL_OFFSETS, 3, 39);
 	file.syncNumbers2D((const int *)DARK_SPELL_RANGES, 12, 2);
+	file.syncNumbers2D((const int *)SWORDS_SPELL_RANGES, 12, 2);
 	file.syncNumbers((const int *)SPELL_GEM_COST, 77);
 	file.syncString(NOT_A_SPELL_CASTER);
 	file.syncString(SPELLS_LEARNED_ALL);
@@ -2277,6 +2316,11 @@ void writeConstants(CCArchive &cc) {
 	file.syncStrings2D((const char *const *)MUSIC_FILES2, 6, 7);
 	file.syncString(DIFFICULTY_TEXT);
 	file.syncString(SAVE_OFF_LIMITS);
+	file.syncString(CLOUDS_INTRO1);
+	file.syncString(DARKSIDE_ENDING1);
+	file.syncString(DARKSIDE_ENDING2);
+	file.syncString(PHAROAH_ENDING_TEXT1);
+	file.syncString(PHAROAH_ENDING_TEXT2);
 
 	cc.add("CONSTANTS", file);
 }
diff --git a/dists/engine-data/xeen.ccs b/dists/engine-data/xeen.ccs
index f917961..d4c6dd6 100644
Binary files a/dists/engine-data/xeen.ccs and b/dists/engine-data/xeen.ccs differ
diff --git a/engines/xeen/dialogs/dialogs_spells.cpp b/engines/xeen/dialogs/dialogs_spells.cpp
index 1e7dc75..bc53134 100644
--- a/engines/xeen/dialogs/dialogs_spells.cpp
+++ b/engines/xeen/dialogs/dialogs_spells.cpp
@@ -30,14 +30,6 @@
 
 namespace Xeen {
 
-// FIXME: This new array for Swords isn't worth regenerating the xeen.ccs file over, but it could be
-// moved in if there's any cause in future to regenerate the file for other reasons
-const int SWORDS_SPELL_RANGES[12][2] = {
-	{ 0, 20 }, { 16, 35 }, { 27, 39 }, { 29, 39 },
-	{ 0, 17 }, { 14, 34 }, { 26, 39 }, { 29, 39 },
-	{ 0, 20 }, { 16, 35 }, { 27, 39 }, {29, 39 }
-};
-
 Character *SpellsDialog::show(XeenEngine *vm, ButtonContainer *priorDialog,
 		Character *c, SpellDialogMode mode) {
 	SpellsDialog *dlg = new SpellsDialog(vm);
@@ -341,7 +333,7 @@ const char *SpellsDialog::setSpellText(Character *c, int mode) {
 						groupIndex = 0;
 						break;
 					}
-					RANGE = SWORDS_SPELL_RANGES[category * 4 + groupIndex];
+					RANGE = Res.SWORDS_SPELL_RANGES[category * 4 + groupIndex];
 				} else {
 					int groupIndex = (party._mazeId - 29) / 2;
 					RANGE = Res.DARK_SPELL_RANGES[category * 4 + groupIndex];
diff --git a/engines/xeen/module.mk b/engines/xeen/module.mk
index 6609168..5b3f697 100644
--- a/engines/xeen/module.mk
+++ b/engines/xeen/module.mk
@@ -6,7 +6,6 @@ MODULE_OBJS := \
 	worldofxeen/worldofxeen_cutscenes.o \
 	worldofxeen/worldofxeen_menu.o \
 	worldofxeen/worldofxeen.o \
-	worldofxeen/worldofxeen_resources.o \
 	swordsofxeen/swordsofxeen.o \
 	swordsofxeen/swordsofxeen_menu.o \
 	dialogs/credits_screen.o \
diff --git a/engines/xeen/resources.cpp b/engines/xeen/resources.cpp
index fbb0a06..513b1b7 100644
--- a/engines/xeen/resources.cpp
+++ b/engines/xeen/resources.cpp
@@ -24,7 +24,6 @@
 #include "xeen/resources.h"
 #include "xeen/files.h"
 #include "xeen/xeen.h"
-#include "xeen/worldofxeen/worldofxeen_resources.h"
 
 namespace Xeen {
 
@@ -186,6 +185,7 @@ void Resources::loadData() {
 	file.syncNumbers2D((int *)CLOUDS_GUILD_SPELLS, 5, 20);
 	file.syncNumbers2D((int *)DARK_SPELL_OFFSETS, 3, 39);
 	file.syncNumbers2D((int *)DARK_SPELL_RANGES, 12, 2);
+	file.syncNumbers2D((int *)SWORDS_SPELL_RANGES, 12, 2);
 	file.syncNumbers((int *)SPELL_GEM_COST, 77);
 	file.syncString(NOT_A_SPELL_CASTER);
 	file.syncString(SPELLS_LEARNED_ALL);
@@ -401,6 +401,11 @@ void Resources::loadData() {
 	file.syncStrings2D(&MUSIC_FILES2[0][0], 6, 7);
 	file.syncString(DIFFICULTY_TEXT);
 	file.syncString(SAVE_OFF_LIMITS);
+	file.syncString(CLOUDS_INTRO1);
+	file.syncString(DARKSIDE_ENDING1);
+	file.syncString(DARKSIDE_ENDING2);
+	file.syncString(PHAROAH_ENDING_TEXT1);
+	file.syncString(PHAROAH_ENDING_TEXT2);
 }
 
 } // End of namespace Xeen
diff --git a/engines/xeen/resources.h b/engines/xeen/resources.h
index 7ce2d29..f141a2e 100644
--- a/engines/xeen/resources.h
+++ b/engines/xeen/resources.h
@@ -240,6 +240,7 @@ public:
 	int CLOUDS_GUILD_SPELLS[5][20];
 	int DARK_SPELL_OFFSETS[3][39];
 	int DARK_SPELL_RANGES[12][2];
+	int SWORDS_SPELL_RANGES[12][2];
 	int SPELL_GEM_COST[77];
 	const char *NOT_A_SPELL_CASTER;
 	const char *SPELLS_LEARNED_ALL;
@@ -455,6 +456,11 @@ public:
 	const char *MUSIC_FILES2[6][7];
 	const char *DIFFICULTY_TEXT;
 	const char *SAVE_OFF_LIMITS;
+	const char *CLOUDS_INTRO1;
+	const char *DARKSIDE_ENDING1;
+	const char *DARKSIDE_ENDING2;
+	const char *PHAROAH_ENDING_TEXT1;
+	const char *PHAROAH_ENDING_TEXT2;
 public:
 	/**
 	 * Constructor
diff --git a/engines/xeen/worldofxeen/clouds_cutscenes.cpp b/engines/xeen/worldofxeen/clouds_cutscenes.cpp
index 5c64ade..8af4fbc 100644
--- a/engines/xeen/worldofxeen/clouds_cutscenes.cpp
+++ b/engines/xeen/worldofxeen/clouds_cutscenes.cpp
@@ -21,7 +21,6 @@
  */
 
 #include "xeen/worldofxeen/clouds_cutscenes.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 d7f821f..ef5c1df 100644
--- a/engines/xeen/worldofxeen/darkside_cutscenes.cpp
+++ b/engines/xeen/worldofxeen/darkside_cutscenes.cpp
@@ -24,7 +24,6 @@
 #include "xeen/xeen.h"
 #include "xeen/worldofxeen/darkside_cutscenes.h"
 #include "xeen/worldofxeen/worldofxeen.h"
-#include "xeen/worldofxeen/worldofxeen_resources.h"
 
 #define WAIT(TIME) if (_subtitles.wait(TIME)) return false
 
diff --git a/engines/xeen/worldofxeen/worldofxeen_resources.cpp b/engines/xeen/worldofxeen/worldofxeen_resources.cpp
deleted file mode 100644
index f0d35c9..0000000
--- a/engines/xeen/worldofxeen/worldofxeen_resources.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/* 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 {
-
-// FIXME: These should really go into into the xeen.ccs datafile
-const char *const WorldOfXeenResources::CLOUDS_INTRO1 = "\f00\v082\t040\x3"
-	"cKing Burlock\v190\t040Peasants\v082\t247"
-	"Lord Xeen\v190\t258Xeen's Pet\v179\t150Crodo";
-
-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 will save your game in Castleview.\n"
-	"\n"
-	"The World of Xeen still needs you!\n"
-	"\n"
-	"Load your game afterwards and come visit me in the "
-	"Great Pyramid for further instructions";
-
-const char *const WorldOfXeenResources::PHAROAH_ENDING_TEXT1 = "\fd\v001\t001%s\x3" "c\t000\v180Press a Key!\x3" "l";
-const char *const WorldOfXeenResources::PHAROAH_ENDING_TEXT2 = "\f04\v000\t000%s\x3" "c\t000\v180Press a Key!\x3" "l\fd";
-
-} // End of namespace WorldOfXeen
-} // End of namespace Xeen
diff --git a/engines/xeen/worldofxeen/worldofxeen_resources.h b/engines/xeen/worldofxeen/worldofxeen_resources.h
deleted file mode 100644
index e69f520..0000000
--- a/engines/xeen/worldofxeen/worldofxeen_resources.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* 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;
-};
-
-} // End of namespace WorldOfXeen
-} // End of namespace Xeen
-
-#endif	/* XEEN_RESOURCES_H */





More information about the Scummvm-git-logs mailing list