Back to Skool Routines
63878: Check for presence of plant pot
Used by the routines at 23907 and 64077. Returns with the zero flag set if the character is on top of a plant pot.
H 210 (ERIC) or 214 (water)
63878 LD DE,40956 Point DE at the plant-pot location table (see below)
63881 LD L,2 Point HL at byte 2 of the character's buffer
63883 LD A,(DE) A=y-coordinate of the plant pot
63884 CP (HL) Does this match the character's y-coordinate?
63885 JR NZ,63893 Jump if not
63887 DEC L L=1
63888 DEC D D=158
63889 LD A,(DE) A=x-coordinate of the plant pot
63890 CP (HL) Does this match the character's x-coordinate?
63891 RET Z Return with the zero flag set if so
63892 INC D D=159
63893 INC E Next plant pot
63894 JR NZ,63881 Jump back until all four plant pots have been checked
63896 INC E Reset the zero flag to indicate the lack of any plant pot here
63897 RET
This is the plant-pot location table:
E=252 E=253 E=254 E=255
D=158 91 93 132 135 x-coordinate
D=159 2 9 16 16 y-coordinate