Prev: 7154 Up: Map Next: 717A
7166: Prevent ERIC from getting past ALBERT if necessary
Used by the routine at 6E9B. Impedes ERIC's progress if ALBERT is standing right in front of him with his arm up.
E x-coordinate of the spot in front of ERIC
7166 LD A,($D200) A=ERIC's animatory state
7169 RLCA Is ERIC facing left?
716A RET NC Return if so
716B LD A,($CD00) A=ALBERT's animatory state
716E CP $7F 0x7F: Is ALBERT facing left with his arm up?
7170 RET NZ Return if not
7171 LD A,($CD01) A=ALBERT's x-coordinate
7174 SUB $01
7176 CP E Is ERIC standing in front of ALBERT (facing him)?
7177 RET NZ Return if not
7178 POP BC Drop the return address, preventing any forward movement by ERIC
7179 RET Return to the main loop
Prev: 7154 Up: Map Next: 717A