Prev: 69D2 Up: Map Next: 69F5
69E7: Make a character go to a random location
Used by command lists 0xB6, 0xBE, 0xC0, 0xC2, 0xC4, 0xD0, 0xD2, 0xD4, 0xD8 and 0xDC to make a character go to a place at random (selected from the table at 69CA).
H Character number (0x98-0xA9)
L 0x7A
69E7 LD A,(HL) Reset bits 5 and 6 of byte 0x7A of the character's buffer, indicating that he should no longer walk fast or slow continuously (if he was doing so)
69E8 AND $9F
69EA LD (HL),A
This entry point is used by the routine at 6A6E.
69EB CALL $69D2 Set a random destination for the character
69EE LD L,$64 Prepare the MSB of the primary command routine address in bytes 0x63 and 0x64 of the character's buffer; the LSB will be set to 0xD1 soon (making the routine address 63D1)
69F0 LD (HL),$63
69F2 JP $63CD Set the character on his way
Prev: 69D2 Up: Map Next: 69F5