Prev: 63BD Up: Map Next: 63D2
63BE: Determine ERIC's y-coordinate
Used by the routines at 6558 and 7D00. Returns with D holding ERIC's y-coordinate if he has his feet on the floor. Otherwise returns with D=0x03, 0x0A, 0x0E or 0x11, indicating the floor that ERIC is directly above.
63BE LD DE,($D201) Get ERIC's coordinates in DE
63C2 LD A,($7FFB) Copy ERIC's status flags from 7FFB to A
63C5 RRCA Is ERIC jumping?
63C6 JR C,$63CF Jump if so
63C8 RRCA Does ERIC have his feet on the floor?
63C9 RET NC Return if so (with D holding ERIC's y-coordinate)
63CA LD A,($7FED) Copy ERIC's other status flags from 7FED to A
63CD AND $06 Set the zero flag unless bit 1 (ERIC is standing on a plant) or bit 2 (ERIC's stepping off a plant or the stage) is set
63CF JP $6DB5 Determine which floor ERIC's closest to
Prev: 63BD Up: Map Next: 63D2