Prev: D7A2 Up: Map Next: D7FF
D7D2: Handler: Collectibles
Used by the routine at Dispatch_Handlers.
Walks the 03-byte records at *ReferenceCollectibles. When the player stands on an active record, bit 7 is set and Dispatch_Events runs.
Handler_Collectibles D7D2 LD IX,($6424) IX=*ReferenceCollectibles.
Handler_Collectibles_Loop D7D6 LD A,(IX+$00) Return if the terminator FF is reached.
D7D9 CP $FF
D7DB RET Z Jump to Handler_Collectibles_Next if this record is already collected.
D7DC BIT 7,A
D7DE JR NZ,Handler_Collectibles_Next
D7E0 LD A,($64A4) Jump to Handler_Collectibles_Next if the column does not match *Player.
D7E3 CP (IX+$00)
D7E6 JR NZ,Handler_Collectibles_Next
D7E8 LD A,($64A5) Jump to Handler_Collectibles_Next if the row does not match *Player_Row.
D7EB CP (IX+$01)
D7EE JR NZ,Handler_Collectibles_Next
D7F0 LD A,(IX+$02) Set bit 7 of the record.
D7F3 SET 7,A
D7F5 JP Dispatch_Events Jump to Dispatch_Events.
Handler_Collectibles_Next D7F8 LD DE,$0003 IX+=0003.
D7FB ADD IX,DE
D7FD JR Handler_Collectibles_Loop Jump to Handler_Collectibles_Loop.
Prev: D7A2 Up: Map Next: D7FF