| Routines

23863: 'T' pressed - throw away the water pistol

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 'T' is pressed.
23863 | LD A,(32747) | 32747 holds the inventory flags
23866 | AND 24 | Has ERIC got the water pistol (bit 3 or 4 set)?
23868 | RET Z | Return if not
23869 | LD A,39 | 39: animatory state of ERIC bending over
23871 | LD HL,23877 | Place 23877 into 32727 to take care of ERIC from this point on, update ERIC's animatory state, and update the SRB
23874 | JP 57642
This is where we deal with ERIC after 'T' has been pressed:
23877 | LD HL,32747 | Reset bits 3 and 4 of the inventory flags at 32747, thus dropping the water pistol
23880 | LD A,(HL)
23881 | AND 231
23883 | LD (HL),A
23884 | JP 31746 | Print the inventory