Prev: 934C Up: Map Next: 938B
9358: Put the oldest carried thing back in the room
Used by the routines at PICK_UP and PUT_DOWN.
Reads the third slot at $5E38 and returns at once if it is empty, so nothing happens until the player is already carrying three. Otherwise it builds a record where the player is standing -- the sprite it had, the player's room from $EA91, then $80, then the player's x and y from $EA93 and $EA94 -- so a dropped object lands at your feet and can be picked straight back up.
DROP_CARRIED 9358 LD HL,$5E38 The slot about to be lost.
935B LD E,(HL)
935C INC HL
935D LD D,(HL)
935E INC HL
935F LD A,D
9360 OR E
9361 RET Z Nothing there: the player is not carrying three yet.
9362 PUSH DE
9363 LD A,(HL)
9364 INC HL
9365 LD (DE),A
9366 INC DE
9367 LD A,($EA91)
936A LD (DE),A
936B INC DE
936C LD A,$80
936E LD (DE),A
936F INC DE
9370 LD A,($EA93)
9373 LD (DE),A
9374 INC DE
9375 LD A,($EA94)
9378 LD (DE),A
9379 INC DE
937A LD A,(HL)
937B LD (DE),A
937C POP DE
937D CALL SHORT_HIGH_BEEP
9380 PUSH IX
9382 PUSH DE
9383 POP IX
9385 CALL DRAW_THING
9388 POP IX
938A RET
Prev: 934C Up: Map Next: 938B