![]() |
Routines |
| Prev: 61102 | Up: Map | Next: 61163 |
|
Used by the routines at Validate_Take_MarasBody, Validate_Take_Witch, Validate_Take_Food, Validate_Take_SilverCoin, Validate_Take_Bow, Validate_Take_Arrows, Validate_Take_Furnace, Validate_Take_Log, Validate_Take_Horn, Validate_Take_Key and Validate_Take_Rope.
Refuse the take when the object is already carried or the inventory is full; otherwise return so the caller can take it.
|
||||||||||||
| Take_IsPlayerHoldingItem | 61114 | CALL IsObjectCarried | Call IsObjectCarried. | |||||||||
|
Refuse when that object is already being carried.
|
||||||||||||
| 61117 | JR NZ,Take_InventoryFull | Jump to Take_InventoryFull if the item is not being held. | ||||||||||
| 61119 | POP HL | Restore HL from the stack. | ||||||||||
|
This entry point is used by the routine at Validate_Take_OpenChest.
Finish the sentence "You're already carrying" with "it" or "them".
Print "You're already carrying ".
|
||||||||||||
| Take_IsPlayerHoldingItem_0 | 61120 | LD HL,48352 | HL=Messaging_YoureAlreadyCarrying. | |||||||||
| 61123 | CALL PrintString | Call PrintString. | ||||||||||
| 61126 | LD HL,61163 | HL=Table_ItemsWhichArePlural. | ||||||||||
| 61129 | LD A,E | Copy the object ID back into A. | ||||||||||
| 61130 | LD BC,2 | BC=0002. | ||||||||||
| 61133 | CPIR | Search for the item ID among the plural items. | ||||||||||
| 61135 | JR Z,Take_AlreadyCarrying_Them | Jump to Take_AlreadyCarrying_Them if the item is plural. | ||||||||||
|
Print "it.".
|
||||||||||||
| 61137 | LD HL,48379 | HL=Messaging_It. | ||||||||||
| 61140 | JP PrintResponse | Jump to PrintResponse. | ||||||||||
|
Print "them.".
|
||||||||||||
| Take_AlreadyCarrying_Them | 61143 | LD HL,48383 | HL=Messaging_Them. | |||||||||
| 61146 | JP PrintResponse | Jump to PrintResponse. | ||||||||||
|
This entry point is used by the routine at Validate_Take_OpenChest.
Refuse the object when the player is already holding 6 things.
|
||||||||||||
| Take_InventoryFull | 61149 | LD A,(47720) | Compare *Count_InventoryItems with 6. | |||||||||
| 61152 | CP 6 | |||||||||||
| 61154 | LD B,E | B=E. | ||||||||||
| 61155 | RET NZ | Return if *Count_InventoryItems is not equal to 6. | ||||||||||
| 61156 | POP HL | Restore HL from the stack. | ||||||||||
|
Print "You can't carry any more.".
|
||||||||||||
| 61157 | LD HL,48389 | HL=Messaging_YouCantCarryAnyMore. | ||||||||||
| 61160 | JP PrintResponse | Jump to PrintResponse. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: 61102 | Up: Map | Next: 61163 |