Prev: 43071 Up: Map Next: 43155
43118: Convert Draw Coordinate
Used by the routines at WriteSpriteBuffer and DrawRoom.
Clone of ConvertCoordinateToBufferOffset used while drawing a room. Writes the offset to BufferPointer.
Input
B Vertical position
C Horizontal position
Output
HL Buffer offset (also written to BufferPointer)
ConvertDrawCoordinate 43118 LD A,24 DE=(24-B)*32.
43120 SUB B
43121 LD E,A
43122 LD D,0
43124 SLA E
43126 RL D
43128 SLA E
43130 RL D
43132 SLA E
43134 RL D
43136 SLA E
43138 RL D
43140 SLA E
43142 RL D
43144 LD A,33 HL=33-C.
43146 SUB C
43147 LD L,A
43148 LD H,0
43150 ADD HL,DE HL+=DE.
43151 LD (47829),HL Write HL to *BufferPointer.
43154 RET Return.
Prev: 43071 Up: Map Next: 43155