6DE8: Draw a single column (8 pixels wide) of a bitmap using item data to calculate which column and where on the offscreen to draw.
BlitBmpColumn |
6DE8 |
LD ($6DE6),HL |
|
6DEB |
LD L,(IX+$02) |
|
6DEE |
LD H,$00 |
|
6DF0 |
ADD HL,HL |
|
6DF1 |
ADD HL,HL |
|
6DF2 |
LD BC,BitmapData_Width |
|
6DF5 |
ADD HL,BC |
|
6DF6 |
PUSH HL |
|
6DF7 |
LD A,(HL) |
|
6DF8 |
LD L,(IX+$01) |
|
6DFB |
LD H,$00 |
|
6DFD |
RRCA |
|
6DFE |
ADC HL,HL |
|
6E00 |
EX DE,HL |
|
6E01 |
LD HL,(ManData_PosSecondary_dfc5) |
|
6E04 |
EXX |
|
6E05 |
LD L,(IX+$00) |
|
6E08 |
LD H,$00 |
|
6E0A |
RLCA |
|
6E0B |
ADC HL,HL |
|
6E0D |
EX DE,HL |
|
6E0E |
LD HL,(ManData_PosPrimary_dfc3) |
|
6E11 |
LD A,(CamDirection_DFD2) |
|
6E14 |
AND $01 |
|
6E16 |
JR Z,BlitBmpColumn_0 |
|
6E18 |
EXX |
BlitBmpColumn_0 |
6E19 |
CALL abs(hl_minus_de) |
|
6E1C |
EX DE,HL |
|
6E1D |
POP BC |
|
6E1E |
LD A,(BC) |
|
6E1F |
AND $7F |
|
6E21 |
LD L,A |
|
6E22 |
LD H,$00 |
|
6E24 |
EX DE,HL |
|
6E25 |
SBC HL,DE |
|
6E27 |
JR C,BlitBmpColumn_1 |
|
6E29 |
LD A,L |
|
6E2A |
CP $06 |
|
6E2C |
JR NC,BlitBmpColumn_2 |
BlitBmpColumn_1 |
6E2E |
LD HL,($6DE6) |
|
6E31 |
JR BlitBmpColumn_3 |
BlitBmpColumn_2 |
6E33 |
DEC HL |
|
6E34 |
DEC HL |
|
6E35 |
ADD HL,HL |
|
6E36 |
ADD HL,HL |
BlitBmpColumn_3 |
6E37 |
DEC BC |
|
6E38 |
LD A,(BC) |
|
6E39 |
AND $7F |
|
6E3B |
RLA |
|
6E3C |
RLA |
|
6E3D |
RLA |
|
6E3E |
LD E,A |
|
6E3F |
LD D,$00 |
|
6E41 |
ADD HL,DE |
|
6E42 |
EX DE,HL |
|
6E43 |
LD HL,$0040 |
|
6E46 |
AND A |
|
6E47 |
SBC HL,DE |
|
6E49 |
RET C |
|
6E4A |
ADD HL,HL |
|
6E4B |
LD E,L |
|
6E4C |
LD D,H |
|
6E4D |
ADD HL,HL |
|
6E4E |
ADD HL,HL |
|
6E4F |
ADD HL,HL |
|
6E50 |
ADD HL,HL |
|
6E51 |
ADD HL,DE |
|
6E52 |
LD DE,(OffScrColPtr_6F14) |
|
6E56 |
ADD HL,DE |
|
6E57 |
LD (OffScrTempPtr_6F16),HL |
|
6E5A |
PUSH BC |
|
6E5B |
EXX |
|
6E5C |
CALL abs(hl_minus_de) |
|
6E5F |
EX DE,HL |
|
6E60 |
POP BC |
|
6E61 |
INC BC |
|
6E62 |
LD A,(BC) |
|
6E63 |
AND $7F |
|
6E65 |
LD L,A |
|
6E66 |
LD H,$00 |
|
6E68 |
LD A,(ManWalkDirection_DFD4) |
|
6E6B |
CP $02 |
|
6E6D |
JR Z,BlitBmpColumn_4 |
|
6E6F |
EX DE,HL |
|
6E70 |
AND A |
|
6E71 |
SBC HL,DE |
|
6E73 |
EX DE,HL |
|
6E74 |
LD HL,$0020 |
|
6E77 |
SBC HL,DE |
|
6E79 |
JR BlitBmpColumn_5 |
BlitBmpColumn_4 |
6E7B |
ADD HL,DE |
|
6E7C |
LD DE,$0022 |
|
6E7F |
AND A |
|
6E80 |
SBC HL,DE |
BlitBmpColumn_5 |
6E82 |
SRL H |
|
6E84 |
RR L |
|
6E86 |
EX DE,HL |
|
6E87 |
LD L,(IX+$02) |
|
6E8A |
LD H,$00 |
Blit_BmpColumn_Main |
6E8C |
ADD HL,HL |
|
6E8D |
ADD HL,HL |
|
6E8E |
LD BC, BitmapData_E |
|
6E91 |
ADD HL,BC |
|
6E92 |
LD C,(HL) |
|
6E93 |
INC HL |
|
6E94 |
LD B,(HL) |
|
6E95 |
INC HL |
|
6E96 |
EX DE,HL |
|
6E97 |
ADD HL,BC |
|
6E98 |
LD BC,BmpStart_E |
|
6E9B |
ADD HL,BC |
|
6E9C |
PUSH HL |
|
6E9D |
EX (SP),IX |
|
6E9F |
LD HL,(OffScrTempPtr_6F16) |
|
6EA2 |
LD A,(DE) |
|
6EA3 |
AND $7F |
|
6EA5 |
EX AF,AF' |
|
6EA6 |
INC DE |
|
6EA7 |
LD A,(DE) |
|
6EA8 |
AND $7F |
|
6EAA |
LD C,A |
|
6EAB |
LD B,$00 |
|
6EAD |
LD DE,$0022 |
|
6EB0 |
EX AF,AF' |
|
6EB1 |
AND A |
|
6EB2 |
RLA |
|
6EB3 |
RLA |
|
6EB4 |
RLA |
BlitBmpColumn_Draw |
6EB5 |
EX AF,AF' |
|
6EB6 |
LD A,(IX+$00) |
|
6EB9 |
XOR (HL) |
|
6EBA |
LD (HL),A |
|
6EBB |
ADD HL,DE |
|
6EBC |
ADD IX,BC |
|
6EBE |
EX AF,AF' |
|
6EBF |
DEC A |
|
6EC0 |
JR NZ,BlitBmpColumn_Draw |
|
6EC2 |
POP IX |
|
6EC4 |
RET |