![]() |
Routines |
Prev: 44598 | Up: Map | Next: 44672 |
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 | 44651 | PUSH HL | Stash HL and DE on the stack. | |||||||
44652 | PUSH DE | |||||||||
44653 | LD E,A | Store the object ID in DE. | ||||||||
44654 | LD D,0 | |||||||||
44656 | LD HL,42604 | HL=Table_ItemEventLocations. | ||||||||
44659 | ADD HL,DE | Add the object ID to the object/ event locations table. | ||||||||
44660 | LD A,(42947) | 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. | ||||||||
44663 | CP (HL) | |||||||||
44664 | JR Z,Handler_Objects_Return | |||||||||
Check the players inventory, as an object can still be used if it's being held.
|
||||||||||
44666 | LD A,1 | Lastly, set the Z flag if the item is in the players inventory. | ||||||||
44668 | CP (HL) | |||||||||
Housekeeping; restore DE and HL to their previous values.
|
||||||||||
Handler_Objects_Return | 44669 | POP DE | Restore DE and HL from the stack. | |||||||
44670 | POP HL | |||||||||
44671 | RET | Return. | ||||||||
View the equivalent code in The Jewels Of Babylon.
|
Prev: 44598 | Up: Map | Next: 44672 |