aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen
diff options
context:
space:
mode:
authorPaul Gilbert2018-03-18 21:29:51 -0400
committerPaul Gilbert2018-03-18 21:29:51 -0400
commitc1b094bba830a4d1939bd61d0a929cd8f934d8fc (patch)
treeda931c0db03244b282e01224f269a5950fae263f /engines/xeen
parent500ed10658001ccb55578a59d245ee2bfda63385 (diff)
downloadscummvm-rg350-c1b094bba830a4d1939bd61d0a929cd8f934d8fc.tar.gz
scummvm-rg350-c1b094bba830a4d1939bd61d0a929cd8f934d8fc.tar.bz2
scummvm-rg350-c1b094bba830a4d1939bd61d0a929cd8f934d8fc.zip
XEEN: Fix spells list selection for Vertigo guild
Diffstat (limited to 'engines/xeen')
-rw-r--r--engines/xeen/dialogs/dialogs_spells.cpp4
-rw-r--r--engines/xeen/resources.cpp2
-rw-r--r--engines/xeen/resources.h2
-rw-r--r--engines/xeen/spells.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/engines/xeen/dialogs/dialogs_spells.cpp b/engines/xeen/dialogs/dialogs_spells.cpp
index d2b473086e..c17859cf79 100644
--- a/engines/xeen/dialogs/dialogs_spells.cpp
+++ b/engines/xeen/dialogs/dialogs_spells.cpp
@@ -284,7 +284,7 @@ const char *SpellsDialog::setSpellText(Character *c, int mode) {
if ((mode & 0x7f) == 0) {
if (category != SPELLCAT_INVALID) {
if (party._mazeId == 49 || party._mazeId == 37) {
- for (uint spellId = 0; spellId < 76; ++spellId) {
+ for (uint spellId = 0; spellId < TOTAL_SPELLS; ++spellId) {
int idx = 0;
while (idx < CHAR_MAX_SPELLS && Res.SPELLS_ALLOWED[category][idx] != (int)spellId)
++idx;
@@ -319,7 +319,7 @@ const char *SpellsDialog::setSpellText(Character *c, int mode) {
} else {
for (int spellId = 0; spellId < 20; ++spellId) {
int idx = 0;
- while (Res.CLOUDS_SPELL_OFFSETS[party._mazeId - 29][spellId] !=
+ while (Res.CLOUDS_GUILD_SPELLS[party._mazeId - 28][spellId] !=
(int)Res.SPELLS_ALLOWED[category][idx] && idx < SPELLS_PER_CLASS)
++idx;
diff --git a/engines/xeen/resources.cpp b/engines/xeen/resources.cpp
index dcedf198d5..45e0989644 100644
--- a/engines/xeen/resources.cpp
+++ b/engines/xeen/resources.cpp
@@ -182,7 +182,7 @@ void Resources::loadData() {
file.syncString(GUILD_OPTIONS);
file.syncNumbers((int *)MISC_SPELL_INDEX, 74);
file.syncNumbers((int *)SPELL_COSTS, 77);
- file.syncNumbers2D((int *)CLOUDS_SPELL_OFFSETS, 5, 20);
+ 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.syncNumbers((int *)SPELL_GEM_COST, 77);
diff --git a/engines/xeen/resources.h b/engines/xeen/resources.h
index 2dc564d432..08aa90e665 100644
--- a/engines/xeen/resources.h
+++ b/engines/xeen/resources.h
@@ -236,7 +236,7 @@ public:
const char *GUILD_OPTIONS;
int MISC_SPELL_INDEX[74];
int SPELL_COSTS[77];
- int CLOUDS_SPELL_OFFSETS[5][20];
+ int CLOUDS_GUILD_SPELLS[5][20];
int DARK_SPELL_OFFSETS[3][39];
int DARK_SPELL_RANGES[12][2];
int SPELL_LEVEL_OFFSETS[3][39];
diff --git a/engines/xeen/spells.h b/engines/xeen/spells.h
index a333ea2f5f..24e9dd1f57 100644
--- a/engines/xeen/spells.h
+++ b/engines/xeen/spells.h
@@ -56,7 +56,7 @@ enum MagicSpell {
MS_SuppressDisease = 67, MS_SuppressPoison = 68, MS_Teleport = 69,
MS_TimeDistortion = 70, MS_TownPortal = 71, MS_ToxicCloud = 72,
MS_TurnUndead = 73, MS_WalkOnWater = 74, MS_WizardEye = 75,
- NO_SPELL = 76
+ NO_SPELL = 76, TOTAL_SPELLS = 76
};
class Spells {