Prev: E360 Up: Map Next: E4A7
E492: Tick Entity Colour Timer
Entity handler that drives a per-entity colour timer. Each frame it decrements the timer byte; if still non-zero, extracts the animation frame index from the low 3 bits and calls Paint_Narrow_Entity_Attributes to refresh the entity's attribute colours, then advances the entity pointer by 0B bytes via Tick_Entity_Colour_Timer_Advance. When the timer reaches zero, falls through to Retire_Expired_Entity to erase and retire the entity. Written into entity records by Kill_Tracked_Enemy_Entity.
Tick_Entity_Colour_Timer E492 DEC (HL) Decrement the entity timer; if still live, extract the low 3 bits as the animation frame index and refresh the entity's attribute colours via Paint_Narrow_Entity_Attributes.
E493 JP Z,Retire_Expired_Entity
E496 LD A,(HL)
E497 INC HL
E498 AND $07
E49A EXX
E49B LD B,A
E49C EXX
E49D PUSH HL
E49E CALL Paint_Narrow_Entity_Attributes
E4A1 POP HL
This entry point is used by the routine at Process_Cluster_Entity.
Tick_Entity_Colour_Timer_Advance E4A2 LD DE,$000B Advance the entity pointer by 0B bytes and return.
E4A5 ADD HL,DE
E4A6 RET
Prev: E360 Up: Map Next: E4A7