Prev: 31284 Up: Map Next: 31319
31289: Check whether Sam has entered a house through the front door without a key
Continues from the routine at 30396. Sends the police after Sam if he has entered a house through the front door without a key.
Input
A Door status flags for the doorway Sam is standing in (see 32752)
H 230 (Sam)
31289 LD C,A C=door status flags
31290 LD A,(32746) Collect the key inventory flags from 32746
31293 AND C Does Sam have the key to the door?
31294 RET NZ Return if so
Sam is entering a house through the front door without a key. The police will need to be alerted.
31295 PUSH DE
31296 LD DE,(58881) Copy Sam's coordinates to 32731
31300 LD (32731),DE
31304 LD C,1 Assume a z-coordinate of 1 (indoors)
31306 CALL 60743 Obtain an identifier for Sam's current location
31309 LD (32733),A Store it at 32733
31312 LD A,1 Set bit 0 at 32747: Sam is wanted by the police
31314 LD (32747),A
31317 POP DE
31318 RET
Prev: 31284 Up: Map Next: 31319