Prev: 6F19 Up: Map Next: 751C
6F22: Draws a single column on the screen using the next object based on position.
Used by the routine at Vector_Main.
Input
HL Holds address of column on offscreen based on direction of walking / scrolling.
IX Points to table of offsets based on camera /compass and walking direction.
Screen_DrawColumn 6F22 LD (OffScrColPtr_6F14),HL Store draw to address on the offscreen.
6F25 LD DE,$0022 Clear a column down at that address.
6F28 LD B,$40
6F2A XOR A
Screen_DrawColumn_0 6F2B LD (HL),A
6F2C ADD HL,DE
6F2D DJNZ Screen_DrawColumn_0
6F2F CALL ExitAreaCheck See if hero is leaving area.
6F32 LD A,(CamDirection_DFD2) Workout a rectangle which is on the edge of the screen and the hero is walking towards.
6F35 AND A
6F36 RLA
6F37 RLA
6F38 RLA
6F39 LD C,A
6F3A LD B,$00
6F3C ADD IX,BC
6F3E LD HL,(ManData_PosPrimary_dfc3)
6F41 LD C,(IX+$00)
6F44 LD B,(IX+$01)
6F47 AND A
6F48 ADC HL,BC
6F4A JP P,Screen_DrawColumn_1
6F4D LD HL,$0000
Screen_DrawColumn_1 6F50 LD (Rectangle_x1),HL
6F53 LD HL,(ManData_PosPrimary_dfc3)
6F56 LD C,(IX+$04)
6F59 LD B,(IX+$05)
6F5C AND A
6F5D ADC HL,BC
6F5F RET M
6F60 RET Z
6F61 LD (Rectangle_x2),HL
6F64 LD HL,(ManData_PosSecondary_dfc5)
6F67 LD C,(IX+$02)
6F6A LD B,(IX+$03)
6F6D AND A
6F6E ADC HL,BC
6F70 JP P,Screen_DrawColumn_2
6F73 LD HL,$0000
Screen_DrawColumn_2 6F76 LD (Rectangle_y1),HL
6F79 LD HL,(ManData_PosSecondary_dfc5)
6F7C LD C,(IX+$06)
6F7F LD B,(IX+$07)
6F82 AND A
6F83 ADC HL,BC
6F85 RET M
6F86 RET Z
6F87 LD (Rectangle_y2),HL
Scan through the locations furniture.
6F8A LD IX,(AreaDataCurrent_SceneryPrimary)
Screen_DrawColumn_3 6F8E LD A,(IX+$00) If both positions are zero, end of list
6F91 OR (IX+$01)
6F94 JR Z,Screen_DrawColumn_8
6F96 LD A,(IX+$03)
6F99 AND $3F
6F9B JR Z,Screen_DrawColumn_4
6F9D LD HL,(AreaDataCurrent_Index)
6FA0 CP L
6FA1 JR NZ,DrawScenery_NextItem
Screen_DrawColumn_4 6FA3 LD (T1),A
6FA6 LD L,(IX+$02) Workout bitmap data address from index.
6FA9 LD H,$00
6FAB ADD HL,HL
6FAC ADD HL,HL
6FAD LD DE,BitmapData_Width
6FB0 ADD HL,DE
6FB1 LD A,(HL) Get width of bitmap.
6FB2 AND $7F
6FB4 CALL RectIntersection
6FB7 JR C,DrawScenery_NextItem
6FB9 LD A,(IX+$02) See if an alternate bitmap is required and store back into item data.
6FBC PUSH AF
6FBD CALL AltBitmapSearch
6FC0 LD (IX+$02),A
6FC3 LD L,A Get bitmap data address from item.BitmapIndex
6FC4 LD H,$00
6FC6 ADD HL,HL
6FC7 ADD HL,HL
6FC8 LD DE,BitmapData_Width
6FCB ADD HL,DE
6FCC LD A,(IX+$03) See if bitmap need flipping.
6FCF AND $20
6FD1 DEC A
6FD2 XOR (HL)
6FD3 AND $80
6FD5 JR NZ,Screen_DrawColumn_5
6FD7 LD L,(IX+$02)
6FDA LD H,$00
6FDC CALL BitmapMirror
Screen_DrawColumn_5 6FDF BIT 6,(IX+$03)
6FE3 JR NZ,Screen_DrawColumn_6
6FE5 LD HL,$0005 Blit next column of bitmap onto edge of offscreen.
6FE8 CALL BlitBmpColumn
6FEB JR Screen_DrawColumn_7
Create an action for this scenery object.
Screen_DrawColumn_6 6FED CALL Actions_CreateObj
Screen_DrawColumn_7 6FF0 POP AF
6FF1 LD (IX+$02),A
DrawScenery_NextItem 6FF4 LD BC,$0004
6FF7 ADD IX,BC
6FF9 JR Screen_DrawColumn_3
Variables
V1 6FFB DEFW $FFFC
V2 6FFD DEFW $0004
V3 6FFF DEFW $0000
Handle path junctions.
Screen_DrawColumn_8 7001 XOR A
7002 LD (PathBottomJunction),A
7005 LD A,$CA Index for the small path junction '/..\'
7007 LD (TempBlitItem_I),A
700A LD HL,$0004
700D LD DE,$0002
7010 LD BC,$0010
7013 LD A,$02
Loop for top and bottom edges of path.
Screen_DrawColumn_9 7015 PUSH AF
7016 LD (V1),HL
7019 LD (V2),DE
701D LD (V3),BC
7021 LD A,(PathBottomJunction)
7024 LD (PathTopJunction),A
7027 XOR A
7028 LD (PathBottomJunction),A
702B LD A,(CamDirection_DFD2)
702E BIT 0,A
7030 JR Z,Screen_DrawColumn_10
7032 LD IX,(AreaDataCurrent_Path_H)
7036 LD BC,(Rectangle_x1)
703A LD DE,(ManData_PosSecondary_dfc5)
703E JR Screen_DrawColumn_11
Screen_DrawColumn_10 7040 LD IX,(AreaDataCurrent_Path_V)
7044 LD BC,(Rectangle_y1)
7048 LD DE,(ManData_PosPrimary_dfc3)
Screen_DrawColumn_11 704C INC BC
704D INC BC
704E LD HL,(V1)
7051 CP $01
7053 JR Z,Screen_DrawColumn_12
7055 CP $02
7057 JR Z,Screen_DrawColumn_12
7059 EX DE,HL
705A AND A
705B SBC HL,DE
705D JR Screen_DrawColumn_13
Screen_DrawColumn_12 705F ADD HL,DE
Screen_DrawColumn_13 7060 EX DE,HL
Iterate throught the list of paths.
Screen_DrawColumn_14 7061 PUSH BC
7062 PUSH DE
7063 LD A,(IX+$00) Check to see if path is for current area.
7066 AND A
7067 JR Z,Screen_DrawColumn_15
7069 LD HL,AreaDataCurrent_Index
706C CP (HL)
706D JR NZ,Screen_DrawColumn_19
Screen_DrawColumn_15 706F LD L,(IX+$01) See if path intersects, at right angles, the test rectangle.
7072 LD H,$00
7074 ADD HL,HL
7075 AND A
7076 SBC HL,BC
7078 LD BC,(V2)
707C JR NC,Screen_DrawColumn_16
707E AND A
707F ADC HL,BC
7081 JP M,Screen_DrawColumn_19 It doesn't so move onto the next path in the list.
7084 JR Screen_DrawColumn_17
Screen_DrawColumn_16 7086 AND A If the rectangle position is before the current path, no need to check the rest as all paths are in order.
7087 SBC HL,BC
7089 JR NC,Screen_DrawColumn_20
Screen_DrawColumn_17 708B LD L,(IX+$02)
708E LD H,$00
7090 ADD HL,HL
7091 AND A
7092 SBC HL,DE
7094 JR NC,Screen_DrawColumn_19
7096 LD L,(IX+$03)
7099 LD H,$00
709B ADD HL,HL
709C SCF
709D SBC HL,DE
709F JR C,Screen_DrawColumn_19
70A1 LD L,(IX+$01)
70A4 LD H,$00
70A6 ADD HL,HL
70A7 LD A,(CamDirection_DFD2)
70AA AND $01
70AC JR NZ,Screen_DrawColumn_18
70AE EX DE,HL
Screen_DrawColumn_18 70AF SRL H
70B1 RR L
70B3 LD A,L
70B4 LD (TempBlitItem_P),A
70B7 SRL D
70B9 RR E
70BB LD A,E
70BC LD (TempBlitItem_S),A
70BF LD A,$01
70C1 LD (PathBottomJunction),A
70C4 LD IX,TempBlitItem_P
70C8 LD HL,(V3)
70CB CALL BlitBmpColumn For path junctions.
70CE JR Screen_DrawColumn_20
Next path.
Screen_DrawColumn_19 70D0 LD BC,$0004
70D3 ADD IX,BC
70D5 POP DE
70D6 POP BC
70D7 JR Screen_DrawColumn_14
Loop again to do bottom edge of path.
Screen_DrawColumn_20 70D9 POP DE
70DA POP BC
70DB LD A,$CC Index for the large path junction '/....\'
70DD LD (TempBlitItem_I),A
70E0 LD HL,$FFFC
70E3 LD DE,$0004
70E6 LD BC,$0000
70E9 POP AF
70EA DEC A
70EB JP NZ,Screen_DrawColumn_9
See which path edges need to be drawn.
70EE LD A,(CamDirection_DFD2)
70F1 BIT 0,A
70F3 JR NZ,Screen_DrawColumn_21
70F5 LD DE,(ManData_PosPrimary_dfc3)
70F9 LD IX,(AreaDataCurrent_Path_H)
70FD JR Screen_DrawColumn_22
Screen_DrawColumn_21 70FF LD DE,(ManData_PosSecondary_dfc5)
7103 LD IX,(AreaDataCurrent_Path_V)
Screen_DrawColumn_22 7107 LD A,(IX+$00) Check path is allowed for current area.
710A AND A
710B JR Z,Screen_DrawColumn_23
710D LD HL,AreaDataCurrent_Index
7110 CP (HL)
7111 JR NZ,Screen_DrawColumn_24
Screen_DrawColumn_23 7113 LD L,(IX+$01) Get the axis of the next path. ( Always double for true position on map.)
7116 LD H,$00
7118 ADD HL,HL
7119 AND A
711A SBC HL,DE Check to see if man's position is same as path.
711C JR Z,Screen_DrawColumn_25
711E JP NC,Screen_DrawColumn_31 If it is less then no edges to draw.
Loop for next path on list.
Screen_DrawColumn_24 7121 LD BC,$0004
7124 ADD IX,BC
7126 JR Screen_DrawColumn_22
TODO
Screen_DrawColumn_25 7128 LD A,(CamDirection_DFD2)
712B BIT 0,A
712D JR NZ,Screen_DrawColumn_26
712F LD BC,(Rectangle_y1)
7133 JR Screen_DrawColumn_27
Screen_DrawColumn_26 7135 LD BC,(Rectangle_x1)
Screen_DrawColumn_27 7139 INC BC
713A LD L,(IX+$02)
713D LD H,$00
713F ADD HL,HL
7140 AND A
7141 SBC HL,BC
7143 JR NC,Screen_DrawColumn_24
7145 LD A,L
7146 CPL
7147 LD L,A
7148 LD A,H
7149 CPL
714A LD H,A
714B INC HL
714C LD ( s0),HL
714F LD L,(IX+$03)
7152 LD H,$00
7154 ADD HL,HL
7155 AND A
7156 SBC HL,BC
7158 JR C,Screen_DrawColumn_24
Blit the bottom edge of the path if required.
715A LD ( s2),HL
715D LD A,C Work out which half of the 16 pixel bitmap to blit.
715E RRA
715F AND $01
7161 LD C,A
7162 LD B,$00
7164 LD A,(PathBottomJunction)
7167 AND A
7168 JR NZ,Screen_DrawColumn_29
716A PUSH BC
716B LD HL,( BitmapData_cf77) workout the address of the path edge bitmap from the bitmap data, offsetting to start from the half that needs to be blitted.
716E LD DE,BmpStart_E
7171 ADD HL,DE
7172 ADD HL,BC
7173 EX DE,HL
7174 LD HL,(OffScrColPtr_6F14)
7177 LD BC,$0770
717A ADD HL,BC
717B LD BC,$0022
717E LD A,$08
Screen_DrawColumn_28 7180 EX AF,AF' Blit one 8 pixel column of the path edge.
7181 LD A,(DE)
7182 XOR (HL)
7183 LD (HL),A
7184 ADD HL,BC
7185 INC DE
7186 INC DE
7187 EX AF,AF'
7188 DEC A
7189 JR NZ,Screen_DrawColumn_28
718B POP BC
Draw top edge of path if required.
Screen_DrawColumn_29 718C LD A,(PathTopJunction)
718F AND A
7190 JR NZ,Screen_DrawColumn_32
7192 LD HL,( s2)
7195 LD DE,$0002
7198 SBC HL,DE
719A JR C,Screen_DrawColumn_32
719C LD HL,( s0)
719F SBC HL,DE
71A1 JR C,Screen_DrawColumn_32
71A3 LD HL,( BitmapData_cf67)
71A6 LD DE,BmpStart_E
71A9 ADD HL,DE
71AA ADD HL,BC
71AB EX DE,HL
71AC LD HL,(OffScrColPtr_6F14)
71AF LD BC,$0550
71B2 ADD HL,BC
71B3 LD BC,$0022
71B6 LD A,$08
Screen_DrawColumn_30 71B8 EX AF,AF'
71B9 LD A,(DE)
71BA XOR (HL)
71BB LD (HL),A
71BC ADD HL,BC
71BD INC DE
71BE INC DE
71BF EX AF,AF'
71C0 DEC A
71C1 JR NZ,Screen_DrawColumn_30
71C3 JR Screen_DrawColumn_32
Draw middle path leading in, if needed. '/...\'
Screen_DrawColumn_31 71C5 LD A,(PathBottomJunction)
71C8 AND A
71C9 JR NZ,Screen_DrawColumn_36
71CB LD A,(PathTopJunction)
71CE AND A
71CF JR NZ,Screen_DrawColumn_36
71D1 JR S_DC_ItemDraw
Screen_DrawColumn_32 71D3 LD HL,( s2)
71D6 LD DE,$0004
71D9 AND A
71DA SBC HL,DE
71DC JR C,Screen_DrawColumn_33
71DE LD DE,( s0)
71E2 LD HL,$0004
71E5 SBC HL,DE
71E7 JR C,S_DC_ItemDraw
Screen_DrawColumn_33 71E9 LD DE,(Rectangle_y1)
71ED LD BC,(ManData_PosPrimary_dfc3)
71F1 LD A,(CamDirection_DFD2)
71F4 BIT 0,A
71F6 JR Z,Screen_DrawColumn_34
71F8 LD DE,(Rectangle_x1)
71FC LD BC,(ManData_PosSecondary_dfc5)
Screen_DrawColumn_34 7200 INC DE
7201 ADD HL,DE
7202 SRL B
7204 RR C
7206 LD A,C
7207 EX AF,AF'
7208 SRL H
720A RR L
720C LD A,L
720D LD HL,CamDirection_DFD2
7210 BIT 0,(HL)
7212 JR NZ,Screen_DrawColumn_35
7214 EX AF,AF'
Screen_DrawColumn_35 7215 LD (TempBlitItem_P),A
7218 EX AF,AF'
7219 LD (TempBlitItem_S),A
Screen_DrawColumn_36 721C LD IX,TempBlitItem_P
7220 LD (IX+$02),$CB
7224 LD HL,$0008
7227 CALL BlitBmpColumn For path ends and bends.
Draw Scenery Items
S_DC_ItemDraw 722A LD IX,(AreaDataCurrent_ScenerySecondary)
S_DC_ItemForEach 722E LD A,(IX+$00) Check for end of the list.
7231 OR (IX+$01)
7234 JP Z,Screen_DrawColumn_70
7237 LD A,(IX+$03) Get area index, 0 means ignore.
723A AND $3F
723C JR Z,Screen_DrawColumn_37
723E LD HL,(AreaDataCurrent_Index) If it doesn't match, next item.
7241 CP L
7242 JP NZ,S_DC_NextItem
Screen_DrawColumn_37 7245 LD (T1),A Store index of area value.
7248 LD A,(IX+$02) Object width
724B CALL RectIntersection Is object with draw rect (column).
724E JP C,S_DC_NextItem
7251 LD L,(IX+$01) Get positions of object and man and work out which is the path position and the axis position.
7254 LD H,$00
7256 LD A,(IX+$02)
7259 RRCA
725A ADC HL,HL
725C EX DE,HL
725D LD HL,(ManData_PosSecondary_dfc5)
7260 EXX
7261 LD L,(IX+$00)
7264 LD H,$00
7266 RLCA
7267 ADC HL,HL
7269 EX DE,HL
726A LD HL,(ManData_PosPrimary_dfc3)
726D LD A,(CamDirection_DFD2)
7270 AND $01
7272 JR Z,Screen_DrawColumn_38
7274 EXX
Screen_DrawColumn_38 7275 CALL abs(hl_minus_de) Using the axis position to see how close object is to man
7278 LD E,(IX+$02)
727B LD D,$00
727D AND A
727E SBC HL,DE
7280 JR C,Screen_DrawColumn_39
7282 LD A,L If farther than 8 units we do not draw.
7283 CP $08
7285 JP NC,S_DC_NextItem
7288 CP $06
728A JR NC,Screen_DrawColumn_40
Screen_DrawColumn_39 728C LD HL,$0005 If less than 6 we force to 5 uints.
728F JR Screen_DrawColumn_41
Screen_DrawColumn_40 7291 DEC HL Calculate position on offscreen from this.
7292 DEC HL
7293 ADD HL,HL
7294 ADD HL,HL
Screen_DrawColumn_41 7295 EX DE,HL
7296 LD HL,$0040
7299 AND A
729A SBC HL,DE
729C ADD HL,HL
729D LD E,L
729E LD D,H
729F ADD HL,HL
72A0 ADD HL,HL
72A1 ADD HL,HL
72A2 ADD HL,HL
72A3 ADD HL,DE
72A4 LD DE,(OffScrColPtr_6F14)
72A8 ADD HL,DE
72A9 LD (OffScrTempPtr_6F16),HL
72AC EXX Get path positions.
72AD LD A,(CamDirection_DFD2)
72B0 BIT 1,A
72B2 JR Z,Screen_DrawColumn_42
72B4 EX DE,HL
Screen_DrawColumn_42 72B5 LD A,(ManWalkDirection_DFD4)
72B8 CP $01
72BA JR NZ,Screen_DrawColumn_43
72BC EX DE,HL
Screen_DrawColumn_43 72BD AND A
72BE SBC HL,DE
72C0 LD E,(IX+$02)
72C3 LD D,$00
72C5 LD A,(ManWalkDirection_DFD4)
72C8 CP $02
72CA JR Z,Screen_DrawColumn_44
72CC AND A
72CD SBC HL,DE
72CF EX DE,HL
72D0 LD HL,$0020
72D3 AND A
72D4 SBC HL,DE
72D6 JR Screen_DrawColumn_45
Screen_DrawColumn_44 72D8 ADD HL,DE
72D9 LD DE,$0022
72DC AND A
72DD SBC HL,DE
Screen_DrawColumn_45 72DF SRL H
72E1 RR L
72E3 EX DE,HL
72E4 PUSH IX Remember the start address of the area data.
72E6 XOR A
Screen_DrawColumn_46 72E7 EX AF,AF' Store
72E8 LD L,(IX+$05) Get each item in the scenery data and workout which one is next to draw.
72EB ADD HL,HL
72EC LD H,$00
72EE ADD HL,HL
72EF LD BC,BitmapData_Width
72F2 ADD HL,BC
72F3 LD A,(HL)
72F4 AND $7F
72F6 LD C,A
72F7 LD B,$00
72F9 LD L,E
72FA LD H,D
72FB SBC HL,BC
72FD JR C,Screen_DrawColumn_47
72FF EX DE,HL
7300 INC IX
7302 EX AF,AF'
7303 INC A
7304 JR Screen_DrawColumn_46
Screen_DrawColumn_47 7306 LD A,(IX+$05) Get index of item and store it.
7309 LD ( s0),A
730C POP IX Get back start address of area data.
730E PUSH IX
7310 PUSH DE
7311 LD C,(IX+$04)
7314 LD B,$00
7316 ADD IX,BC
7318 LD DE,$0006
731B ADD IX,DE
731D LD A,(IX-$01)
7320 AND A
7321 JP Z,Screen_DrawColumn_66
7324 EX AF,AF' Is item index the first one in list?
7325 AND A
7326 JP Z,Screen_DrawColumn_55
7329 DEC C Is item last in the list.
732A CP C
732B JP Z,Screen_DrawColumn_56
732E LD B,A Get index of item in list of items.
732F LD A,(CamDirection_DFD2) Put the camera direction into the upper nibble.
7332 AND A
7333 RLA
7334 RLA
7335 RLA Onto the next data set.
7336 RLA
7337 OR B with the item index in the lower nibble.
7338 LD C,A
7339 LD B,(IX-$01) Get number of data sets.
733C LD DE,$000C Size of each data set.
Screen_DrawColumn_48 733F CP (IX+$03) See if camera / item index is the same as the one in the data set.
7342 JR NZ,Screen_DrawColumn_49 Same area index OR area index is 0.
7344 LD A,(AreaDataCurrent_Index)
7347 CP (IX+$06)
734A JR Z,Screen_DrawColumn_50
734C LD A,(IX+$06)
734F AND A
7350 JR Z,Screen_DrawColumn_50
7352 LD A,C
Screen_DrawColumn_49 7353 ADD IX,DE
7355 DJNZ Screen_DrawColumn_48
7357 JP Screen_DrawColumn_66
Screen_DrawColumn_50 735A BIT 7,(IX+$04)
735E JR Z,Screen_DrawColumn_51
7360 LD A,($DFCE)
7363 BIT 7,A
7365 JP Z,Screen_DrawColumn_66
Screen_DrawColumn_51 7368 LD A,(IX+$02)
736B LD ( s0),A
736E LD HL,( BitmapData_DoorLarge) Offset address of door bitmap.
7371 LD DE,$9477
7374 LD BC,$0004
7377 CP $40
7379 JR Z,Screen_DrawColumn_52
737B LD HL,( BitmapData_DoorThin) Offset address of slim door bitmap.
737E LD DE,$9456
7381 LD BC,$0002
7384 CP $38
7386 JP NZ,Screen_DrawColumn_67
Door Icon
Screen_DrawColumn_52 7389 LD A,(IX+$05) Decide if door needs an icon character to be drawn on it.
738C SUB $8C
738E JR C,Screen_DrawColumn_53
7390 CP $1F
7392 JR NC,Screen_DrawColumn_53
7394 ADD A,$60
7396 JR Screen_DrawColumn_54
Screen_DrawColumn_53 7398 LD A,$20 Use 'space' if not.
Screen_DrawColumn_54 739A CALL Char_InsertIntoBitmap Insert graphic character into door bitmap.
739D JP Screen_DrawColumn_67
Check for perpendicular exits
Screen_DrawColumn_55 73A0 LD A,(CamDirection_DFD2)
73A3 INC A
73A4 JR Screen_DrawColumn_57
Screen_DrawColumn_56 73A6 LD A,(CamDirection_DFD2)
73A9 DEC A
Screen_DrawColumn_57 73AA AND $03
73AC RLA
73AD RLA
73AE RLA
73AF RLA
73B0 LD C,A
73B1 LD B,(IX-$01)
Screen_DrawColumn_58 73B4 LD A,(IX+$06)
73B7 AND A
73B8 JR Z,Screen_DrawColumn_59
73BA LD A,(AreaDataCurrent_Index)
73BD CP (IX+$06)
73C0 JR NZ,Screen_DrawColumn_62
Screen_DrawColumn_59 73C2 LD A,(IX+$03)
73C5 AND $F0
73C7 CP C
73C8 JR NZ,Screen_DrawColumn_62
73CA BIT 4,C
73CC JR Z,Screen_DrawColumn_60
73CE LD DE,(ManData_PosPrimary_dfc3)
73D2 LD L,(IX+$00)
73D5 LD H,$00
73D7 ADD HL,HL
73D8 JR Screen_DrawColumn_61
Screen_DrawColumn_60 73DA LD DE,(ManData_PosSecondary_dfc5)
73DE LD L,(IX+$01)
73E1 LD H,$00
73E3 ADD HL,HL
Screen_DrawColumn_61 73E4 CALL abs(hl_minus_de)
73E7 LD DE,$0004
73EA AND A
73EB SBC HL,DE
73ED JR C,Screen_DrawColumn_63
Screen_DrawColumn_62 73EF LD DE,$000C
73F2 ADD IX,DE
73F4 DJNZ Screen_DrawColumn_58
73F6 JR Screen_DrawColumn_66
Screen_DrawColumn_63 73F8 PUSH IX
73FA POP DE
73FB LD HL,(Exits)
73FE AND A
73FF SBC HL,DE
7401 JR Z,Screen_DrawColumn_64
7403 LD HL,($DFFB)
7406 AND A
7407 SBC HL,DE
7409 JR Z,Screen_DrawColumn_64
740B LD HL,$DFFA
740E LD DE,$DFFC
7411 LD BC,$0002
7414 LDDR
7416 LD (Exits),IX
Screen_DrawColumn_64 741A BIT 7,(IX+$04)
741E JR Z,Screen_DrawColumn_65
7420 LD A,($DFCE)
7423 BIT 7,A
7425 JR Z,Screen_DrawColumn_66
Screen_DrawColumn_65 7427 LD A,(IX+$02) Get bitmap index, add one to get sideways version.
742A AND $7F
742C INC A
742D LD B,A
742E LD A,( s0) Use mirror state of stored bitmap.
7431 AND $80
7433 OR B
7434 LD ( s0),A
7437 JR Screen_DrawColumn_67
Screen_DrawColumn_66 7439 LD A,( s0)
743C AND $7F
743E CALL AltBitmapSearch
7441 LD L,A
7442 LD A,( s0)
7445 AND $80
7447 OR L
7448 LD ( s0),A
Screen_DrawColumn_67 744B LD HL,( s0)
744E ADD HL,HL
744F LD H,$00
7451 ADD HL,HL
7452 LD BC,BitmapData_Width
7455 ADD HL,BC
7456 PUSH HL
7457 LD A,( s0)
745A XOR (HL)
745B AND $80
745D JR Z,Screen_DrawColumn_68
745F LD A,( s0)
7462 AND $7F
7464 LD L,A
7465 LD H,$00
7467 CALL BitmapMirror
Screen_DrawColumn_68 746A POP HL
746B DEC HL
746C LD A,(HL)
746D AND $7F
746F LD BC,$0110
7472 LD HL,(OffScrTempPtr_6F16)
Screen_DrawColumn_69 7475 AND A
7476 SBC HL,BC
7478 DEC A
7479 JR NZ,Screen_DrawColumn_69
747B LD (OffScrTempPtr_6F16),HL
747E POP DE
747F LD A,( s0)
7482 AND $7F
7484 LD L,A
7485 LD H,$00
7487 CALL Blit_BmpColumn_Main For scenery items.
748A POP IX
S_DC_NextItem 748C LD E,(IX+$04)
748F LD D,$00
7491 ADD IX,DE
7493 LD L,(IX+$05)
7496 LD H,$00
7498 ADD HL,HL
7499 ADD HL,HL
749A LD E,L
749B LD D,H
749C ADD HL,HL
749D ADD HL,DE
749E LD BC,$0006
74A1 ADD HL,BC
74A2 EX DE,HL
74A3 ADD IX,DE
74A5 JP S_DC_ItemForEach
_
Screen_DrawColumn_70 74A8 LD IX,(AreaDataCurrent_ObjectsPtr)
74AC LD DE,$FFFC
74AF ADD IX,DE
Screen_DrawColumn_71 74B1 LD L,(IX+$04)
74B4 LD H,(IX+$05)
74B7 LD A,L
74B8 OR H
74B9 JR Z,Screen_DrawColumn_75
Draw an object if required.
74BB PUSH HL
74BC POP IX
74BE LD L,(IX+$02)
74C1 LD H,$00
74C3 ADD HL,HL
74C4 ADD HL,HL
74C5 LD DE,BitmapData_Width
74C8 ADD HL,DE
74C9 LD A,(HL)
74CA LD ($6F18),A
74CD AND $7F
74CF CALL RectIntersection
74D2 JR C,Screen_DrawColumn_71
74D4 LD A,(CamDirection_DFD2)
74D7 BIT 0,A
74D9 JR NZ,Screen_DrawColumn_72
74DB LD DE,(ManData_PosPrimary_dfc3)
74DF LD L,(IX+$00)
74E2 JR Screen_DrawColumn_73
Screen_DrawColumn_72 74E4 LD DE,(ManData_PosSecondary_dfc5)
74E8 LD L,(IX+$01)
Screen_DrawColumn_73 74EB LD H,$00
74ED LD A,($6F18)
74F0 RRCA
74F1 ADC HL,HL
74F3 CALL abs(hl_minus_de)
74F6 LD DE,$0004
74F9 AND A
74FA SBC HL,DE
74FC JR NC,Screen_DrawColumn_71
74FE LD A,(CamDirection_DFD2)
7501 RRCA
7502 RRCA
7503 LD HL,($6F18)
7506 XOR L
7507 AND $80
7509 JR Z,Screen_DrawColumn_74
750B LD L,(IX+$02)
750E LD H,$00
7510 CALL BitmapMirror
Screen_DrawColumn_74 7513 LD HL,$0005
7516 CALL BlitBmpColumn
7519 JR Screen_DrawColumn_71
Screen_DrawColumn_75 751B RET
Prev: 6F19 Up: Map Next: 751C