![]() |
Routines |
28160 | LD H,210 | 210=ERIC |
28162 | CALL 25012 | Update SRB for ERIC's current animatory state (midstride) and location |
28165 | LD L,3 | A=ERIC's post-midstride/post-action animatory state |
28167 | LD A,(HL) | |
28168 | INC L | Collect ERIC's post-midstride/post-action coordinates in DE |
28169 | LD E,(HL) | |
28170 | INC L | |
28171 | LD D,(HL) |
28172 | CALL 24880 | Update SRB for ERIC's new animatory state and location |
28175 | CALL 29012 | Make a sound effect |
28178 | LD L,0 | Point HL at byte 0 of ERIC's buffer |
28180 | LD A,(32767) | A=leftmost column of play area on screen |
28183 | BIT 7,(HL) | Check the "direction" bit of ERIC's animatory state |
28185 | LD L,1 | Byte 1 of ERIC's buffer holds his x-coordinate |
28187 | JR Z,28202 | Jump if ERIC's facing left |
28189 | CP 160 | Is the whole of the girls' skool on-screen? |
28191 | RET Z | Return if so (no need to scroll the screen) |
28192 | SUB (HL) | Is ERIC less than 22 character spaces from the left edge of the screen? |
28193 | CP 235 | |
28195 | RET NC | Return if so (no need to scroll the screen) |
28196 | CALL 25248 | Update the display |
28199 | JP 25026 | Scroll the screen to the left |
28202 | AND A | Is the far left wall of the boys' skool on-screen? |
28203 | RET Z | Return if so (no need to scroll the screen) |
28204 | SUB (HL) | Is ERIC more than 9 character spaces from the left edge of the screen? |
28205 | CP 247 | |
28207 | RET C | Return if so (no need to scroll the screen) |
28208 | CALL 25248 | Update the display |
28211 | JP 25080 | Scroll the screen to the right |