Prev: C3AE Up: Map Next: C3E4
C3D0: Object/ Event Locator
Used by the routines at CheckObjectInInventory and TransformItem.
Input
A Object/ event ID
Output
A Room ID where the object is located
ObjectEventLocator C3D0 LD E,A Load the event ID into DE.
C3D1 LD D,$00
C3D3 BIT 7,A Jump to ObjectEventLocator_ScenicEvents if this is a scenic object/ event.
C3D5 JR NZ,ObjectEventLocator_ScenicEvents
C3D7 LD HL,$BBF0 HL=Table_ItemLocations.
C3DA JR ObjectEventLocator_Return Jump to ObjectEventLocator_Return.
ObjectEventLocator_ScenicEvents C3DC LD HL,$BC78 HL=Table_ScenicEventLocations.
Prepare object/ event ID for use.
C3DF RES 7,E Clear the scenic flag.
ObjectEventLocator_Return C3E1 ADD HL,DE Add the event ID to the event locations table.
C3E2 LD A,(HL) A=*HL.
C3E3 RET Return.
Prev: C3AE Up: Map Next: C3E4