Routines |
Prev: 71AC | Up: Map | Next: 720A |
|
||||||||
71DD | XOR A | 7F9A holds the ID of the telephone that Sam is calling; set this to 0, effectively making Sam hang up | ||||||
71DE | LD ($7F9A),A | |||||||
71E1 | LD L,$00 | Point HL at byte 0x00 of the character's buffer | ||||||
71E3 | LD A,(HL) | A=character's animatory state | ||||||
71E4 | AND $70 | Discard bits 0-3 and 7 | ||||||
71E6 | SUB $10 | 0x10: Is this character a policeman? | ||||||
71E8 | JR NZ,$71ED | Jump if not | ||||||
71EA | LD ($7FEB),A | Clear all flags at 7FEB (Sam is no longer wanted by the police, because he's just been arrested) | ||||||
71ED | LD A,$01 | Set bit 0 of Sam's status flags at 7FFC, indicating that he's being carried | ||||||
71EF | LD ($7FFC),A | |||||||
71F2 | BIT 0,(HL) | Is the character midstride? | ||||||
71F4 | CALL NZ,$EC5A | If so, move the character from the midstride position and update the SRB | ||||||
71F7 | CALL $E9C8 | Update the SRB for the character's current animatory state and location | ||||||
71FA | ADD A,$08 | A=animatory state of the character while carrying Sam | ||||||
71FC | CALL $E9D5 | Update the character's animatory state and location and update the SRB | ||||||
71FF | LD L,$09 | Remove the address of the primary command routine from bytes 0x08 and 0x09 of the character's buffer, thus moving to the next command in the command list | ||||||
7201 | LD (HL),$00 | |||||||
7203 | LD HL,$0001 | Set Sam's main action timer (in byte 0x08 of his buffer) to 1, and his midstride/mid-action timer (in byte 0x09) to 0 | ||||||
7206 | LD ($E608),HL | |||||||
7209 | RET |
Prev: 71AC | Up: Map | Next: 720A |