Prev: 738A Up: Map Next: 73C0
739D: Check whether a gangster should start chasing Sam
Used by the routine at 7A57. Returns with the carry flag reset if Sam is close enough (and not disguised well enough) that the gangster should start chasing him, and the appropriate command list offset in A.
Input
H Gangster's character number (0xD7-0xE0)
739D CALL $6DF6 Set A=1
73A0 DEC A Set the zero flag
73A1 SCF Set the carry flag
73A2 RET NZ This return never happens
73A3 LD L,$17 Point HL at byte 0x17 of the gangster's buffer
73A5 LD E,(HL) Collect the command list start address in DE
73A6 INC L
73A7 LD D,(HL)
73A8 LD B,H B=gangster's character number
73A9 LD HL,$FFFA Point HL at the second entry in the relevant table of region definitions at FD0C, FD26, FD44, FD64 or FD7C
73AC ADD HL,DE
73AD LD D,$E6 0xE6=Sam
73AF CALL $738A Is Sam inside the region?
73B2 JR C,$73BE Jump if not
73B4 LD A,($7FC9) Collect the ID of Sam's current disguise (0-7) from 7FC9
73B7 CP (HL) Compare it with the disguise ID in the region definition table
73B8 SCF Set the carry flag
73B9 JR Z,$73BE Jump if Sam's current disguise matches (the gangster will let Sam pass)
73BB INC HL Collect the command list offset from the region definition table
73BC LD A,(HL)
73BD AND A Clear the carry flag
73BE LD H,B H=gangster's character number
73BF RET
Prev: 738A Up: Map Next: 73C0