Prev: 6438 Up: Map Next: 6463
644D: Guide a character down a staircase
The address of this interruptible subcommand routine is placed into bytes 0x09 and 0x0A of a character's buffer by the routine at 6464.
H Character number (0xB7-0xD1)
644D LD L,$00 Point HL at byte 0x00 of the character's buffer
644F BIT 0,(HL) Is the character midstride?
6451 JR NZ,$645C Jump if so
6453 LD L,$0B Byte 0x0B of the character's buffer holds the number of steps left to be descended
6455 DEC (HL) One fewer now
6456 JP Z,$6390 Terminate this interruptible subcommand if the bottom of the staircase has been reached
6459 JP $6427 One foot forward
645C CALL $61B4 Update the SRB for the character's current animatory state and location
645F INC D Down a step
6460 JP $6400 Legs together again and update the SRB
Prev: 6438 Up: Map Next: 6463