Prev: 9D50 Up: Map Next: 9D97
9D53: Empty an object into whatever holds it
Used by the routines at KILL, BARREL_REACHES_LAKE and TROLLS_TURN_TO_STONE.
Everything held by the object in A passes to the object's own holder, except liquids (flag bit 1): those are poured away -- nowhere, held by nothing, not visible -- with a message.
Input
A The object
EMPTY_OUT 9D53 PUSH IY
9D55 PUSH IX
9D57 PUSH HL
9D58 CALL GET_OBJECT B = its holder
9D5B LD B,(IX+$01)
9D5E LD IX,$C060
EMPTY_OUT_0 9D62 CALL NEXT_OBJECT_KEEP_A Next object held by A
9D65 JR Z,EMPTY_OUT_2
9D67 CP (IY+$01)
9D6A JR NZ,EMPTY_OUT_0
9D6C BIT 1,(IY+$07) A liquid?
9D70 JR Z,EMPTY_OUT_1
9D72 PUSH AF Poured away
9D73 LD (IY+$10),$00
9D77 LD (IY+$01),$FF
9D7B RES 7,(IY+$07)
9D7F CALL PRINT_RECORD_NAME
9D82 LD HL,MSG_EVAPORATE_B
9D85 CALL RUN_MESSAGE_HL
9D88 POP AF
9D89 JR EMPTY_OUT_0
EMPTY_OUT_1 9D8B LD (IY+$01),B Anything else goes to the holder
9D8E JP EMPTY_OUT_0
EMPTY_OUT_2 9D91 POP HL
9D92 POP IX
9D94 POP IY
9D96 RET
Prev: 9D50 Up: Map Next: 9D97