Prev: 59901 Up: Map Next: 60060
60029: Handle Fire
Handler for the object types 112 and 113 the fire that is thrown by the torch (see Throw_Weapon). Bit 0 of the type and the attribute follow bit 0 of the tick counter, so the fire flickers between two frames and between red (66) and magenta (67). It moves in the same way as the other thrown weapons (see Move_Thrown_Weapon).
Input
IX Object record of the fire
Handle_Fire 60029 CALL StoreEntity Save the state of the fire.
60032 LD A,(36566) Fetch the tick counter.
60035 AND %00000001 Keep only bit 0.
60037 LD B,A Store it in B.
60038 LD A,(IX+0) Fetch the type of the fire.
60041 AND %11111110 Reset bit 0.
60043 ADD A,B Add bit 0 of the tick counter.
60044 LD (IX+0),A Set the type of the fire.
60047 LD A,(36566) Fetch the tick counter.
60050 AND %00000001 Keep only bit 0.
60052 ADD A,66 Add 66.
60054 LD (IX+5),A Set the attribute of the fire.
60057 JP Move_Thrown_Weapon Jump to Move_Thrown_Weapon to move the fire.
Prev: 59901 Up: Map Next: 60060