Prev: 38539 Up: Map Next: 38674
38660: Get x- and y-coordinates of object A
Input
A Index of required object
Output
B y-coordinate
C x-coordinate
38660 LD C,A Multiply A by three...
38661 ADD A,A ...as entries in table at 25464 are three bytes long...
38662 ADD A,C ...
38663 LD L,A Load value into HL...
38664 LD H,0 ...
38666 LD BC,25465 Point BC at x-coordinate property of "nothing at all" in table at 25464
38669 ADD HL,BC Add HL as offset to BC (into HL)
38670 LD C,(HL) Load x-coordinate into C
38671 INC HL Advance by one byte
38672 LD B,(HL) Load y-coordinate into B
38673 RET Return
Prev: 38539 Up: Map Next: 38674