![]() |
Routines |
| Prev: 8FCD | Up: Map | Next: 9010 |
|
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 | 8FE2 | CALL IsObjectCarried | Call IsObjectCarried. | |||||||||
|
Refuse when that object is already being carried.
|
||||||||||||
| 8FE5 | JR NZ,Take_InventoryFull | Jump to Take_InventoryFull if the item is not being held. | ||||||||||
| 8FE7 | POP HL | Restore HL from the stack. | ||||||||||
|
Finish the sentence "You're already carrying" with "it" or "them".
Print "You're already carrying ".
|
||||||||||||
| 8FE8 | LD HL,$7A1F | HL=Messaging_YouReAlreadyCarrying. | ||||||||||
| 8FEB | CALL PrintString | Call PrintString. | ||||||||||
| Take_AlreadyCarrying_CheckPlural | 8FEE | LD HL,$9010 | HL=Table_ItemsWhichArePlural. | |||||||||
| 8FF1 | LD A,E | Copy the object ID back into A. | ||||||||||
| 8FF2 | LD BC,$0004 | BC=0004. | ||||||||||
| 8FF5 | CPIR | Search Table_ItemsWhichArePlural for the item ID among the plural items. | ||||||||||
| 8FF7 | JR Z,Take_AlreadyCarrying_Them | Jump to Take_AlreadyCarrying_Them if the item is plural. | ||||||||||
|
Print "it.".
|
||||||||||||
| 8FF9 | LD HL,$7A38 | HL=Messaging_It. | ||||||||||
| 8FFC | JR TakeItem_PrintAndReturn | Jump to TakeItem_PrintAndReturn. | ||||||||||
|
Print "them.".
|
||||||||||||
| Take_AlreadyCarrying_Them | 8FFE | LD HL,$7A3C | HL=Messaging_Them. | |||||||||
| 9001 | JR TakeItem_PrintAndReturn | Jump to TakeItem_PrintAndReturn. | ||||||||||
|
Refuse the object when the player is already holding 05 things.
|
||||||||||||
| Take_InventoryFull | 9003 | LD A,($622C) | Compare *Count_InventoryItems with 05. | |||||||||
| 9006 | CP $05 | |||||||||||
| 9008 | LD B,E | B=E. | ||||||||||
| 9009 | RET NZ | Return if *Count_InventoryItems is not equal to 05. | ||||||||||
| 900A | POP HL | Restore HL from the stack. | ||||||||||
|
Print "You can't carry any more.".
|
||||||||||||
| 900B | LD HL,$7802 | HL=Messaging_YouCanTCarryAnyMore. | ||||||||||
| 900E | JR TakeItem_PrintAndReturn | Jump to TakeItem_PrintAndReturn. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: 8FCD | Up: Map | Next: 9010 |