Prev: 25886 Up: Map Next: 26017
25947: Redraw the tiles behind a guard after he's moved
Used by the routine at 25886.
25947 LD HL,(28092) Pick up the guard's new location.
25950 LD DE,(28088) Pick up the guard's current location.
25954 XOR A Clear the carry flag.
25955 SBC HL,DE Subtract the guard's current location from his new location.
25957 LD A,H Has the guard moved?
25958 OR L
25959 RET Z Return if not.
This entry point is used by the routines at 26276 (when the guards have been thrown out of the park) and 26426 (after Horace has lost a life).
25960 LD HL,(28088) Pick up the guard's current location.
25963 LD BC,16384 Set HL to the corresponding display file address.
25966 ADD HL,BC
25967 CALL 27663 Set HL' to the corresponding attribute file address.
25970 LD DE,28095 Point DE at the first of the maze background tiles in the guard's buffer.
25973 LD A,(DE) Pick up the attribute byte of the first maze background tile.
25974 INC DE Point DE at the graphic data for the first maze background tile.
25975 LD C,A Copy the attribute byte to C.
25976 CALL 27642 Draw the first (top-left) maze background tile.
25979 LD A,(DE) Pick up the attribute byte of the second maze background tile.
25980 INC DE Point DE at the graphic data for the second maze background tile.
25981 LD C,A Copy the attribute byte to C.
25982 CALL 27642 Draw the second (top-right) maze background tile.
25985 LD A,L Point HL at the third tile on-screen.
25986 ADD A,30
25988 LD L,A
25989 JR NC,25995
25991 LD A,H
25992 ADD A,8
25994 LD H,A
25995 LD A,(DE) Pick up the attribute byte of the third maze background tile.
25996 INC DE Point DE at the graphic data for the third maze background tile.
25997 LD C,A Copy the attribute byte to C.
25998 CALL 27663 Set HL' to the appropriate attribute file address.
26001 CALL 27642 Draw the third (bottom-left) maze background tile.
26004 LD A,(DE) Pick up the attribute byte of the fourth maze background tile.
26005 INC DE Point DE at the graphic data for the fourth maze background tile.
26006 LD C,A Copy the attribute byte to C.
26007 CALL 27642 Draw the fourth (bottom-right) maze background tile.
26010 LD HL,(28092) Pick up the guard's new location.
26013 CALL 27752 Copy the maze backround tiles at this location into the guard's buffer.
26016 RET
Prev: 25886 Up: Map Next: 26017