917B: Background : Draw a single column of a furniture bitmap.
Bg_DrawItemColumn |
917B |
LD (Bitmap_temp),HL |
|
917E |
LD L,(IX+$02) |
|
9181 |
CALL Bitmap_CopyFrame |
|
9184 |
LD HL,(Bitmap_temp) |
|
9187 |
LD A,(Bitmap_InfoCache_Height) |
|
918A |
AND $7F |
|
918C |
RLA |
|
918D |
RLA |
|
918E |
RLA |
|
918F |
LD E,A |
|
9190 |
LD D,$00 |
|
9192 |
ADD HL,DE |
|
9193 |
EX DE,HL |
|
9194 |
LD HL,$0050 |
|
9197 |
AND A |
|
9198 |
SBC HL,DE |
|
919A |
RET C |
|
919B |
ADD HL,HL |
|
919C |
LD E,L |
|
919D |
LD D,H |
|
919E |
ADD HL,HL |
|
919F |
ADD HL,HL |
|
91A0 |
ADD HL,HL |
|
91A1 |
ADD HL,HL |
|
91A2 |
ADD HL,DE |
|
91A3 |
LD DE,(Ptr_Offscreen) |
|
91A7 |
ADD HL,DE |
|
91A8 |
LD (Temp_BlitTo),HL |
|
91AB |
LD E,(IX+$00) |
|
91AE |
LD D,(IX+$01) |
|
91B1 |
LD HL,(Coords_EW) |
|
91B4 |
LD A,(Camera_Compass) |
|
91B7 |
BIT 0,A |
|
91B9 |
JR Z,Bg_DrawItemColumn_0 |
|
91BB |
LD HL,(Coords_NS) |
Bg_DrawItemColumn_0 |
91BE |
CALL sub_abs |
|
91C1 |
EX DE,HL |
|
91C2 |
LD A,(Bitmap_InfoCache_Width) |
|
91C5 |
AND $7F |
|
91C7 |
LD L,A |
|
91C8 |
LD H,$00 |
|
91CA |
LD A,(Hero_LastDirection) |
|
91CD |
CP $02 |
|
91CF |
JR Z,Bg_DrawItemColumn_1 |
|
91D1 |
EX DE,HL |
|
91D2 |
AND A |
|
91D3 |
SBC HL,DE |
|
91D5 |
EX DE,HL |
|
91D6 |
LD HL,$0020 |
|
91D9 |
SBC HL,DE |
|
91DB |
JR Bg_DrawItemColumn_2 |
Bg_DrawItemColumn_1 |
91DD |
ADD HL,DE |
|
91DE |
LD DE,$0022 |
|
91E1 |
AND A |
|
91E2 |
SBC HL,DE |
Bg_DrawItemColumn_2 |
91E4 |
SRL H |
|
91E6 |
RR L |
|
91E8 |
EX DE,HL |
Bitmap_DrawColumn |
91E9 |
LD BC,(Bitmap_InfoCache) |
|
91ED |
EX DE,HL |
|
91EE |
ADD HL,BC |
|
91EF |
PUSH HL |
|
91F0 |
EX (SP),IX |
|
91F2 |
LD HL,(Temp_BlitTo) |
|
91F5 |
LD A,(Bitmap_InfoCache_Height) |
|
91F8 |
AND $7F |
|
91FA |
EX AF,AF' |
|
91FB |
LD A,(Bitmap_InfoCache_Width) |
|
91FE |
AND $7F |
|
9200 |
LD C,A |
|
9201 |
LD B,$00 |
|
9203 |
LD DE,$0022 |
|
9206 |
EX AF,AF' |
|
9207 |
AND A |
|
9208 |
RLA |
|
9209 |
RLA |
|
920A |
RLA |
Bg_DrawItemColumn_3 |
920B |
EX AF,AF' |
|
920C |
LD A,(IX+$00) |
|
920F |
XOR (HL) |
|
9210 |
LD (HL),A |
|
9211 |
ADD HL,DE |
|
9212 |
ADD IX,BC |
|
9214 |
EX AF,AF' |
|
9215 |
DEC A |
|
9216 |
JR NZ,Bg_DrawItemColumn_3 |
|
9218 |
POP IX |
|
921A |
RET |
Bg_DrawItemColumn_4 |
921B |
LD C,A |
|
921C |
LD B,$00 |
|
921E |
LD L,(IX+$00) |
|
9221 |
LD H,(IX+$01) |
|
9224 |
RES 7,H |
|
9226 |
SBC HL,BC |
|
9228 |
LD E,L |
|
9229 |
LD D,H |
|
922A |
ADD HL,BC |
|
922B |
ADD HL,BC |
|
922C |
LD C,L |
|
922D |
LD B,H |
|
922E |
LD HL,(_9689_coordsA) |
|
9231 |
SBC HL,BC |
|
9233 |
JR NC,Bg_DrawItemColumn_5 |
|
9235 |
LD HL,(_968b_coordsB) |
|
9238 |
SCF |
|
9239 |
SBC HL,DE |
|
923B |
RET C |
|
923C |
AND A |
|
923D |
RET |
Bg_DrawItemColumn_5 |
923E |
SCF |
|
923F |
RET |