Prev: C0D8 Up: Map Next: C123
C0DD: routine50
routine50 C0DD DI Disable interrupts.
C0DE LD B,$A0 Set B to 160 as loop counter.
C0E0 LD HL,map_object_table Set HL to address of map_object_table.
routine50_0 C0E3 LD A,(HL) If object is not zero jump to routine50_1.
C0E4 OR A
C0E5 JR NZ,routine50_1
C0E7 PUSH HL Preserve address.
C0E8 LD DE,map_object_table Get offset within map_object_table.
C0EB SBC HL,DE
C0ED LD A,L
C0EE INC A Increment and select low nibble to get next column number.
C0EF AND $0F
C0F1 POP HL Restore address.
C0F2 JR Z,routine50_1 If next column is zero jump to routine50_1.
C0F4 LD A,$01 Else set entry in map_object_table to $01.
C0F6 LD (HL),A
C0F7 LD DE,$0141 Set corresponding entry in map_animation_frame_table to zero.
C0FA ADD HL,DE
C0FB XOR A
C0FC LD (HL),A
C0FD SBC HL,DE
routine50_1 C0FF INC HL Increment address to next entry in map_object_table.
C100 DJNZ routine50_0 Loop for 160 iterations.
C102 LD HL,map_animation_timeout_table Fill map_animation_timeout_table with $01 ???
C105 LD DE,$E0C1
C108 LD BC,$009F
C10B LD (HL),$01
C10D LDIR
C10F LD A,(unknown06) If unknown06 is clear jump to routine50_2
C112 OR A
C113 JR NZ,routine50_2
C115 LD A,$41 Else set ATTR-T to bright blue on black and draw border.
C117 LD ($5C8F),A
C11A CALL ZRDR_P
routine50_2 C11D XOR A Clear unknown06 ???
C11E LD (unknown06),A
C121 EI Enable interrupts and return.
C122 RET
Prev: C0D8 Up: Map Next: C123