Routines
| Prev: DC7B | Up: Map | Next: DCBB |
DC8D: Action record: default for verb 16 (DROP)
|
TAKE LAMP sets the lamp's holder (+1) to 0, the player; DROP LAMP sets it to $FF, the holder of the actor, by copying it from the actor's record ($A017). Dropping is just being held by what holds you.
|
||||||||||||||
| DC8D | DEFB $6A,$10,$B8,$DD | Action record header: flags $6A; bit 5: test D078 first; bit 6: pre-check at DDB8; byte 1 $10 | ||||||||||||
| DC91 | LD IX,($A013) | Read $A013 in "Game variables" into IX - IX = the direct object's record, IY = the actor's ($A017) | ||||||||||||
| DC95 | LD IY,($A017) | Read $A017 in "Game variables" into IY | ||||||||||||
| DC99 | LD A,(IY+$01) | Read byte +1 of the record at IY into A - The object's holder (+1) becomes the actor's holder | ||||||||||||
| DC9C | LD (IX+$01),A | Store A in byte +1 of the record at IX | ||||||||||||
| DC9F | OR $01 | Make A non-zero, which clears the zero flag, and hand that back to the caller - Succeed | ||||||||||||
| DCA1 | RET | Return to the caller | ||||||||||||
| DCA2 | CALL $D26C | Call the routine "Is the direct object carried by the actor? (carry =..." (D26C) | ||||||||||||
| DCA5 | JR C,$DCB6 | If the carry flag is set, skip ahead to DCB6 | ||||||||||||
|
This entry point is used by the routine at E3F5.
|
||||||||||||||
| DCA7 | LD A,($A036) | Read $A036 in "Game variables" into A - Is the actor inside the object (D278)? | ||||||||||||
| DCAA | LD HL,$A034 | Point HL at $A034 in "Game variables" | ||||||||||||
| DCAD | CALL $D278 | Call D278 (inside "Is thing A carried by the actor, perhaps...") | ||||||||||||
| DCB0 | JP C,$DC15 | If the carry flag is set, go back to the routine "Fail: A = 0, HL = 0, Z set" (DC15) - Yes: refuse (DC15) | ||||||||||||
| DCB3 | OR $01 | Make A non-zero, which clears the zero flag, and hand that back to the caller | ||||||||||||
| DCB5 | RET | Return to the caller | ||||||||||||
| DCB6 | LD HL,$DCBB | Point HL at "Refusal: "YOU ARE CARRYING THE ..."" (DCBB) | ||||||||||||
| DCB9 | XOR A | Set A to zero, which sets the zero flag for the caller | ||||||||||||
| DCBA | RET | Return to the caller | ||||||||||||
| Prev: DC7B | Up: Map | Next: DCBB |