Prev: C6E4 Up: Map Next: C745
C71C: List the objects to be drawn
Used by the routine at OBJECT_DONE.
Called by the main loop (OBJECT_DONE) at the end of every turn, once every record has been updated. Writes into DRAW_LIST the number (0-55) of every record in use whose draw flag, bit 4 of +$07, is set, in record order, and an $FF after the last. RENDER_DYNAMIC_OBJECTS wipes the objects' old places from this list and SORT_AND_DRAW draws from it.
LIST_DRAWN C71C PUSH IX 56 records from the first; HL = the list; C = the number; IX kept
C71E LD B,$38
C720 LD DE,$0020
C723 LD IX,OBJECTS
C727 LD HL,DRAW_LIST
C72A LD C,$00
LIST_DRAWN_0 C72C LD A,(IX+$00) An empty record: not listed
C72F AND A
C730 JR Z,LIST_DRAWN_1
C732 BIT 4,(IX+$07) Not to be drawn this turn
C736 JR Z,LIST_DRAWN_1
C738 LD (HL),C List its number
C739 INC HL
LIST_DRAWN_1 C73A INC C The next record
C73B ADD IX,DE
C73D DJNZ LIST_DRAWN_0
C73F LD A,$FF End the list
C741 LD (HL),A
C742 POP IX
C744 RET
Prev: C6E4 Up: Map Next: C745