DM: Add f260_timelineRefreshAllChampionStatusBoxes

This commit is contained in:
Bendegúz Nagy 2016-07-12 08:36:53 +02:00
parent f7e4486d84
commit 800100e2bc
4 changed files with 19 additions and 1 deletions

View file

@ -1189,6 +1189,13 @@ bool ChampionMan::f294_isAmmunitionCompatibleWithWeapon(uint16 champIndex, uint1
return ((L0878_T_Thing.getType() == k5_WeaponThingType) && (L0875_ps_WeaponInfo->_class == L0879_i_WeaponClass));
}
void ChampionMan::f293_drawAllChampionStates() {
int16 L0873_i_ChampionIndex;
for (L0873_i_ChampionIndex = k0_ChampionFirst; L0873_i_ChampionIndex < _vm->_championMan->_g305_partyChampionCount; L0873_i_ChampionIndex++) {
_vm->_championMan->f292_drawChampionState((ChampionIndex)L0873_i_ChampionIndex);
}
}
ChampionIndex ChampionMan::f285_getIndexInCell(int16 cell) {
for (uint16 i = 0; i < _g305_partyChampionCount; ++i) {
if ((_gK71_champions[i]._cell == cell) && _gK71_champions[i]._currHealth)

View file

@ -523,6 +523,7 @@ public:
int16 f310_getMovementTicks(Champion *champ); // @ F0310_CHAMPION_GetMovementTicks
bool f294_isAmmunitionCompatibleWithWeapon(uint16 champIndex, uint16 weaponSlotIndex,
uint16 ammunitionSlotIndex); // @ F0294_CHAMPION_IsAmmunitionCompatibleWithWeapon
void f293_drawAllChampionStates(); // @ F0293_CHAMPION_DrawAllChampionStates

View file

@ -355,7 +355,7 @@ T0261048:
case k74_TMEventTypePartyShield:
_vm->_championMan->_g407_party._shieldDefense -= L0682_s_Event._B._defense;
T0261053:
//F0260_TIMELINE_RefreshAllChampionStatusBoxes();
f260_timelineRefreshAllChampionStatusBoxes();
break;
case k77_TMEventTypeSpellShield:
_vm->_championMan->_g407_party._spellShieldDefense -= L0682_s_Event._B._defense;
@ -1029,4 +1029,13 @@ void Timeline::f257_timelineProcessEvent70_light(TimelineEvent* event) {
_vm->_timeline->f238_addEventGetEventIndex(&L0676_s_Event);
}
}
void Timeline::f260_timelineRefreshAllChampionStatusBoxes() {
uint16 L0679_ui_ChampionIndex;
for (L0679_ui_ChampionIndex = k0_ChampionFirst; L0679_ui_ChampionIndex < _vm->_championMan->_g305_partyChampionCount; L0679_ui_ChampionIndex++) {
setFlag(_vm->_championMan->_gK71_champions[L0679_ui_ChampionIndex]._attributes, k0x1000_ChampionAttributeStatusBox);
}
_vm->_championMan->f293_drawAllChampionStates();
}
}

View file

@ -185,6 +185,7 @@ public:
uint16 sourceSlotIndex, int16 destSlotIndex); // @ F0258_TIMELINE_HasWeaponMovedToSlot
void f254_timelineProcessEvent12_hideDamageReceived(uint16 champIndex); // @ F0254_TIMELINE_ProcessEvent12_HideDamageReceived
void f257_timelineProcessEvent70_light(TimelineEvent *event); // @ F0257_TIMELINE_ProcessEvent70_Light
void f260_timelineRefreshAllChampionStatusBoxes(); // @ F0260_TIMELINE_RefreshAllChampionStatusBoxes
};