![]() |
Routines |
| Prev: F263 | Up: Map | Next: F29B |
|
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 | F26A | CALL CheckObjectInInventory | Call CheckObjectInInventory. | |||||||||
|
Refuse when that object is already being carried.
|
||||||||||||
| F26D | JR NZ,Take_InventoryFull | Jump to Take_InventoryFull if the item is not being held. | ||||||||||
| F26F | POP HL | Restore HL from the stack. | ||||||||||
|
Finish the sentence "You're already carrying" with "it" or "them".
Print "You're already carrying ".
|
||||||||||||
| F270 | LD HL,$BF10 | HL=Messaging_YoureAlreadyCarrying. | ||||||||||
| F273 | CALL PrintString | Call PrintString. | ||||||||||
| F276 | LD HL,$F29B | HL=Table_ItemsWhichArePlural. | ||||||||||
| F279 | LD A,E | Copy the object ID back into A. | ||||||||||
| F27A | LD BC,$0001 | BC=0001. | ||||||||||
| F27D | CPIR | Search Table_ItemsWhichArePlural for the item ID among the plural items (count 0001) to finish "You're already carrying " with "them." or "it.". | ||||||||||
| F27F | JR Z,Take_AlreadyCarrying_Them | Jump to Take_AlreadyCarrying_Them if the item is plural. | ||||||||||
|
Print "it.".
|
||||||||||||
| F281 | LD HL,$BF2B | HL=Messaging_It. | ||||||||||
| F284 | JP PrintStringAndNewline_Alias | Jump to PrintStringAndNewline_Alias. | ||||||||||
|
Print "them.".
|
||||||||||||
| Take_AlreadyCarrying_Them | F287 | LD HL,$BF2F | HL=Messaging_Them. | |||||||||
| F28A | JP PrintStringAndNewline_Alias | Jump to PrintStringAndNewline_Alias. | ||||||||||
|
Refuse the object when the player is already holding 05 things.
|
||||||||||||
| Take_InventoryFull | F28D | LD A,($BC98) | Compare *Count_InventoryItems with 05... | |||||||||
| F290 | CP $05 | |||||||||||
| F292 | LD B,E | Copy the object ID into B. | ||||||||||
| F293 | RET NZ | Return if *Count_InventoryItems is not equal to 05. | ||||||||||
| F294 | POP HL | Restore HL from the stack. | ||||||||||
|
Print "You can't carry any more.".
|
||||||||||||
| F295 | LD HL,$BF35 | HL=Messaging_YouCantCarryAnyMore. | ||||||||||
| F298 | JP PrintStringAndNewline_Alias | Jump to PrintStringAndNewline_Alias. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: F263 | Up: Map | Next: F29B |