Prev: F9D1 Up: Map Next: F9ED
F9D2: Knock a character over
Used by the routines at FA05 and FAE3. Knocks the character to the ground and updates the SRB accordingly.
Input
H Character number (0xD7-0xE6)
F9D2 CALL $E9C8 Update the SRB for the character's current animatory state and location
F9D5 BIT 7,A Is the character facing left?
F9D7 JR Z,$F9DB Jump if so
F9D9 DEC E Subtract 2 from the character's x-coordinate if he's facing right
F9DA DEC E
F9DB INC D Add 2 to the character's y-coordinate
F9DC INC D
F9DD PUSH DE Save the character's new coordinates
F9DE AND $F8 A=character's base animatory state
F9E0 PUSH HL Save the character number briefly
F9E1 PUSH AF Save the character's base animatory state briefly
F9E2 CALL $F928 Prepare the sprite tiles used by the character when lying down
F9E5 POP AF Restore the character's base animatory state to A
F9E6 POP HL Restore the character number to H
F9E7 ADD A,$07 A=animatory state of the character lying down
F9E9 POP DE Restore the character's new coordinates to DE
F9EA JP $E9D5 Update the character's animatory state and location and update the SRB
Prev: F9D1 Up: Map Next: F9ED