Prev: C29E Up: Map Next: C2D2
C2BE: Get Object Location
Return where this object is. 01 means it is being carried.
Input
A Object number
Output
A Location of the object
GetObjectLocation C2BE LD E,A Jump to GetObjectLocation_Next when this is a scenic entry rather than an object.
C2BF LD D,$00
C2C1 BIT 7,A
C2C3 JR NZ,GetObjectLocation_Next
C2C5 LD HL,$B9C8 Use the object locations and join the lookup.
C2C8 JR GetObjectLocation_Index
GetObjectLocation_Next C2CA LD HL,$BA48 Clear the scenic marker and use the scenic list.
C2CD RES 7,E
GetObjectLocation_Index C2CF ADD HL,DE Add the index to the base address.
C2D0 LD A,(HL)
C2D1 RET Return.
Prev: C29E Up: Map Next: C2D2