Back to Skool Routines
Prev: 25581 Up: Map Next: 25677
25656: Make character walk up stairs
The address of this routine is placed into bytes 9 and 10 of a character's buffer by the routine at 25700.
H Character number (183-209)
25656 LD L,0 Point HL at byte 0 of the character's buffer
25658 BIT 0,(HL) Is the character midstride?
25660 JP NZ,25597 Finish the stride if so
25663 LD L,11 Byte 11 of the character's buffer holds the number of steps left to be climbed
25665 DEC (HL) One fewer now
25666 JP Z,25488 Jump (to remove the address of this routine from bytes 9 and 10 of the character's buffer) if the top of the staircase has been reached
25669 CALL 25012 Update SRB for the character's current animatory state and location
25672 DEC D Up a step
25673 INC A One foot forward
25674 JP 24880 Update SRB for the character's new animatory state (midstride) and location
Prev: 25581 Up: Map Next: 25677