Routines

30543: Check whether character is on the top, middle or bottom floor


Used by routines at 30555, 30706, 57893, 64077 and 64416. Returns with the zero flag set if and only if the character is on the top, middle or bottom floor.

H Character number

30543 2E02 LD L,2
30545 7E LD A,(HL) A=character's y-coordinate
30546 FE03 CP 3 Is the character on the top floor?
30548 C8 RET Z Return if so
30549 FE0A CP 10 Is the character on the middle floor?
30551 C8 RET Z Return if so
30552 FE11 CP 17 Is the character on the bottom floor?
30554 C9 RET Return with the zero flag set if so