Prev: 31289 Up: Map Next: 31338
31319: Make a gangster walk up or down until Sam arrives
The address of this interruptible subcommand routine is placed into bytes 14 and 15 of a gangster's buffer by the primary command routine at 31338. It makes the gangster start or continue walking up or down a few paces unless he spots Sam, in which case the subcommand and current primary command are terminated.
Input
H Gangster's character number (215-224)
31319 CALL 63118 Abort now if the gangster is midstride or has his arm up
31322 CALL 29597 Is Sam nearby, and should the gangster go after him?
31325 JP C,63217 Jump if not
31328 LD L,22 Copy the command list offset (from the gangster's region definition table) into byte 22 of the gangster's buffer
31330 LD (HL),A
31331 LD L,15 Remove the address of this interruptible subcommand routine from bytes 14 and 15 of the gangster's buffer
31333 LD (HL),0
31335 JP 62080 Terminate the current primary command, and move to the portion of the command list that deals with catching Sam
Prev: 31289 Up: Map Next: 31338