Routines |
Prev: 7B6A | Up: Map | Next: 7BB6 |
Used by the routine at 72B1. 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.
|
||||||||
7B9A | PUSH HL | Save the policeman's character number | ||||||
7B9B | LD HL,($7F9E) | HL=number of bucks (stored at 7F9E) | ||||||
7B9E | LD DE,$FFD2 | DE=-46 | ||||||
7BA1 | ADD HL,DE | Set the carry flag if Sam has at least $46 | ||||||
7BA2 | POP HL | Restore the policeman's character number to H | ||||||
7BA3 | JP C,$71DD | Jump if Sam has at least $46 (to make the policeman pick him up) | ||||||
Sam has less than $46. Game over.
|
||||||||
7BA6 | LD A,$09 | Reduce Sam's cash supply to 0 | ||||||
7BA8 | CALL $6E87 | |||||||
7BAB | LD A,$30 | Message 0x30: 'AT THE JAIL THEY THREW THE BOOK AT ME...' | ||||||
7BAD | LD DE,$1470 | D=20, E=112 | ||||||
7BB0 | PUSH AF | Save the message number | ||||||
7BB1 | LD A,$3A | 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) | ||||||
7BB3 | JP $7ADB | Display the cutscene and end the game |
Prev: 7B6A | Up: Map | Next: 7BB6 |