Prev: 6A27 Up: Map Next: 6AAE
6A40: Map out right hand column of landscape using tile indices.
Used by the routine at Start.
Land_MapColumn 6A40 LD A,(Land_Height) Colour and set solid part of bottom landscape.
6A43 LD B,A
6A44 LD HL,BgMap_RightColBottom
6A47 LD DE,AttrMap_RightColBottom
6A4A LD C,$91
6A4C LD A,(Zone_Colour)
Land_MapColumn_0 6A4F LD (HL),C
6A50 LD (DE),A
6A51 INC HL
6A52 INC DE
6A53 DJNZ Land_MapColumn_0
6A55 LD (DE),A Colour and set the top edge of landscape.
6A56 LD A,(Land_TileType)
6A59 LD (HL),A
6A5A INC HL
6A5B INC DE
6A5C LD A,(_7c44_Tile0)
6A5F LD (HL),A
6A60 LD A,(_7c45_Tile1)
6A63 LD (DE),A
6A64 INC HL
6A65 INC DE
6A66 PUSH HL
6A67 PUSH DE
6A68 LD A,(Land_Gap) Set gap between land and ceiling.
6A6B LD B,A
6A6C LD C,$20
6A6E XOR A
Land_MapColumn_1 6A6F LD (HL),C
6A70 LD (DE),A
6A71 INC HL
6A72 INC DE
6A73 DJNZ Land_MapColumn_1
6A75 LD A,(Char_Zone) First zone has no ceiling, after that...
6A78 CP $42
6A7A JR C,Land_MapColumn_3
6A7C LD A,(Ceiling_TileType)
6A7F LD (HL),A Set ceiling main tile and colour.
6A80 LD A,(Zone_Colour)
6A83 LD (DE),A
6A84 INC HL
6A85 INC DE
6A86 LD C,$91 Fill in solid part of ceiling.
Land_MapColumn_2 6A88 LD (HL),C
6A89 LD A,(Zone_Colour)
6A8C LD (DE),A
6A8D INC HL
6A8E INC DE
6A8F LD A,L
6A90 CP $42
6A92 JR NZ,Land_MapColumn_2
Land_MapColumn_3 6A94 LD A,(Land_Gap) Find the middle of the gape and set a possible floating object.
6A97 SRA A
6A99 LD B,$00
6A9B LD C,A
6A9C POP HL
6A9D ADD HL,BC
6A9E LD A,(Float_Colour)
6AA1 LD (HL),A
6AA2 POP HL
6AA3 ADD HL,BC
6AA4 LD A,(Float_Tile)
6AA7 LD (HL),A
6AA8 RET
6AA9 NOP
6AAA NOP
6AAB NOP
6AAC NOP
6AAD NOP
Prev: 6A27 Up: Map Next: 6AAE