Prev: 44719 Up: Map Next: 44762
44753: Item Locator
Given an item ID, this routine returns the byte stored for its location (0 for when an item/ event is disabled, 1 for when an item is in the players inventory, or pass back the room ID).
Input
A Item ID
Output
A Either a room ID, 1 for the players inventory, or 0 for when the item is disabled
Create an offset in DE.
ItemLocator 44753 LD E,A Load the item ID into DE.
44754 LD D,0
44756 LD HL,42604 Add the item ID offset to Table_ItemEventLocations.
44759 ADD HL,DE
44760 LD A,(HL) Fetch the item location and store it in A.
44761 RET Return.
View the equivalent code in The Jewels Of Babylon.
Prev: 44719 Up: Map Next: 44762