Prev: 33148 Up: Map Next: 33264
33243: Handle Axe
The handler for a thrown axe, which has the sprite IDs 64 to 71. Picks the animation frame from FRAMES, sets the attribute and then runs the movement code that is shared by all of the weapons at HandlerWeapon.
Input
IX The weapon entity
HandlerAxe 33243 CALL StoreEntity Call StoreEntity to save the position of the weapon.
33246 LD A,(23672) Fetch FRAMES.
33249 CPL Invert the bits.
33250 RRA Rotate A right (the frame changes on every other tick).
33251 AND %00000111 Keep only bits 0-2 (there are 8 animation frames).
33253 ADD A,64 Add 64 to point to the correct frame/ sprite ID (the axe base sprite ID is: 64).
33255 LD (IX+0),A Write the new frame/ sprite ID back to the entity.
33258 LD (IX+5),66 Set the attribute of the axe to INK:RED, PAPER:BLACK (BRIGHT).
33262 JR HandlerWeapon Jump to HandlerWeapon to move the weapon.
Prev: 33148 Up: Map Next: 33264