![]() |
Routines |
| Prev: EEAE | Up: Map | Next: EEEB |
|
Used by the routines at Validate_Take_MarasBody, Validate_Take_Witch, Validate_Take_Food, Validate_Take_SilverCoin, Validate_Take_Bow, Validate_Take_Arrows, Validate_Take_Furnace, Validate_Take_Log, Validate_Take_Horn, Validate_Take_Key and Validate_Take_Rope.
Refuse the take when the object is already carried or the inventory is full; otherwise return so the caller can take it.
|
||||||||||||
| Take_IsPlayerHoldingItem | EEBA | CALL IsObjectCarried | Call IsObjectCarried. | |||||||||
|
Refuse when that object is already being carried.
|
||||||||||||
| EEBD | JR NZ,Take_InventoryFull | Jump to Take_InventoryFull if the item is not being held. | ||||||||||
| EEBF | POP HL | Restore HL from the stack. | ||||||||||
|
This entry point is used by the routine at Validate_Take_OpenChest.
Finish the sentence "You're already carrying" with "it" or "them".
Print "You're already carrying ".
|
||||||||||||
| Take_IsPlayerHoldingItem_0 | EEC0 | LD HL,$BCE0 | HL=Messaging_YoureAlreadyCarrying. | |||||||||
| EEC3 | CALL PrintString | Call PrintString. | ||||||||||
| EEC6 | LD HL,$EEEB | HL=Table_ItemsWhichArePlural. | ||||||||||
| EEC9 | LD A,E | Copy the object ID back into A. | ||||||||||
| EECA | LD BC,$0002 | BC=0002. | ||||||||||
| EECD | CPIR | Search for the item ID among the plural items. | ||||||||||
| EECF | JR Z,Take_AlreadyCarrying_Them | Jump to Take_AlreadyCarrying_Them if the item is plural. | ||||||||||
|
Print "it.".
|
||||||||||||
| EED1 | LD HL,$BCFB | HL=Messaging_It. | ||||||||||
| EED4 | JP PrintResponse | Jump to PrintResponse. | ||||||||||
|
Print "them.".
|
||||||||||||
| Take_AlreadyCarrying_Them | EED7 | LD HL,$BCFF | HL=Messaging_Them. | |||||||||
| EEDA | JP PrintResponse | Jump to PrintResponse. | ||||||||||
|
This entry point is used by the routine at Validate_Take_OpenChest.
Refuse the object when the player is already holding 06 things.
|
||||||||||||
| Take_InventoryFull | EEDD | LD A,($BA68) | Compare *Count_InventoryItems with 06. | |||||||||
| EEE0 | CP $06 | |||||||||||
| EEE2 | LD B,E | B=E. | ||||||||||
| EEE3 | RET NZ | Return if *Count_InventoryItems is not equal to 06. | ||||||||||
| EEE4 | POP HL | Restore HL from the stack. | ||||||||||
|
Print "You can't carry any more.".
|
||||||||||||
| EEE5 | LD HL,$BD05 | HL=Messaging_YouCantCarryAnyMore. | ||||||||||
| EEE8 | JP PrintResponse | Jump to PrintResponse. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: EEAE | Up: Map | Next: EEEB |