Prev: 25533 Up: Map Next: 25554
25534: Determine ERIC's y-coordinate
Used by the routines at 25944 and 32000. Returns with D holding ERIC's y-coordinate if he has his feet on the floor. Otherwise returns with D=3, 10, 14 or 17, indicating the floor that ERIC is directly above.
25534 LD DE,(53761) Get ERIC's coordinates in DE
25538 LD A,(32763) Copy ERIC's status flags from 32763 to A
25541 RRCA Is ERIC jumping?
25542 JR C,25551 Jump if so
25544 RRCA Does ERIC have his feet on the floor?
25545 RET NC Return if so (with D holding ERIC's y-coordinate)
25546 LD A,(32749) Copy ERIC's other status flags from 32749 to A
25549 AND 6 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
25551 JP 28085 Determine which floor ERIC's closest to
Prev: 25533 Up: Map Next: 25554