Routines

24263: 'H' pressed - hit


The address of this routine is found in the keypress table at 58624

24263 CD506E CALL 28240 Is ERIC on a staircase?
24266 D8 RET C Return if so
24267 3E08 LD A,8 8: ERIC hitting (raising fist)
24269 CDB75E CALL 24247 Adjust ERIC's animatory state, update SRB, and return to 24272 when it's time to deal with ERIC again
24272 2100D2 LD HL,53760 HL points to the first byte of ERIC's buffer
24275 7E LD A,(HL) Pick up ERIC's animatory state
24276 0F RRCA
24277 D22078 JP NC,30752 Jump if ERIC's animatory state is 8/136 (raising fist)
24280 3E61 LD A,97 Message no. 97: DON'T HIT YOUR MATES
24282 CD98F8 CALL 63640 Make a teacher give lines if necessary
24285 3E08 LD A,8 8: ERIC hitting (lowering fist)

This is where the routine at 24296 ought to enter:
24287 CDB75E CALL 24247 Adjust ERIC's animatory state, update SRB, and return to 24290 when it's time to deal with ERIC again

This entry point is used by the routine at 24348:
24290 AF XOR A A=0: animatory state of ERIC standing (finished firing, hitting or kissing)
24291 C3755D JP 23925