Prev: AC06 Up: Map Next: AC69
AC5F: Get the address for the co-ordinate table of a room
Used by the routines at AC06, AE5D and F277.
Input
A The co-ordinate table index
HL On exit, holds the address of the co-ordinate table to use
AC5F ADD A,A Double the co-ordinate index to get a word offset.
AC60 LD HL,$AF10 Point HL at the start of the co-ordinate tables. (AF10)
AC63 ADD A,L Add the offset to get the correct address.
AC64 JR NC,$AC67 Increment the high byte if there was an overflow, which shouldn't happen unless there's a bug.
AC66 INC H
AC67 LD L,A Set the correct address and return.
AC68 RET
Prev: AC06 Up: Map Next: AC69