Prev: 49822 Up: Map Next: 49874
49854: Get Object Location
Return where this object is. 1 means it is being carried.
Input
A Object number
Output
A Location of the object
GetObjectLocation 49854 LD E,A Jump to GetObjectLocation_Next when this is a scenic entry rather than an object.
49855 LD D,0
49857 BIT 7,A
49859 JR NZ,GetObjectLocation_Next
49861 LD HL,47560 Use the object locations and join the lookup.
49864 JR GetObjectLocation_Index
GetObjectLocation_Next 49866 LD HL,47688 Clear the scenic marker and use the scenic list.
49869 RES 7,E
GetObjectLocation_Index 49871 ADD HL,DE Add the index to the base address.
49872 LD A,(HL)
49873 RET Return.
Prev: 49822 Up: Map Next: 49874