![]() |
Routines |
Prev: AE36 | Up: Map | Next: AE80 |
Used by the routines at Parser_ValidateItem, CheckItemGroupPresent, Handler_ScenicEvents, MovePlayerToRoom, Event_FomorianTribe, Process_EnterOozingQuagmire, Process_EnterFomoriansCavern, Process_EnterCauseway, Process_PreEnterBridonRoad, Process_GetUrn, Process_TakeCloakFromBody, Process_BuyMeatFromTrader, Process_ThrowMeatToBear, Process_BuyMeatFromTraderWithIron, Process_GiveFoodToBear, Process_ThrowFoodToBear, Process_EnterIntoLake, Process_ClimbUpLadder, Process_ClimbDownLadder, Process_CaptureRoman, Process_BuyMeatFromTraderWithSalt, Process_KillFomorian, Process_KillHareWithSword, Process_KillBear, Process_KillPigWithSword, Process_KillOxWithSword, Process_Guard and Action_Sleep.
|
||||||||||
ValidateItemPresent | AE6B | PUSH HL | Stash HL and DE on the stack. | |||||||
AE6C | PUSH DE | |||||||||
AE6D | LD E,A | Store the object ID in DE. | ||||||||
AE6E | LD D,$00 | |||||||||
AE70 | LD HL,$A66C | HL=Table_ItemEventLocations. | ||||||||
AE73 | ADD HL,DE | Add the object ID to the object/ event locations table. | ||||||||
AE74 | LD A,($A7C3) | Jump to Handler_Objects_Return if the object/ event table states that it's located in *CurrentRoom. Note also sets/ unsets the Z flag accordingly. | ||||||||
AE77 | CP (HL) | |||||||||
AE78 | JR Z,Handler_Objects_Return | |||||||||
Check the players inventory, as an object can still be used if it's being held.
|
||||||||||
AE7A | LD A,$01 | Lastly, set the Z flag if the item is in the players inventory. | ||||||||
AE7C | CP (HL) | |||||||||
Housekeeping; restore DE and HL to their previous values.
|
||||||||||
Handler_Objects_Return | AE7D | POP DE | Restore DE and HL from the stack. | |||||||
AE7E | POP HL | |||||||||
AE7F | RET | Return. | ||||||||
View the equivalent code in The Jewels Of Babylon.
|
Prev: AE36 | Up: Map | Next: AE80 |