Prev: 31594 Up: Map Next: 31670
31642: Make a policeman arrest Sam, and end the game if he cannot pay his bail
Used by the routine at 29361. Sam has been caught by a policeman; this routine makes the policeman pick Sam up if he has at least $46 on him, and ends the game otherwise.
Input
H 222 or 223 (policeman)
31642 PUSH HL Save the policeman's character number
31643 LD HL,(32670) HL=number of bucks (stored at 32670)
31646 LD DE,65490 DE=-46
31649 ADD HL,DE Set the carry flag if Sam has at least $46
31650 POP HL Restore the policeman's character number to H
31651 JP C,29149 Jump if Sam has at least $46 (to make the policeman pick him up)
Sam has less than $46. Game over.
31654 LD A,9 Reduce Sam's cash supply to 0
31656 CALL 28295
31659 LD A,48 Message 48: 'AT THE JAIL THEY THREW THE BOOK AT ME...'
31661 LD DE,5232 D=20, E=112
31664 PUSH AF Save the message number
31665 LD A,58 Combined with (E,D)=(112,20), this places the top-left corner of the cutscene window at (128,31) and Sam at (133,31) (in the jail cell)
31667 JP 31451 Display the cutscene and end the game
Prev: 31594 Up: Map Next: 31670