![]() |
Routines |
| DE | ERIC's coordinates |
| 62574 | LD A,(43874) | A=x-coordinate of ERIC's catapult pellet |
| 62577 | RLCA | Is ERIC's catapult pellet already airborne? |
| 62578 | RET NC | Return if so |
| 62579 | LD BC,2049 | B=8 (ERIC raising catapult), C=1 (bit 0 set) |
| 62582 | LD A,24 | This will initialise the catapult-firing action timer at 32758 to 24 |
| 62584 | LD HL,32763 | 32763 holds ERIC's status flags |
| 62587 | BIT 7,(HL) | Is ERIC sitting? |
| 62589 | RET NZ | Return if so (ERIC can't fire, jump or hit while sitting) |
| 62590 | LD (HL),C | Otherwise set the appropriate bit in 32763 |
| 62591 | LD L,246 | Initialise the action timer at 32758 |
| 62593 | LD (HL),A | |
| 62594 | PUSH BC | Save ERIC's next animatory state temporarily |
| 62595 | LD H,172 | 172=ERIC |
| 62597 | CALL 25108 | Update SRB for ERIC's current animatory state |
| 62600 | POP BC | Restore ERIC's next animatory state to B |
| 62601 | LD L,102 | Store ERIC's current animatory state in byte 102 of his buffer |
| 62603 | LD (HL),A | |
| 62604 | AND 128 | A=ERIC's next animatory state (phase 1 of firing, hitting or jumping) |
| 62606 | ADD A,B | |
| 62607 | JP 25008 | Update ERIC's animatory state and update SRB |