![]() |
Routines |
| Prev: 62051 | Up: Map | Next: 62107 |
|
Used by the routines at Validate_Take_BottleOfRum, Validate_Take_Fish, Validate_Take_Watch, Validate_Take_Shoe, Validate_Take_Fruit, Validate_Take_Rod, Validate_Take_Jewels, Validate_Take_Match, Validate_Take_Plank, Validate_Take_Coconut, Validate_Take_Gun, Validate_Take_Eyepatch, Validate_Take_KegOfGunpowder, Validate_Take_Sextant, Validate_Take_Crowbar, Validate_Take_Key, Validate_Take_Skull, Validate_Take_Spear and Validate_Take_Parrot.
Refuse the take when the object is already carried or the inventory is full; otherwise return so the caller can take it.
|
||||||||||||
| Take_IsPlayerHoldingItem | 62058 | CALL CheckObjectInInventory | Call CheckObjectInInventory. | |||||||||
|
Refuse when that object is already being carried.
|
||||||||||||
| 62061 | JR NZ,Take_InventoryFull | Jump to Take_InventoryFull if the item is not being held. | ||||||||||
| 62063 | POP HL | Restore HL from the stack. | ||||||||||
|
Finish the sentence "You're already carrying" with "it" or "them".
Print "You're already carrying ".
|
||||||||||||
| 62064 | LD HL,48912 | HL=Messaging_YoureAlreadyCarrying. | ||||||||||
| 62067 | CALL PrintString | Call PrintString. | ||||||||||
| 62070 | LD HL,62107 | HL=Table_ItemsWhichArePlural. | ||||||||||
| 62073 | LD A,E | Copy the object ID back into A. | ||||||||||
| 62074 | LD BC,1 | BC=0001. | ||||||||||
| 62077 | CPIR | Search Table_ItemsWhichArePlural for the item ID among the plural items (count 0001) to finish "You're already carrying " with "them." or "it.". | ||||||||||
| 62079 | JR Z,Take_AlreadyCarrying_Them | Jump to Take_AlreadyCarrying_Them if the item is plural. | ||||||||||
|
Print "it.".
|
||||||||||||
| 62081 | LD HL,48939 | HL=Messaging_It. | ||||||||||
| 62084 | JP PrintStringAndNewline_Alias | Jump to PrintStringAndNewline_Alias. | ||||||||||
|
Print "them.".
|
||||||||||||
| Take_AlreadyCarrying_Them | 62087 | LD HL,48943 | HL=Messaging_Them. | |||||||||
| 62090 | JP PrintStringAndNewline_Alias | Jump to PrintStringAndNewline_Alias. | ||||||||||
|
Refuse the object when the player is already holding 5 things.
|
||||||||||||
| Take_InventoryFull | 62093 | LD A,(48280) | Compare *Count_InventoryItems with 5... | |||||||||
| 62096 | CP 5 | |||||||||||
| 62098 | LD B,E | Copy the object ID into B. | ||||||||||
| 62099 | RET NZ | Return if *Count_InventoryItems is not equal to 5. | ||||||||||
| 62100 | POP HL | Restore HL from the stack. | ||||||||||
|
Print "You can't carry any more.".
|
||||||||||||
| 62101 | LD HL,48949 | HL=Messaging_YouCantCarryAnyMore. | ||||||||||
| 62104 | JP PrintStringAndNewline_Alias | Jump to PrintStringAndNewline_Alias. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: 62051 | Up: Map | Next: 62107 |