![]() |
Routines |
| Prev: 60142 | Up: Map | Next: 60197 |
|
Used by the routines at Handler_CheckPlayerInventory_PickUpItem, Take_Frog, Take_Flower, Take_Diamond, Take_Sapphire, Take_Money, Take_Wand, Take_Carpet, Take_CopperKey, Take_GoldKey, Take_JewelledKey, Take_Sword, Take_Water, Take_Acid, Take_Oil, Take_Cross, Take_Pillow, Take_Falcon and Take_Map.
Refuse the take when the object is already carried or the inventory is full; otherwise return so the caller can take it.
|
||||||||||||
| Take_IsPlayerHoldingItem | 60148 | CALL IsObjectInInventory | Call IsObjectInInventory. | |||||||||
|
Refuse when that object is already being carried.
|
||||||||||||
| 60151 | JR NZ,Take_InventoryFull | Jump to Take_InventoryFull if the item is not being held. | ||||||||||
| 60153 | POP HL | Restore HL from the stack. | ||||||||||
|
Finish the sentence "You're already carrying" with "it" or "them".
Print "You're already carrying ".
|
||||||||||||
| 60154 | LD HL,45298 | HL=Messaging_YoureAlreadyCarrying. | ||||||||||
|
This entry point is used by the routines at Drop_IsPlayerHoldingItem and IsPlayerCarryingItem.
Print the string at HL, then finish with "it." or "them.".
|
||||||||||||
| PrintStringAndItThemHandler | 60157 | CALL PrintString | Call PrintString. | |||||||||
|
Search Table_ItemsWhichArePlural among the plural items.
|
||||||||||||
| Take_AlreadyCarrying_CheckPlural | 60160 | LD HL,60061 | HL=Table_ItemsWhichArePlural. | |||||||||
| 60163 | LD A,E | Copy the object ID back into A. | ||||||||||
| 60164 | LD BC,1 | BC=0001. | ||||||||||
| 60167 | CPIR | Search Table_ItemsWhichArePlural for the item ID among the plural items. | ||||||||||
| 60169 | JR Z,Take_AlreadyCarrying_Them | Jump to Take_AlreadyCarrying_Them if the item is plural. | ||||||||||
|
Print "it.".
|
||||||||||||
| 60171 | LD HL,45325 | HL=Messaging_It. | ||||||||||
| 60174 | JP PrintResponse | Jump to PrintResponse. | ||||||||||
|
Print "them.".
|
||||||||||||
| Take_AlreadyCarrying_Them | 60177 | LD HL,45329 | HL=Messaging_Them. | |||||||||
| 60180 | JP PrintResponse | Jump to PrintResponse. | ||||||||||
|
Refuse the object when the player is already holding 8 things.
|
||||||||||||
| Take_InventoryFull | 60183 | LD A,(44698) | Compare *Count_InventoryItems with 8. | |||||||||
| 60186 | CP 8 | |||||||||||
| 60188 | LD B,E | B=E. | ||||||||||
| 60189 | RET NZ | Return if *Count_InventoryItems is not equal to 8. | ||||||||||
| 60190 | POP HL | Restore HL from the stack. | ||||||||||
|
Print "You can't carry any more.".
|
||||||||||||
| 60191 | LD HL,45335 | HL=Messaging_YouCantCarryAnyMore. | ||||||||||
| 60194 | JP PrintResponse | Jump to PrintResponse. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: 60142 | Up: Map | Next: 60197 |