Routines

28114: Put ERIC midstride


Used by routines at 28315 and 28484

BC Coordinates of spot in front of ERIC
DE ERIC's new coordinates

28114 D5 PUSH DE
28115 2105D2 LD HL,53765 Point HL at byte 5 of ERIC's buffer
28118 70 LD (HL),B Place the coordinates of the spot in front of ERIC into bytes 4 and 5 of his buffer
28119 2D DEC L
28120 71 LD (HL),C
28121 CDB461 CALL 25012 Update SRB for ERIC's current animatory state and location
28124 D1 POP DE
28125 2E03 LD L,3
28127 3C INC A A=ERIC's next animatory state (midstride)
28128 F5 PUSH AF
28129 3C INC A A=animatory state of ERIC when he reaches point whose coordinates are in BC
28130 E6FA AND 250
28132 77 LD (HL),A Store this in byte 3 of ERIC's buffer
28133 F1 POP AF
28134 CD3061 CALL 24880 Update SRB for ERIC's new animatory state and location
28137 2E04 LD L,4
28139 3AF17F LD A,(32753)
28142 CB5F BIT 3,A Was the last key pressed uppercase (fast)?
28144 2802 JR Z,28148 Jump if so
28146 2E09 LD L,9
28148 65 LD H,L
28149 22F27F LD (32754),HL
28152 C35471 JP 29012 Make walking sound effect