Prev: 28085 Up: Map Next: 28155
28114: Put ERIC midstride
Used by the routines at 28315 and 28484. Puts ERIC midstride after 'Q' (up), 'A' (down), 'O' (left) or 'P' (right) was pressed.
Input
BC ERIC's post-midstride coordinates
DE ERIC's midstride coordinates
28114 PUSH DE Save ERIC's midstride coordinates temporarily
28115 LD HL,53765 Point HL at byte 5 of ERIC's buffer
28118 LD (HL),B Place ERIC's post-midstride coordinates into bytes 4 and 5 of his buffer
28119 DEC L
28120 LD (HL),C
28121 CALL 25012 Update the SRB for ERIC's current animatory state and location
28124 POP DE Restore ERIC's midstride coordinates to DE
28125 LD L,3
28127 INC A A=ERIC's next animatory state (midstride)
28128 PUSH AF Save this briefly
28129 INC A A=ERIC's post-midstride animatory state
28130 AND 250
28132 LD (HL),A Store this in byte 3 of ERIC's buffer
28133 POP AF A=ERIC's next animatory state (midstride)
28134 CALL 24880 Update ERIC's animatory state (to midstride) and location and update the SRB
28137 LD L,4 4=small value for ERIC's main action timer (fast)
28139 LD A,(32753) 32753 holds the keypress table offset of the last key pressed
28142 BIT 3,A Was the last key pressed upper case (fast)?
28144 JR Z,28148 Jump if so
28146 LD L,9 9=large value for ERIC's main action timer (slow)
28148 LD H,L Initialise ERIC's main action timer at 32755 and the midstride/mid-action timer at 32754 to the same value
28149 LD (32754),HL
28152 JP 29012 Make a walking sound effect
Prev: 28085 Up: Map Next: 28155