Prev: 7376 Up: Map Next: 738A
7377: Make a policeman chase Sam or go to his last known whereabouts if appropriate
Used by the routine at 72B1. Returns with the carry flag reset if the policeman starts either chasing Sam, or returning to where he first spotted Sam wearing a disguise that has just become known to the police.
Input
H 0xDE or 0xDF (policeman)
7377 CALL $7222 Make the policeman start chasing Sam if appropriate
737A RET NC Return if the policeman is now chasing Sam
737B LD L,$1D Pick up byte 0x1D of the policeman's buffer
737D LD A,(HL)
737E AND A Was Sam recently spotted by the policeman while wearing a disguise that is unknown to the police?
737F SCF Return with the carry flag set if not
7380 RET Z
7381 DEC (HL) Decrement the disguise timeout counter in bits 0-4 of byte 0x1D of the policeman's buffer
7382 LD A,(HL) Pick up the result
7383 AND $1F Has the disguise timeout counter reached 0 (meaning that the disguise should now become known to the police)?
7385 SCF Return with the carry flag set if not
7386 RET NZ
7387 JP $71AC Make the disguise known to the police, and send the policeman back to where he first spotted Sam wearing the disguise
Prev: 7376 Up: Map Next: 738A