diff options
author | Strangerke | 2016-09-04 08:56:14 +0200 |
---|---|---|
committer | Strangerke | 2016-09-04 08:56:14 +0200 |
commit | f81093168eac63168544ab3ce952cd4dae749396 (patch) | |
tree | 3accf3a101566e33cf7874f3279c79a49f649a21 /engines/dm/menus.cpp | |
parent | 4eeeea2c8d8cacbc52da370a54021913dcd37e0f (diff) | |
download | scummvm-rg350-f81093168eac63168544ab3ce952cd4dae749396.tar.gz scummvm-rg350-f81093168eac63168544ab3ce952cd4dae749396.tar.bz2 scummvm-rg350-f81093168eac63168544ab3ce952cd4dae749396.zip |
DM: Rework getClickOnSpellCastResult
Diffstat (limited to 'engines/dm/menus.cpp')
-rw-r--r-- | engines/dm/menus.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp index 17c08a4daa..f615c7b969 100644 --- a/engines/dm/menus.cpp +++ b/engines/dm/menus.cpp @@ -440,9 +440,9 @@ void MenuMan::drawEnabledMenus() { ChampionIndex casterChampionIndex = _vm->_championMan->_magicCasterChampionIndex; _vm->_championMan->_magicCasterChampionIndex = kM1_ChampionNone; /* Force next function to draw the spell area */ setMagicCasterAndDrawSpellArea(casterChampionIndex); - if (!_vm->_championMan->_actingChampionOrdinal) { + if (!_vm->_championMan->_actingChampionOrdinal) _actionAreaContainsIcons = true; - } + drawActionArea(); int16 AL1462_i_InventoryChampionOrdinal = _vm->_inventoryMan->_inventoryChampionOrdinal; if (AL1462_i_InventoryChampionOrdinal) { @@ -457,22 +457,20 @@ void MenuMan::drawEnabledMenus() { } int16 MenuMan::getClickOnSpellCastResult() { - int16 L1259_i_SpellCastResult; - Champion *L1260_ps_Champion; - - - L1260_ps_Champion = &_vm->_championMan->_champions[_vm->_championMan->_magicCasterChampionIndex]; + Champion *casterChampion = &_vm->_championMan->_champions[_vm->_championMan->_magicCasterChampionIndex]; _vm->_eventMan->showMouse(); _vm->_eventMan->highlightBoxDisable(); - if ((L1259_i_SpellCastResult = getChampionSpellCastResult(_vm->_championMan->_magicCasterChampionIndex)) != k3_spellCastFailureNeedsFlask) { - L1260_ps_Champion->_symbols[0] = '\0'; - drawAvailableSymbols(L1260_ps_Champion->_symbolStep = 0); - drawChampionSymbols(L1260_ps_Champion); - } else { - L1259_i_SpellCastResult = k0_spellCastFailure; - } + + int16 spellCastResult = getChampionSpellCastResult(_vm->_championMan->_magicCasterChampionIndex); + if (spellCastResult != k3_spellCastFailureNeedsFlask) { + casterChampion->_symbols[0] = '\0'; + drawAvailableSymbols(casterChampion->_symbolStep = 0); + drawChampionSymbols(casterChampion); + } else + spellCastResult = k0_spellCastFailure; + _vm->_eventMan->hideMouse(); - return L1259_i_SpellCastResult; + return spellCastResult; } int16 MenuMan::getChampionSpellCastResult(uint16 champIndex) { |