The Hobbit (v1.0)
Routines
Prev:
9CA5
Up:
Map
Next:
9CEC
9CA8: Drop everything an object holds
Makes everything held by object A the property of A's own holder (so things a dead character carried stay where it was). Things that evaporate (bit 1 of their flags) vanish instead, with 'X evaporates.'
9CA8
PUSH IY
9CAA
PUSH IX
9CAC
PUSH HL
9CAD
CALL
$9B25
IX = the object's record
9CB0
LD B,(IX+$01)
B = its holder: its things will belong to that
9CB3
LD IX,$BF50
Go through every object
9CB7
CALL
$9B04
Next object
9CBA
JR Z,$9CE6
End of the list
9CBC
CP (IY+$01)
Is it held by this object?
9CBF
JR NZ,$9CB7
No: next
9CC1
BIT 1,(IY+$07)
Does it evaporate (bit 1)?
9CC5
JR Z,$9CE0
No: pass it on
9CC7
PUSH AF
9CC8
LD (IY+$10),$00
Yes: it goes nowhere...
9CCC
LD (IY+$01),$FF
...belongs to nobody...
9CD0
RES 7,(IY+$07)
...and is invisible
9CD4
CALL
$9E10
Print its name
9CD7
LD HL,$B035
"evaporates."
9CDA
CALL
$72D4
9CDD
POP AF
9CDE
JR $9CB7
Next
9CE0
LD (IY+$01),B
Give it to the object's own holder
9CE3
JP $9CB7
Next
9CE6
POP HL
9CE7
POP IX
9CE9
POP IY
9CEB
RET
Prev:
9CA5
Up:
Map
Next:
9CEC