![]() |
Routines |
| Prev: 36813 | Up: Map | Next: 36880 |
|
Used by the routines at Validate_Take_Knife, Validate_Take_LaserPistol, Validate_Take_Coin, Validate_Take_CrystalRod, Validate_Take_Detonator, Validate_Take_MetalBar, Validate_Take_GlowingSphere, Validate_Take_PoisonFungus, Validate_Take_RoundStones, Validate_Take_Key, Validate_Take_SpaceAxe, Validate_Take_Explosives and Validate_Take_PairOfGloves.
Refuse the take when the object is already carried or the inventory is full; otherwise return so the caller can take it.
|
||||||||||||
| Take_IsPlayerHoldingItem | 36834 | CALL IsObjectCarried | Call IsObjectCarried. | |||||||||
|
Refuse when that object is already being carried.
|
||||||||||||
| 36837 | JR NZ,Take_InventoryFull | Jump to Take_InventoryFull if the item is not being held. | ||||||||||
| 36839 | POP HL | Restore HL from the stack. | ||||||||||
|
Finish the sentence "You're already carrying" with "it" or "them".
Print "You're already carrying ".
|
||||||||||||
| 36840 | LD HL,31263 | HL=Messaging_YouReAlreadyCarrying. | ||||||||||
| 36843 | CALL PrintString | Call PrintString. | ||||||||||
| Take_AlreadyCarrying_CheckPlural | 36846 | LD HL,36880 | HL=Table_ItemsWhichArePlural. | |||||||||
| 36849 | LD A,E | Copy the object ID back into A. | ||||||||||
| 36850 | LD BC,4 | BC=0004. | ||||||||||
| 36853 | CPIR | Search Table_ItemsWhichArePlural for the item ID among the plural items. | ||||||||||
| 36855 | JR Z,Take_AlreadyCarrying_Them | Jump to Take_AlreadyCarrying_Them if the item is plural. | ||||||||||
|
Print "it.".
|
||||||||||||
| 36857 | LD HL,31288 | HL=Messaging_It. | ||||||||||
| 36860 | JR TakeItem_PrintAndReturn | Jump to TakeItem_PrintAndReturn. | ||||||||||
|
Print "them.".
|
||||||||||||
| Take_AlreadyCarrying_Them | 36862 | LD HL,31292 | HL=Messaging_Them. | |||||||||
| 36865 | JR TakeItem_PrintAndReturn | Jump to TakeItem_PrintAndReturn. | ||||||||||
|
Refuse the object when the player is already holding 5 things.
|
||||||||||||
| Take_InventoryFull | 36867 | LD A,(25132) | Compare *Count_InventoryItems with 5. | |||||||||
| 36870 | CP 5 | |||||||||||
| 36872 | LD B,E | B=E. | ||||||||||
| 36873 | RET NZ | Return if *Count_InventoryItems is not equal to 5. | ||||||||||
| 36874 | POP HL | Restore HL from the stack. | ||||||||||
|
Print "You can't carry any more.".
|
||||||||||||
| 36875 | LD HL,30722 | HL=Messaging_YouCanTCarryAnyMore. | ||||||||||
| 36878 | JR TakeItem_PrintAndReturn | Jump to TakeItem_PrintAndReturn. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: 36813 | Up: Map | Next: 36880 |