Prev: C1D7 Up: Map Next: C20A
C1E7: Hero fires gun — thief shot sequence
Common entry point from shoot_thief (idle shoot), shoot_robbery (robbery shoot) and shoot_lighter (lighter shoot).
Draws the gun animation (draw_gun). Delays 1 tick. Plays the gun-cock border beep (thief_border_beep). Erases the sprite column (erase_sprite_col). Draws the thief knocked to the floor (draw_thief_floor).
Checks the encounter flag (var_encounter_flag): if set (hero bought from mobster during lighter scene), jumps to thief_escape_cleanup (score deducted, thief flees). Otherwise delays 5 ticks, adds 3 to the score (score_inc_lo) and falls through to thief_flees.
Fire gun
thief_shot C1E7 CALL draw_gun Draw gun animation (draw_gun)
C1EA LD A,$01 Delay 1 tick
C1EC CALL delay_a
C1EF CALL thief_border_beep Play gun-cock border beep (thief_border_beep)
C1F2 CALL erase_sprite_col Erase sprite column (erase_sprite_col)
C1F5 CALL draw_thief_floor Draw thief knocked to floor (draw_thief_floor)
Score or escape
C1F8 LD A,($C336) If encounter flag (var_encounter_flag) == 1 → thief escapes, no score (thief_escape_cleanup)
C1FB CP $01
C1FD JP Z,thief_escape_cleanup
C200 LD A,$05 Delay 5 ticks
C202 CALL delay_a
C205 LD B,$03 Add 3 to score (score_inc_lo, B = 3)
C207 CALL score_inc_lo
Prev: C1D7 Up: Map Next: C20A