Prev: 6DB5 Up: Map Next: 6DFB
6DD2: Put ERIC midstride
Used by the routines at 6E9B and 6F44. 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
6DD2 PUSH DE Save ERIC's midstride coordinates temporarily
6DD3 LD HL,$D205 Point HL at byte 0x05 of ERIC's buffer
6DD6 LD (HL),B Place ERIC's post-midstride coordinates into bytes 0x04 and 0x05 of his buffer
6DD7 DEC L
6DD8 LD (HL),C
6DD9 CALL $61B4 Update the SRB for ERIC's current animatory state and location
6DDC POP DE Restore ERIC's midstride coordinates to DE
6DDD LD L,$03
6DDF INC A A=ERIC's next animatory state (midstride)
6DE0 PUSH AF Save this briefly
6DE1 INC A A=ERIC's post-midstride animatory state
6DE2 AND $FA
6DE4 LD (HL),A Store this in byte 0x03 of ERIC's buffer
6DE5 POP AF A=ERIC's next animatory state (midstride)
6DE6 CALL $6130 Update ERIC's animatory state (to midstride) and location and update the SRB
6DE9 LD L,$04 4=small value for ERIC's main action timer (fast)
6DEB LD A,($7FF1) 7FF1 holds the keypress table offset of the last key pressed
6DEE BIT 3,A Was the last key pressed upper case (fast)?
6DF0 JR Z,$6DF4 Jump if so
6DF2 LD L,$09 9=large value for ERIC's main action timer (slow)
6DF4 LD H,L Initialise ERIC's main action timer at 7FF3 and the midstride/mid-action timer at 7FF2 to the same value
6DF5 LD ($7FF2),HL
6DF8 JP $7154 Make a walking sound effect
Prev: 6DB5 Up: Map Next: 6DFB