Prev: 5EE6 Up: Map Next: 5F08
5EE8: 'F' pressed - fire catapult
The address of this routine is found in the table of keypress handling routines at E550. It is called from the main loop at F6EA when 'F' or '0' (zero) is pressed.
5EE8 CALL $E24F Give up right now if the catapult pellet's buffer is already in use
5EEB LD A,$0A 0x0A: ERIC raising the catapult
5EED CALL $5EB7 Adjust ERIC's animatory state, update the SRB, and return to 5EF0 (below) when it's time to deal with ERIC again
5EF0 LD A,$02 Message 0x02: NO CATAPULTS
5EF2 CALL $F898 Make any nearby teachers give ERIC lines
5EF5 LD A,$0B 0x0B: ERIC firing the catapult
5EF7 CALL $5EB7 Adjust ERIC's animatory state, update the SRB, and return to 5EFA (below) when it's time to deal with ERIC again
5EFA LD B,$D6 ERIC's catapult pellet uses buffer 0xD6
5EFC CALL $F975 Prepare the pellet's buffer and make a catapult sound effect
5EFF LD A,$0B 0x0B: ERIC (still) firing the catapult
5F01 CALL $5EB7 Adjust ERIC's animatory state, update the SRB, and return to 5F04 (below) when it's time to deal with ERIC again
5F04 LD A,$0A 0x0A: ERIC lowering the catapult
5F06 JR $5EE1 This is a bug; it should be JR 5EDF
Prev: 5EE6 Up: Map Next: 5F08