Prev: 9FCA Up: Map Next: A00E
9FFB: Copy an actor's position and sprite into the drawing workspace
Lifts three fields out of the record IX points at into fixed locations at $5E15-$5E17, so the drawing code can reach them without IX.
Called for the player and for every monster alike, which is how the two were shown to share one record layout: breaking here and collecting IX gives $EA90 -- the player -- alongside the eight monster records at $EE60, $EE70, $EE80, $EE90, $EEA0, $EEB0, $EEC0 and $EED0.
Input
IX The record to read
ACTOR_TO_WORKSPACE 9FFB LD A,(IX+$03) +$03 and +$04 are the position.
9FFE LD ($5E16),A
A001 LD A,(IX+$04)
A004 LD ($5E17),A
A007 LD A,(IX+$00) +$00 is the sprite.
A00A LD ($5E15),A
A00D RET
The record is 16 bytes. The lower half describes the thing itself -- +$00 sprite, +$01 room, +$03 x, +$04 y -- and in the player's copy the upper half describes the weapon it has in flight: +$08 type ($00 when nothing is in the air), +$09 room, +$0B x, +$0C y, +$0E signed velocity. Watched live: firing fills +$08 onwards, +$0B walks across the room while +$0C holds steady, and +$0E flips between $04 and $FC as the shot turns round off a wall.
Prev: 9FCA Up: Map Next: A00E