Prev: AEAF Up: Map Next: AEDA
AED1: Item Locator
Given an item ID, this routine returns the byte stored for its location (00 for when an item/ event is disabled, 01 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, 01 for the players inventory, or 00 for when the item is disabled
Create an offset in DE.
ItemLocator AED1 LD E,A Load the item ID into DE.
AED2 LD D,$00
AED4 LD HL,$A66C Add the item ID offset to Table_ItemEventLocations.
AED7 ADD HL,DE
AED8 LD A,(HL) Fetch the item location and store it in A.
AED9 RET Return.
View the equivalent code in The Jewels Of Babylon.
Prev: AEAF Up: Map Next: AEDA