From 461171ced17993aec5ec6ff6dacaf5057870eb62 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 27 Apr 2018 20:45:20 -0400 Subject: XEEN: Move some few overlooked strings and spell array into xeen.ccs --- engines/xeen/dialogs/dialogs_spells.cpp | 10 +--- engines/xeen/module.mk | 1 - engines/xeen/resources.cpp | 7 ++- engines/xeen/resources.h | 6 +++ engines/xeen/worldofxeen/clouds_cutscenes.cpp | 1 - engines/xeen/worldofxeen/darkside_cutscenes.cpp | 1 - engines/xeen/worldofxeen/worldofxeen_resources.cpp | 61 ---------------------- engines/xeen/worldofxeen/worldofxeen_resources.h | 48 ----------------- 8 files changed, 13 insertions(+), 122 deletions(-) delete mode 100644 engines/xeen/worldofxeen/worldofxeen_resources.cpp delete mode 100644 engines/xeen/worldofxeen/worldofxeen_resources.h (limited to 'engines/xeen') diff --git a/engines/xeen/dialogs/dialogs_spells.cpp b/engines/xeen/dialogs/dialogs_spells.cpp index 1e7dc75d5a..bc5313410f 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 66091681b2..5b3f69710f 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 fbb0a063a3..513b1b7986 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 7ce2d295e6..f141a2eb75 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 5c64ade6d0..8af4fbcc66 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 d7f821fe6b..ef5c1df157 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 f0d35c9090..0000000000 --- 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 e69f52028d..0000000000 --- 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 */ -- cgit v1.2.3