Prev: 5D33 Up: Map Next: 5D4F
5D37: 'T' pressed - throw away the water pistol
The address of this routine is found in the table of keypress handling routines at E550. It is called from the main loop at F6EA when 'T' is pressed.
5D37 LD A,($7FEB) 7FEB holds the inventory flags
5D3A AND $18 Has ERIC got the water pistol (bit 3 or 4 set)?
5D3C RET Z Return if not
5D3D LD A,$27 0x27: animatory state of ERIC bending over
5D3F LD HL,$5D45 Place 5D45 into 7FD7 to take care of ERIC from this point on, update ERIC's animatory state, and update the SRB
5D42 JP $E12A
This is where we deal with ERIC after 'T' has been pressed:
5D45 LD HL,$7FEB Reset bits 3 and 4 of the inventory flags at 7FEB, thus dropping the water pistol
5D48 LD A,(HL)
5D49 AND $E7
5D4B LD (HL),A
5D4C JP $7C02 Print the inventory
Prev: 5D33 Up: Map Next: 5D4F