Prev: F662 Up: Map Next: F6C6
F6AA: Convert Coordinate
Used by the routines at JumpTable_ConvertCoordinate, Print_Clipped and Draw_Actor.
Converts a column/row pair into an offset.
Convert_Coordinate F6AA XOR A Clear A, D and L.
F6AB LD D,A
F6AC LD L,A
F6AD LD A,$18 A=18-B.
F6AF SUB B
F6B0 SRL A Multiply the row by 20 into HL.
F6B2 RR L
F6B4 SRL A
F6B6 RR L
F6B8 SRL A
F6BA RR L
F6BC LD H,A
F6BD LD A,$21 E=21-C.
F6BF SUB C
F6C0 LD E,A
F6C1 ADD HL,DE Add the column and write *Print_BufferOffset.
F6C2 LD ($6412),HL
F6C5 RET Return.
View the equivalent code in Booty.
Prev: F662 Up: Map Next: F6C6