| Routines

7190: Set a character's destination to Sam's current location

Used by the routines at 71A0 and 7A82. Copies Sam's coordinates and location identifier into bytes 0x0A, 0x0B and 0x0C of the character's buffer.
Input
H | Character number (0xD7-0xE5)
7190 | CALL $6558 | Get Sam's x-, y- and z-coordinates in E, D and A
7193 | LD C,A | C=Sam's z-coordinate
This entry point is used by the routines at 71AC and 72B1 with H=0xDE or 0xDF (a policeman) and E, D and C holding the destination x-, y- and z-coordinates.
7194 | LD L,$0A | Copy the coordinates into bytes 0x0A and 0x0B of the character's buffer, thus making it his destination
7196 | LD (HL),E
7197 | INC L
7198 | LD (HL),D
This entry point is used by the routine at 7CC8 with DE holding the character's destination y- and x-coordinates (copied from his command list) and C=1.
7199 | CALL $ED3E | Obtain an identifier for the location whose coordinates are in D, E and C
719C | LD L,$0C | Copy the location identifier into byte 0x0C of the character's buffer
719E | LD (HL),A
719F | RET |