Prev: 53759 Up: Map Next: 53819
53787: Tunnel item (boundary or bat/spider) has gone off-screen - reduce on-screen item count
Used by the routine at 53714.
Helps keep track and limit the number of graphic items on-screen during the tunnel sections. Jump from 53719 if tunnel item is no longer visible on-screen.
53787 LD A,0
53789 LD (60227),A Set type of graphic to draw to 0
53792 LD A,(60230)
53795 CP 3 Check if tunnel item type < 3
53797 JR NC,53809
If so, it's a left/right boundary graphic that's now gone off-screen
53799 LD A,(60286) Byte holding the number of boundary wall graphics currently on screen. This number is checked & limited (to 20) at 55011.
53802 DEC A Decrement this counter, as there's now one less...
53803 LD (60286),A ...and re-store.
53806 JP 53885
Creature has gone off-screen
53809 LD A,(60573) Counter for number of creatures currently on-screen (max 3)
53812 DEC A Decrement number...
53813 LD (60573),A ...and re-store
53816 JP 53885
Prev: 53759 Up: Map Next: 53819