From 4703c6e7991349fa06638076d6a9a37d6cf2d3a5 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 7 Sep 2016 22:21:01 +0200 Subject: DM: Remove GOTOs from processTimeline() --- engines/dm/timeline.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'engines/dm') diff --git a/engines/dm/timeline.cpp b/engines/dm/timeline.cpp index 5fc07b4a50..558ecc8cd7 100644 --- a/engines/dm/timeline.cpp +++ b/engines/dm/timeline.cpp @@ -315,10 +315,11 @@ void Timeline::processTimeline() { break; case k11_TMEventTypeEnableChampionAction: processEventEnableChampionAction(newEvent._priority); - if (newEvent._B._slotOrdinal) { + if (newEvent._B._slotOrdinal) processEventMoveWeaponFromQuiverToSlot(newEvent._priority, _vm->ordinalToIndex(newEvent._B._slotOrdinal)); - } - goto T0261048; + + _vm->_championMan->drawChampionState((ChampionIndex)newEvent._priority); + break; case k12_TMEventTypeHideDamageReceived: processEventHideDamageReceived(newEvent._priority); break; @@ -333,7 +334,6 @@ void Timeline::processTimeline() { case k72_TMEventTypeChampionShield: _vm->_championMan->_champions[newEvent._priority]._shieldDefense -= newEvent._B._defense; setFlag(_vm->_championMan->_champions[newEvent._priority]._attributes, k0x1000_ChampionAttributeStatusBox); -T0261048: _vm->_championMan->drawChampionState((ChampionIndex)newEvent._priority); break; case k73_TMEventTypeThievesEye: @@ -341,15 +341,16 @@ T0261048: break; case k74_TMEventTypePartyShield: _vm->_championMan->_party._shieldDefense -= newEvent._B._defense; -T0261053: refreshAllChampionStatusBoxes(); break; case k77_TMEventTypeSpellShield: _vm->_championMan->_party._spellShieldDefense -= newEvent._B._defense; - goto T0261053; + refreshAllChampionStatusBoxes(); + break; case k78_TMEventTypeFireShield: _vm->_championMan->_party._fireShieldDefense -= newEvent._B._defense; - goto T0261053; + refreshAllChampionStatusBoxes(); + break; case k75_TMEventTypePoisonChampion: { uint16 championIndex = newEvent._priority; _vm->_championMan->_champions[championIndex = newEvent._priority]._poisonEventCount--; -- cgit v1.2.3