Prev: AFBA Up: Map Next: AFC7
AFBD: Walk the object table
Used by the routine at next_frame_or_die.
The start of one frame. IX steps through 40 object records of 32 bytes each, from $5C08 up to font -- the byte just below the font. The game deliberately puts its object table on top of the ROM's system variables: from $5BA0 upwards nothing the ROM keeps there is wanted, and Knight Lore does not call the ROM once it is running. LAST-K, at $5C08, is the first byte of object zero.
Objects 0 and 1 are Sabreman's legs and upper body, and objects 2 and 3 the slots for the charms that lie in the current room. The rest are the room's walls, blocks and creatures in the order the room was built.
onscreen_loop AFBD LD A,($5BA2) $5BBC starts the frame at the frame counter's low byte and goes up by one for each object
AFC0 LD ($5BBC),A
AFC3 LD IX,$5C08 IX = the first object record
Prev: AFBA Up: Map Next: AFC7