H | 210 (ERIC), 214 (water) |
63878 | 11FC9F | LD DE,40956 | DE points to the plant-pot location table (see below) |
63881 | 2E02 | LD L,2 | |
63883 | 1A | LD A,(DE) | Pick up the y-coordinate of the plant pot |
63884 | BE | CP (HL) | Does this match the character's y-coordinate? |
63885 | 2006 | JR NZ,63893 | Jump if not |
63887 | 2D | DEC L | |
63888 | 15 | DEC D | |
63889 | 1A | LD A,(DE) | Pick up the x-coordinate of the plant pot |
63890 | BE | CP (HL) | Does this match the character's x-coordinate? |
63891 | C8 | RET Z | Return with zero flag set if so |
63892 | 14 | INC D | |
63893 | 1C | INC E | |
63894 | 20F1 | JR NZ,63881 | Jump back until all four plant pots have been checked |
63896 | 1C | INC E | Reset the zero flag to indicate lack of plant pot here |
63897 | C9 | RET |
E=252 | E=253 | E=254 | E=255 | ||
D=158 | 91 | 93 | 132 | 135 | x-coordinate |
D=159 | 2 | 9 | 16 | 16 | y-coordinate |