Prev: 871A Up: Map Next: 87DC
873C: Escape scene
Used by the routine at main_loop.
escape_scene 873C CALL silence_audio_hook Call silence_audio_hook
873F LD HL,$871A Address of escape_scene_data
8742 CALL setup_game Call setup_game
8745 LD HL,$00FA Set speed to $FA [speed of the camera]
8748 LD ($A24A),HL
874B LD HL,$8728 Initialise hazards[0] (the perp)
874E LD DE,$A188
8751 LD BC,$0014
8754 LDIR
8756 LD HL,($5D10) Set $A191 to the perp's car LOD
8759 LD ($A191),HL
875C LD A,$FF inhibit_collision_detection = $FF -- Stops sub_ad0d from running
875E LD ($A221),A
8761 LD HL,$992A Address of failed_chatter ("wrong job" / "one more try" / "mediocre driver")
8764 CALL chatter Call chatter (priority $FF)
Print "GAME OVER" once the transition has completed.
es_loop 8767 LD HL,$8CF4 Address of game_over_message
876A LD A,($A231) If transition_control != 4 Call message_printing_related
876D CP $04
876F CALL NZ,message_printing_related
8772 CALL read_map Call read_map
8775 CALL main_loop_10 Call main_loop_10
8778 CALL scroll_horizon Call scroll_horizon
877B CALL main_loop_12 Call main_loop_12
877E CALL main_loop_13 Call main_loop_13
8781 CALL main_loop_14 Call main_loop_14
8784 CALL tunnel_setup Call tunnel_setup
8787 CALL spawn_hazards Call spawn_hazards
878A CALL draw_hazards Call draw_hazards
878D CALL main_loop_23 Call main_loop_23
8790 CALL update_scoreboard Call update_scoreboard
8793 CALL drive_chatter Call drive_chatter
8796 CALL transition Call transition
8799 CALL draw_screen Call draw_screen
879C LD A,($C161) Jump to es_loop unless the tunnel has appeared
879F AND A
87A0 JR Z,es_loop
87A2 LD A,($C15E) reading from tunnel code [15 when tunnel is small, 6 when fills screen]
87A5 CP $07 loop if tunnel code value >= 7
87A7 JR NC,es_loop
87A9 LD A,($A189) $A189 is hazards 2nd byte
87AC CP $05 Jump if it != 5
87AE JR NZ,escape_scene_0
87B0 LD A,$FF Activate three hazards? [i.e. the three barriers]
87B2 LD ($A1A3),A
87B5 LD ($A1B7),A
87B8 LD ($A1CB),A
escape_scene_0 87BB LD HL,$0000 Set speed to zero [speed of camera]
87BE LD ($A24A),HL
87C1 LD A,($A188) Loop while the perp is still active in the hazards
87C5 JR C,es_loop
87C7 LD A,($963D) Loop while chatter_state > 0 => chatter is still happening
87CB JR NZ,es_loop
87CD LD A,($A231) Return if transition_control is zero
87D0 AND A
87D1 RET Z
87D2 CP $04 If transition_control is 4
87D4 LD A,$08
87D6 CALL NZ,setup_transition Call setup_transition if non-zero
87D9 JP es_loop Loop
Prev: 871A Up: Map Next: 87DC