Prev: 7DAB Up: Map Next: 7EE9
7DEA: Police encounter
Used by the routine at door_collision.
Set up scene — draw hero, open door, police approaches.
police 7DEA CALL draw_hero Draw hero body (draw_hero)
7DED CALL door_open Open door (door_open)
7DF0 LD A,$02 Delay 2 (delay_a)
7DF2 CALL delay_a
7DF5 CALL police_approach Police approach animation (police_approach)
7DF8 LD A,$07 Delay 7 (delay_a)
7DFA CALL delay_a
7DFD LD A,($5C78) Read FRAMES ($5C78) for randomisation
7E00 SUB $40 SUB $40
7E02 JP C,police_0 If timer < $40 → papers branch at police_0
Branch A — routine check: police asks if everything is OK.
7E05 LD DE,$F641 Set CHARS=$F641, draw "Então está tudo bem?" (frame_bubble_police_r0c17)
7E08 CALL set_chars
7E0B LD HL,$7EE9
7E0E CALL draw_frame
7E11 LD A,$04 Delay 4 (delay_a)
7E13 CALL delay_a
7E16 LD DE,$F6A1 Set CHARS=$F6A1, draw "Está sim seu Guarda" (frame_bubble_hero_r1c1_police)
7E19 CALL set_chars
7E1C LD HL,$7F15
7E1F CALL draw_frame
7E22 LD A,$03 Delay 3 (delay_a)
7E24 CALL delay_a
7E27 LD HL,$7F00 Clear police bubble (frame_clear_police_r0c17)
7E2A CALL draw_frame
7E2D LD A,$05 Delay 5 (delay_a)
7E2F CALL delay_a
7E32 LD HL,$7F2C Clear hero bubble (frame_clear_hero_r1c1_police)
7E35 CALL draw_frame
7E38 LD A,$03 Delay 3 (delay_a)
7E3A CALL delay_a
7E3D CALL police_exit_step1 Police exit step 1 (police_exit_step1)
7E40 LD A,$02 Delay 2 (delay_a)
7E42 CALL delay_a
7E45 CALL door_close Close door (door_close)
7E48 JP main_1 Return to inner game loop (main_1)
Branch B — papers check: police demands ID.
police_0 7E4B CALL erase_sprite_col Erase sprite column (erase_sprite_col)
7E4E CALL police_face_left Draw police facing left (police_face_left)
7E51 LD DE,$F701 Set CHARS=$F701, draw "Mostre-me os seus Papéis" (frame_bubble_police_r0c17)
7E54 CALL set_chars
7E57 LD HL,$7EE9
7E5A CALL draw_frame
7E5D LD A,($C33C) Load wallet flag (var_inv_wallet)
7E60 CP $00 If no wallet → arrested branch at police_1
7E62 JP Z,police_1
Has wallet — police accepts.
7E65 LD A,$05 Delay 5 (delay_a)
7E67 CALL delay_a
7E6A CALL show_wallet Show wallet (show_wallet)
7E6D LD A,$07 Delay 7 (delay_a)
7E6F CALL delay_a
7E72 CALL erase_sprite_col Erase sprite column (erase_sprite_col)
7E75 CALL draw_hero Redraw hero body (draw_hero)
7E78 LD HL,$7F41 Erase police lower body (frame_clear_police_feet)
7E7B CALL draw_frame
7E7E LD DE,$F2C1 Set CHARS=$F2C1, draw police exiting frame 2 (L94DE)
7E81 CALL set_chars
7E84 LD HL,$94DE
7E87 CALL draw_frame
7E8A LD A,$03 Delay 3 (delay_a)
7E8C CALL delay_a
7E8F LD DE,$F821 Set CHARS=$F821, draw "O.K. Pode Seguir" (frame_bubble_police_r0c17)
7E92 CALL set_chars
7E95 LD HL,$7EE9
7E98 CALL draw_frame
7E9B LD A,$07 Delay 7 (delay_a)
7E9D CALL delay_a
7EA0 LD HL,$7F00 Clear police bubble (frame_clear_police_r0c17)
7EA3 CALL draw_frame
7EA6 CALL police_exit_step1 Police exit animation (police_exit_step1)
7EA9 LD A,$01 Delay 1 (delay_a)
7EAB CALL delay_a
7EAE CALL door_close Close door (door_close)
7EB1 JP main_1 Return to inner game loop (main_1)
No wallet — arrested, game over.
police_1 7EB4 LD A,$04 Delay 4 (delay_a)
7EB6 CALL delay_a
7EB9 LD DE,$F761 Set CHARS=$F761, draw "Não tenho carteira!" (frame_bubble_hero_r1c1_police)
7EBC CALL set_chars
7EBF LD HL,$7F15
7EC2 CALL draw_frame
7EC5 LD A,$05 Delay 5 (delay_a)
7EC7 CALL delay_a
7ECA LD DE,$F7C1 Set CHARS=$F7C1, draw "Então venha comigo" (frame_bubble_police_r0c17)
7ECD CALL set_chars
7ED0 LD HL,$7EE9
7ED3 CALL draw_frame
7ED6 LD A,$02 Delay 2 (delay_a)
7ED8 CALL delay_a
7EDB LD HL,$7F2C Clear hero bubble (frame_clear_hero_r1c1_police)
7EDE CALL draw_frame
7EE1 LD A,$09 Delay 9 (delay_a)
7EE3 CALL delay_a
7EE6 JP the_end Jump to "The End" sequence (the_end)
Prev: 7DAB Up: Map Next: 7EE9