Skool Daze Routines
62574: 'F' pressed - fire catapult
Called from the main loop at 26471.
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 action timer at 32758 to 24
This entry point is used by the routine at 62610 with A=18, B=10 (ERIC raising fist), C=2; and by the routine at 62617 with A=16, B=12 (ERIC with arm raised), C=4.
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
62597 CALL 25108 Update SRB for ERIC's current location
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 (stage 1 of firing, hitting or jumping)
62606 ADD A,B
62607 JP 25008 Update ERIC's animatory state and location and update SRB