Routines

23863: 'T' pressed - throw away water pistol


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

23863 3AEB7F LD A,(32747) A=inventory flags
23866 E618 AND 24 Has ERIC got the water pistol?
23868 C8 RET Z Return if not
23869 3E27 LD A,39 39: animatory state of ERIC bending over
23871 21455D LD HL,23877 Place address 23877 into 32727 to take care of ERIC from this point on
23874 C32AE1 JP 57642

This is where we deal with ERIC after 'T' has been pressed:
23877 21EB7F LD HL,32747
23880 7E LD A,(HL) A=inventory flags
23881 E6E7 AND 231 Lose bits 3 and 4, dropping water pistol
23883 77 LD (HL),A
23884 C3027C JP 31746 Print inventory