Routines

25677: Make character walk down 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)

25677 2E00 LD L,0
25679 CB46 BIT 0,(HL) Is the character midstride?
25681 2009 JR NZ,25692 Jump if so
25683 2E0B LD L,11 Byte 11 of the character's buffer holds the number of steps left to be descended
25685 35 DEC (HL) One fewer now
25686 CA9063 JP Z,25488 Jump if the bottom of the staircase has been reached
25689 C32764 JP 25639 One foot forward
25692 CDB461 CALL 25012 Update SRB for character's current animatory state and location
25695 14 INC D Down a step
25696 C30064 JP 25600 Legs together again and update SRB