![]() |
Routines |
| Prev: 27265 | Up: Map | Next: 27309 |
|
Wears the object. It must be carried and in this room, and it must not already be worn. The worn id replaces the object's location and the carried count drops.
|
||||||||||
| WearObject | 27267 | CALL ObjectAddress | Call ObjectAddress. | |||||||
| 27270 | LD A,(23946) | Jump to WearObject_Held if it is not *WornObject. | ||||||||
| 27273 | CP C | |||||||||
| 27274 | JR NZ,WearObject_Held | |||||||||
|
Print "you are wearing it.".
|
||||||||||
| 27276 | LD A,29 | Print SystemMessage_1D using PrintSystemMessage. | ||||||||
| 27278 | JP GetObject_Refuse | |||||||||
|
Wear it if it is carried or here.
|
||||||||||
| WearObject_Held | 27281 | LD A,(23945) | Jump to WearObject_Count if it is *CarriedObject. | |||||||
| 27284 | CP C | |||||||||
| 27285 | JR Z,WearObject_Count | |||||||||
| 27287 | LD A,(23943) | Jump to WearObject_Take if it is *CurrentRoom. | ||||||||
| 27290 | CP C | |||||||||
| 27291 | JR Z,WearObject_Take | |||||||||
|
Print "sorry, I don't see it here.".
|
||||||||||
| 27293 | LD A,22 | Print SystemMessage_16 using PrintSystemMessage. | ||||||||
| 27295 | JP GetObject_Refuse | |||||||||
|
Count one fewer carried object.
|
||||||||||
| WearObject_Count | 27298 | PUSH HL | Stash HL on the stack. | |||||||
| 27299 | LD HL,23948 | Decrement *CarriedCount. | ||||||||
| 27302 | DEC (HL) | |||||||||
| 27303 | POP HL | Restore HL from the stack. | ||||||||
|
Mark the object as worn.
|
||||||||||
| WearObject_Take | 27304 | LD A,(23946) | Write *WornObject into the object's location. | |||||||
| 27307 | LD (HL),A | |||||||||
| 27308 | RET | Return. | ||||||||
| Prev: 27265 | Up: Map | Next: 27309 |