diff options
author | Paul Gilbert | 2018-03-18 21:29:51 -0400 |
---|---|---|
committer | Paul Gilbert | 2018-03-18 21:29:51 -0400 |
commit | c1b094bba830a4d1939bd61d0a929cd8f934d8fc (patch) | |
tree | da931c0db03244b282e01224f269a5950fae263f | |
parent | 500ed10658001ccb55578a59d245ee2bfda63385 (diff) | |
download | scummvm-rg350-c1b094bba830a4d1939bd61d0a929cd8f934d8fc.tar.gz scummvm-rg350-c1b094bba830a4d1939bd61d0a929cd8f934d8fc.tar.bz2 scummvm-rg350-c1b094bba830a4d1939bd61d0a929cd8f934d8fc.zip |
XEEN: Fix spells list selection for Vertigo guild
-rw-r--r-- | devtools/create_xeen/constants.cpp | 4 | ||||
-rw-r--r-- | engines/xeen/dialogs/dialogs_spells.cpp | 4 | ||||
-rw-r--r-- | engines/xeen/resources.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/resources.h | 2 | ||||
-rw-r--r-- | engines/xeen/spells.h | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/devtools/create_xeen/constants.cpp b/devtools/create_xeen/constants.cpp index b001a224e9..9075ed568c 100644 --- a/devtools/create_xeen/constants.cpp +++ b/devtools/create_xeen/constants.cpp @@ -1037,7 +1037,7 @@ const int DARK_SPELL_RANGES[12][2] = { { 0, 20 }, { 16, 35 }, { 27, 37 }, { 29, 39 } }; -const int CLOUDS_SPELL_OFFSETS[5][20] = { +const int CLOUDS_GUILD_SPELLS[5][20] = { { 1, 10, 20, 26, 27, 38, 40, 42, 45, 50, 55, 59, 60, 61, 62, 68, 72, 75, 77, 77 @@ -2002,7 +2002,7 @@ void writeConstants(CCArchive &cc) { file.syncString(GUILD_OPTIONS); file.syncNumbers((const int *)MISC_SPELL_INDEX, 74); file.syncNumbers((const int *)SPELL_COSTS, 77); - file.syncNumbers2D((const int *)CLOUDS_SPELL_OFFSETS, 5, 20); + 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.syncNumbers((const int *)SPELL_GEM_COST, 77); 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 { |