Prev: 8E9C Up: Map Next: 8EC6
8EA0: Have the player and the rescued person both left the city?
Used by the routine at PLAY.
Seen in play. Once both are outside the walls, the rescued person's +D is set to 2 -- BASIC's w, which line 70 reads as success -- "CONGRATULATIONS !" is shown, and the game stops at the end of this same frame: PLAY counts the 1 down to 0 before it looks again.
CHECK_RESCUED 8EA0 LD HL,PLAYER The player is inside if both x and y have bit 7 set...
8EA3 LD A,(HL)
8EA4 INC HL
8EA5 AND (HL)
8EA6 RET M
8EA7 LD L,$90 ...and the same for the rescued person.
8EA9 LD A,(HL)
8EAA INC HL
8EAB AND (HL)
8EAC RET M
8EAD LD A,(RESCUEE_STATE) Already done.
8EB0 CP $02
8EB2 RET Z
8EB3 LD A,$02 Rescued.
8EB5 LD (RESCUEE_STATE),A
8EB8 LD A,$0D
8EBA CALL PLAY_SCRIPT
8EBD LD A,$01 Stop after this frame.
8EBF LD (FRAMES_LEFT),A
8EC2 LD (TIME_TICKS),A
8EC5 RET
Prev: 8E9C Up: Map Next: 8EC6