| Routines

25677: Guide a character down a staircase

The address of this interruptible subcommand routine is placed into bytes 9 and 10 of a character's buffer by the routine at 25700.
Input
H | Character number (183-209)
25677 | LD L,0 | Point HL at byte 0 of the character's buffer
25679 | BIT 0,(HL) | Is the character midstride?
25681 | JR NZ,25692 | Jump if so
25683 | LD L,11 | Byte 11 of the character's buffer holds the number of steps left to be descended
25685 | DEC (HL) | One fewer now
25686 | JP Z,25488 | Terminate this interruptible subcommand if the bottom of the staircase has been reached
25689 | JP 25639 | One foot forward
25692 | CALL 25012 | Update the SRB for the character's current animatory state and location
25695 | INC D | Down a step
25696 | JP 25600 | Legs together again and update the SRB