Prev: AA7F Up: Map Next: AAA0
AA8C: Get address of the item object buffer given its ID
Used by the routines at A92C, AA30, EB0F, EB55, EB95, EC3D and EEC1.
Input
B ID of the object to get data for.
HL On exit, points to its data buffer.
AA8C LD A,(IY+$0F) Get the current room.
AA8F LD HL,$BCE9 Point HL at the start of the object buffer data. (BCE9)
AA92 CALL $AC6C Get the address for this room's data.
AA95 LD A,B Is the object ID 0?
AA96 OR A
AA97 JR Z,$AA9F Return if it is, it's already pointing to the right place.
If the object ID is not zero, move to the right one.
AA99 INC HL Move forward four bytes to the next entry.
AA9A INC HL
AA9B INC HL
AA9C INC HL
AA9D DJNZ $AA99 Loop for 'n' number of times.
AA9F RET Return.
Prev: AA7F Up: Map Next: AAA0