Prev: 651E Up: Map Next: 65A1
655B: Redraw the tiles behind a guard after he's moved
Used by the routine at 651E.
655B LD HL,($6DBC) Pick up the guard's new location.
655E LD DE,($6DB8) Pick up the guard's current location.
6562 XOR A Clear the carry flag.
6563 SBC HL,DE Subtract the guard's current location from his new location.
6565 LD A,H Has the guard moved?
6566 OR L
6567 RET Z Return if not.
This entry point is used by the routines at 66A4 (when the guards have been thrown out of the park) and 673A (after Horace has lost a life).
6568 LD HL,($6DB8) Pick up the guard's current location.
656B LD BC,$4000 Set HL to the corresponding display file address.
656E ADD HL,BC
656F CALL $6C0F Set HL' to the corresponding attribute file address.
6572 LD DE,$6DBF Point DE at the first of the maze background tiles in the guard's buffer.
6575 LD A,(DE) Pick up the attribute byte of the first maze background tile.
6576 INC DE Point DE at the graphic data for the first maze background tile.
6577 LD C,A Copy the attribute byte to C.
6578 CALL $6BFA Draw the first (top-left) maze background tile.
657B LD A,(DE) Pick up the attribute byte of the second maze background tile.
657C INC DE Point DE at the graphic data for the second maze background tile.
657D LD C,A Copy the attribute byte to C.
657E CALL $6BFA Draw the second (top-right) maze background tile.
6581 LD A,L Point HL at the third tile on-screen.
6582 ADD A,$1E
6584 LD L,A
6585 JR NC,$658B
6587 LD A,H
6588 ADD A,$08
658A LD H,A
658B LD A,(DE) Pick up the attribute byte of the third maze background tile.
658C INC DE Point DE at the graphic data for the third maze background tile.
658D LD C,A Copy the attribute byte to C.
658E CALL $6C0F Set HL' to the appropriate attribute file address.
6591 CALL $6BFA Draw the third (bottom-left) maze background tile.
6594 LD A,(DE) Pick up the attribute byte of the fourth maze background tile.
6595 INC DE Point DE at the graphic data for the fourth maze background tile.
6596 LD C,A Copy the attribute byte to C.
6597 CALL $6BFA Draw the fourth (bottom-right) maze background tile.
659A LD HL,($6DBC) Pick up the guard's new location.
659D CALL $6C68 Copy the maze backround tiles at this location into the guard's buffer.
65A0 RET
Prev: 651E Up: Map Next: 65A1