Skip to content

Commit

Permalink
DM: Add f254_timelineProcessEvent12_hideDamageReceived
Browse files Browse the repository at this point in the history
  • Loading branch information
Bendegúz Nagy committed Aug 26, 2016
1 parent c620292 commit 639fd36
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
24 changes: 22 additions & 2 deletions engines/dm/timeline.cpp
Expand Up @@ -33,6 +33,7 @@
#include "projexpl.h"
#include "movesens.h"
#include "text.h"
#include "eventman.h"


namespace DM {
Expand Down Expand Up @@ -332,7 +333,7 @@ void Timeline::f261_processTimeline() {
}
goto T0261048;
case k12_TMEventTypeHideDamageReceived:
//F0254_TIMELINE_ProcessEvent12_HideDamageReceived(L0682_s_Event._priority);
f254_timelineProcessEvent12_hideDamageReceived(L0682_s_Event._priority);
break;
case k70_TMEventTypeLight:
_vm->_dungeonMan->f173_setCurrentMap(_vm->_dungeonMan->_g309_partyMapIndex);
Expand Down Expand Up @@ -973,9 +974,28 @@ void Timeline::f259_timelineProcessEvent11Part2_moveWeaponFromQuiverToSlot(uint1
bool Timeline::f258_timelineHasWeaponMovedSlot(int16 champIndex, Champion* champ, uint16 sourceSlotIndex, int16 destSlotIndex) {
if (Thing(champ->_slots[sourceSlotIndex]).getType() == k5_WeaponThingType) {
_vm->_championMan->f301_addObjectInSlot((ChampionIndex)champIndex, _vm->_championMan->f300_getObjectRemovedFromSlot(champIndex, sourceSlotIndex),
(ChampionSlot)destSlotIndex);
(ChampionSlot)destSlotIndex);
return true;
}
return false;
}

void Timeline::f254_timelineProcessEvent12_hideDamageReceived(uint16 champIndex) {
Champion* L0663_ps_Champion;


L0663_ps_Champion = &_vm->_championMan->_gK71_champions[champIndex];
L0663_ps_Champion->_hideDamageReceivedIndex = -1;
if (!L0663_ps_Champion->_currHealth) {
return;
}
if (_vm->M0_indexToOrdinal(champIndex) == _vm->_inventoryMan->_g432_inventoryChampionOrdinal) {
_vm->_eventMan->f78_showMouse();
_vm->_inventoryMan->f354_drawStatusBoxPortrait((ChampionIndex)champIndex);
_vm->_eventMan->f77_hideMouse();
} else {
setFlag(L0663_ps_Champion->_attributes, k0x0080_ChampionAttributeNameTitle);
_vm->_championMan->f292_drawChampionState((ChampionIndex)champIndex);
}
}
}
1 change: 1 addition & 0 deletions engines/dm/timeline.h
Expand Up @@ -183,6 +183,7 @@ class Timeline {
uint16 slotIndex);// @ F0259_TIMELINE_ProcessEvent11Part2_MoveWeaponFromQuiverToSlot
bool f258_timelineHasWeaponMovedSlot(int16 champIndex, Champion *champ,
uint16 sourceSlotIndex, int16 destSlotIndex); // @ F0258_TIMELINE_HasWeaponMovedToSlot
void f254_timelineProcessEvent12_hideDamageReceived(uint16 champIndex); // @ F0254_TIMELINE_ProcessEvent12_HideDamageReceived
};


Expand Down

0 comments on commit 639fd36

Please sign in to comment.