Prev: A60A Up: Map Next: A635
A62C: 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 A62C LD E,A Load the item ID into DE.
A62D LD D,$00
A62F LD HL,$9F88 Add the item ID offset to Table_ItemLocations.
A632 ADD HL,DE
A633 LD A,(HL) Fetch the item location and store it in A.
A634 RET Return.
View the equivalent code in;
Prev: A60A Up: Map Next: A635