| The Hobbit (v1.0) | Routines |
| Prev: 8C3A | Up: Map | Next: 8C75 |
|
The actor must be carrying the target (8C3A). If the target is tied to the rope (it is 'held by' object 18), it is the rope that is dropped.
Dropping means setting the object's holder to $FF, which leaves it in the room. But objects with bit 1 of their flags set are liquids or things that do not survive being put down: they 'evaporate', which means their location is set to 0 (nowhere) and a message says so. The objects that behave like this are numbers 9, 20 (the wine), 21, 22, 23, 24 and 42.
|
||||
| 8C45 | CALL $8C3A | Is the actor carrying it? (If not, "you are not carrying it.") | ||
| 8C48 | CALL $9C99 | Dry run? Then stop: it would work | ||
| 8C4B | LD IX,($B5F8) | IX = the object's record | ||
| 8C4F | LD A,(IX+$01) | Is it tied to the rope (object 18)? | ||
| 8C52 | CP $12 | |||
| 8C54 | JR NZ,$8C5A | No | ||
| 8C56 | LD IX,$C255 | Yes: it is the rope that gets dropped | ||
| 8C5A | LD (IX+$01),$FF | Nobody holds it now: it lies in the room | ||
| 8C5E | BIT 1,(IX+$07) | Does it evaporate? | ||
| 8C62 | RET Z | No: done | ||
| 8C63 | LD (IX+$10),$00 | Yes: it goes nowhere | ||
| 8C67 | LD HL,$B034 | "<object> evaporates." | ||
| 8C6A | LD DE,$0008 | Push the object's name as the parameter | ||
| 8C6D | ADD IX,DE | |||
| 8C6F | PUSH IX | |||
| 8C71 | CALL $72D4 | |||
| 8C74 | RET | |||
| Prev: 8C3A | Up: Map | Next: 8C75 |