![]() |
Routines |
28484 | CALL 28240 | Check whether ERIC is on a staircase |
28487 | LD L,0 | Point HL at byte 0 of ERIC's buffer |
28489 | JR C,28569 | Jump if ERIC's on a staircase |
28491 | BIT 7,(HL) | Check the "direction" bit of ERIC's animatory state |
28493 | LD A,D | A=ERIC's y-coordinate |
28494 | JR Z,28540 | Jump if ERIC's facing left |
28496 | CP 10 | Is ERIC on the middle floor? |
28498 | JR Z,28535 | Jump if so |
28500 | CP 14 | Is ERIC on the assembly hall stage? |
28502 | JR Z,28530 | Jump if so |
28504 | CP 17 | Is ERIC on the bottom floor? |
28506 | JP NZ,28449 | Move ERIC one space to the right if not |
28509 | LD A,E | A=ERIC's x-coordinate |
28510 | CP 176 | 176: Bottom of stairs up to the middle floor of the girls' skool |
28512 | JR NZ,28506 | Jump if ERIC is not at that point |
28514 | DEC D | Up a stair |
28515 | LD B,D | B=ERIC's post-midstride y-coordinate |
28516 | LD A,(53760) | A=ERIC's animatory state |
28519 | LD C,E | C=ERIC's current x-coordinate |
28520 | BIT 7,A | Is ERIC facing left? |
28522 | JR Z,28526 | Jump if so |
28524 | INC C | |
28525 | INC C | |
28526 | DEC C | C=ERIC's post-midstride x-coordinate |
28527 | JP 28114 | Put ERIC midstride |
28530 | LD A,E | A=ERIC's x-coordinate |
28531 | CP 81 | 81: Bottom of stairs leading up to the middle floor |
28533 | JR 28512 | Move ERIC up a stair if he's here |
28535 | LD A,E | A=ERIC's x-coordinate |
28536 | CP 19 | 19: Bottom of stairs leading up to the revision library |
28538 | JR 28512 | Move ERIC up a stair if he's here |
28540 | CP 10 | Is ERIC on the middle floor? |
28542 | JR NZ,28556 | Jump if not |
28544 | LD A,E | A=ERIC's x-coordinate |
28545 | CP 91 | 91: Bottom of stairs leading up to the head's study |
28547 | JR Z,28514 | Move ERIC up a stair if he's here |
28549 | CP 186 | 186: Bottom of stairs leading up to the top floor of the girls' skool |
28551 | JP NZ,28473 | Move ERIC one space left if he's not here |
28554 | JR 28514 | Otherwise move him up a stair |
28556 | CP 17 | Is ERIC on the bottom floor? |
28558 | JR NZ,28551 | Jump if not |
28560 | LD A,E | A=ERIC's x-coordinate |
28561 | CP 22 | 22: Bottom of stairs leading up to the middle floor at the far left of the boys' skool |
28563 | JR Z,28514 | Move ERIC up a stair if he's here |
28565 | CP 83 | 83: Bottom of stairs leading up to assembly hall stage |
28567 | JR 28551 | Move ERIC up a stair if he's here |
28569 | XOR (HL) | Set the carry flag if ERIC is facing the wrong way to ascend the stairs |
28570 | RLA | |
28571 | JP C,28216 | Turn ERIC round if he's facing the wrong way |
28574 | JR 28514 | Make ERIC go up a stair otherwise |