| Routines

24296: 'F' pressed - fire catapult

The address of this routine is found in the table of keypress handling routines at 58704. It is called from the main loop at 63210 when 'F' or '0' (zero) is pressed.
24296 | CALL 57935 | Give up right now if the catapult pellet's buffer is already in use
24299 | LD A,10 | 10: ERIC raising the catapult
24301 | CALL 24247 | Adjust ERIC's animatory state, update the SRB, and return to 24304 (below) when it's time to deal with ERIC again
24304 | LD A,2 | Message 2: NO CATAPULTS
24306 | CALL 63640 | Make any nearby teachers give ERIC lines
24309 | LD A,11 | 11: ERIC firing the catapult
24311 | CALL 24247 | Adjust ERIC's animatory state, update the SRB, and return to 24314 (below) when it's time to deal with ERIC again
24314 | LD B,214 | ERIC's catapult pellet uses buffer 214
24316 | CALL 63861 | Prepare the pellet's buffer and make a catapult sound effect
24319 | LD A,11 | 11: ERIC (still) firing the catapult
24321 | CALL 24247 | Adjust ERIC's animatory state, update the SRB, and return to 24324 (below) when it's time to deal with ERIC again
24324 | LD A,10 | 10: ERIC lowering the catapult
24326 | JR 24289 | This is a bug; it should be JR 24287