![]() |
Routines |
| 27823 | LD HL,32763 | Flip bit 7 of ERIC's status flags at 32763 |
| 27826 | LD A,(HL) | |
| 27827 | XOR 128 | |
| 27829 | LD (HL),A | |
| 27830 | LD H,172 | 172=ERIC |
| 27832 | RLCA | Is ERIC sitting now? |
| 27833 | JR C,27843 | Jump if so |
| 27835 | CALL 25108 | Update SRB for current location of ERIC |
| 27838 | AND 128 | A=animatory state of ERIC standing up |
| 27840 | JP 25008 | Update ERIC's animatory state and location and update SRB |
| 27843 | CALL 25108 | Update SRB for current location of ERIC |
| 27846 | LD B,A | B=ERIC's animatory state |
| 27847 | CALL 26184 | Is ERIC on a staircase? |
| 27850 | JR Z,27864 | Jump if not |
| 27852 | LD A,E | A=ERIC's x-coordinate |
| 27853 | CP 48 | |
| 27855 | LD A,133 | 133=ERIC sitting down facing right |
| 27857 | JR C,27861 | Jump if ERIC is on a staircase on left side of skool |
| 27859 | LD A,5 | 5=ERIC sitting down facing left |
| 27861 | JP 25008 | Update ERIC's animatory state and location and update SRB |
| 27864 | CP 169 | Is ERIC on the bottom floor? |
| 27866 | JR Z,27878 | Jump if so |
| 27868 | BIT 7,B | Is ERIC facing right? |
| 27870 | JR NZ,27878 | Jump if so |
| 27872 | CALL 27633 | This should be 'CALL 27632' - is ERIC beside a chair? |
| 27875 | JP Z,27517 | Jump if so |
| 27878 | LD A,B | A=6 or 134 (ERIC sitting on the floor) |
| 27879 | AND 128 | |
| 27881 | ADD A,6 | |
| 27883 | JP 25008 | Update ERIC's animatory state and location and update SRB |