diff options
author | Paul Gilbert | 2018-03-17 20:27:42 -0400 |
---|---|---|
committer | Paul Gilbert | 2018-03-17 20:27:42 -0400 |
commit | 22456b345f4b39558cfc07ccd2e06ab6cfb98850 (patch) | |
tree | bb0e31433f624843f6addd563db48726be68dbaf /engines/xeen/dialogs/dialogs_spells.cpp | |
parent | 562522e14414db68b77595de84d856c39e6cf00d (diff) | |
download | scummvm-rg350-22456b345f4b39558cfc07ccd2e06ab6cfb98850.tar.gz scummvm-rg350-22456b345f4b39558cfc07ccd2e06ab6cfb98850.tar.bz2 scummvm-rg350-22456b345f4b39558cfc07ccd2e06ab6cfb98850.zip |
XEEN: Change bool _isDarkCc to int _ccNum
Originally the flag was whether the party was on the Dark Side,
but as a bool I was having to cast it to an int side/cc number in
more and more places. So now I've converted it to _ccNum, and it
can be used directly as an int
Diffstat (limited to 'engines/xeen/dialogs/dialogs_spells.cpp')
-rw-r--r-- | engines/xeen/dialogs/dialogs_spells.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/xeen/dialogs/dialogs_spells.cpp b/engines/xeen/dialogs/dialogs_spells.cpp index 2996cb7e94..9148c41a07 100644 --- a/engines/xeen/dialogs/dialogs_spells.cpp +++ b/engines/xeen/dialogs/dialogs_spells.cpp @@ -46,7 +46,7 @@ Character *SpellsDialog::execute(ButtonContainer *priorDialog, Character *c, int Sound &sound = *_vm->_sound; Spells &spells = *_vm->_spells; Windows &windows = *_vm->_windows; - bool isDarkCc = _vm->_files->_isDarkCc; + int ccNum = _vm->_files->_ccNum; loadButtons(); int castingCopy = isCasting; @@ -61,7 +61,7 @@ Character *SpellsDialog::execute(ButtonContainer *priorDialog, Character *c, int if (!c->guildMember()) { sound.stopSound(); intf._overallFrame = 5; - sound.playSound(isDarkCc ? "skull1.voc" : "guild11.voc", 1); + sound.playSound(ccNum ? "skull1.voc" : "guild11.voc", 1); break; } @@ -240,7 +240,7 @@ Character *SpellsDialog::execute(ButtonContainer *priorDialog, Character *c, int c->_spells[spellIndex] = true; sound.stopSound(); intf._overallFrame = 0; - sound.playSound(isDarkCc ? "guild12.voc" : "parrot2.voc", 1); + sound.playSound(ccNum ? "guild12.voc" : "parrot2.voc", 1); } else { sound.playFX(21); } @@ -308,7 +308,7 @@ void SpellsDialog::loadButtons() { const char *SpellsDialog::setSpellText(Character *c, int isCasting) { Party &party = *_vm->_party; Spells &spells = *_vm->_spells; - bool isDarkCc = _vm->_files->_isDarkCc; + int ccNum = _vm->_files->_ccNum; int expenseFactor = 0; int currLevel = c->getCurrentLevel(); int category; @@ -358,7 +358,7 @@ const char *SpellsDialog::setSpellText(Character *c, int isCasting) { } } } - } else if (isDarkCc) { + } else if (ccNum) { int groupIndex = (party._mazeId - 29) / 2; for (int spellId = Res.DARK_SPELL_RANGES[groupIndex][0]; spellId < Res.DARK_SPELL_RANGES[groupIndex][1]; ++spellId) { @@ -797,14 +797,14 @@ bool LloydsBeacon::execute() { Sound &sound = *_vm->_sound; Windows &windows = *_vm->_windows; Window &w = windows[10]; - bool isDarkCc = _vm->_files->_isDarkCc; + int ccNum = _vm->_files->_ccNum; Character &c = *combat._oldCharacter; loadButtons(); if (!c._lloydMap) { // No destination previously set, so have a default ready - if (isDarkCc) { + if (ccNum) { c._lloydSide = 1; c._lloydPosition = Common::Point(25, 21); c._lloydMap = 29; @@ -846,12 +846,12 @@ bool LloydsBeacon::execute() { switch (_buttonValue) { case Common::KEYCODE_r: - if (!isDarkCc && c._lloydMap >= 75 && c._lloydMap <= 78 && !party._cloudsEnd) { + if (!ccNum && c._lloydMap >= 75 && c._lloydMap <= 78 && !party._cloudsEnd) { result = false; } else { sound.playFX(51); - map._loadDarkSide = isDarkCc; - if (c._lloydMap != party._mazeId || c._lloydSide != (isDarkCc ? 1 : 0)) { + map._loadDarkSide = ccNum; + if (c._lloydMap != party._mazeId || c._lloydSide != ccNum) { map.load(c._lloydMap); } @@ -866,7 +866,7 @@ bool LloydsBeacon::execute() { sound.playFX(20); c._lloydMap = party._mazeId; c._lloydPosition = party._mazePosition; - c._lloydSide = isDarkCc ? 1 : 0; + c._lloydSide = ccNum; _buttonValue = Common::KEYCODE_ESCAPE; break; |