![]() |
Routines |
B | ERIC's animatory state |
DE | ERIC's coordinates |
26194 | CALL 25956 | Is ERIC sitting or lying down? |
26197 | RET NZ | Return if so |
26198 | CALL 26184 | Check whether ERIC is on a staircase |
26201 | LD A,E | A=ERIC's x-coordinate |
26202 | JR Z,26212 | Jump if ERIC's not on a staircase |
26204 | CP 48 | Is ERIC on a staircase at the right of the skool? |
26206 | JP NC,25983 | Move ERIC down a step if so |
26209 | JP 26084 | Otherwise move ERIC up a step |
26212 | BIT 7,B | Is ERIC facing right? |
26214 | JP NZ,25962 | Jump to turn ERIC round if so |
26217 | AND A | Is ERIC standing at the far left side of the skool? |
26218 | RET Z | Return if so |
26219 | LD A,D | A=ERIC's y-coordinate |
26220 | CP 169 | Is ERIC on the bottom floor? |
26222 | JR Z,26234 | Jump if so |
26224 | CP 155 | 155=top floor |
26226 | LD A,58 | 58=x-coordinate of wall between Map and Reading Rooms |
26228 | JR Z,26232 | Jump if ERIC's on the top floor |
26230 | LD A,39 | 39=x-coordinate of wall between Exam and White Rooms |
26232 | CP E | Is ERIC facing this wall (from the left side)? |
26233 | RET Z | Return if so |
26234 | LD A,1 | A=1 (ERIC midstride, facing left) |
26236 | LD L,E | L=ERIC's current x-coordinate |
26237 | DEC E | E=ERIC's post-midstride x-coordinate |
26238 | LD C,A | C=1/129 (ERIC midstride) |
26239 | LD A,(32764) | The routine at 63056 resets bit 5 at 32764; otherwise it will always be set |
26242 | BIT 5,A | |
26244 | JR Z,26250 | This jump is never made |
26246 | LD A,C | Clearly these instructions have no effect, but one wonders what they might once have been and done |
26247 | ADD A,0 | |
26249 | LD C,A | |
26250 | LD A,(32763) | Pick up ERIC's status flags in A |
26253 | BIT 6,A | Bit 6 at 32763 is always reset, so this jump is always made |
26255 | JR Z,26261 | |
26257 | LD A,C | Clearly these instructions have no effect, but one wonders what they might once have been and done |
26258 | ADD A,0 | |
26260 | LD C,A | |
26261 | LD A,C | A=1/129 (ERIC midstride) |
26262 | LD H,D | H=ERIC's current y-coordinate |
26263 | LD B,A | B=2/130 (ERIC standing, stage 3) |
26264 | INC B | |
26265 | BIT 0,L | Is ERIC's current x-coordinate even? |
26267 | JR Z,26273 | Jump if so |
26269 | DEC B | Adjust ERIC's midstride animatory state (in A) and post-midstride animatory state (in B) to 3/131 and 0/128 if ERIC's current x-coordinate is odd |
26270 | DEC B | |
26271 | ADD A,2 | |
26273 | JP 25916 | Put ERIC midstride |