mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-20 22:34:21 +02:00
DrawMountains with ClearSky on C64
not tested :)
This commit is contained in:
@@ -189,6 +189,7 @@ ClearPlot
|
|||||||
.proc drawmountains
|
.proc drawmountains
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
; draw mountains from mountaintable
|
; draw mountains from mountaintable
|
||||||
|
; ClearSky - $ff Crear sky during drawmountains, 0 - no clear sky
|
||||||
mwa #0 xdraw
|
mwa #0 xdraw
|
||||||
mwa #mountaintable modify
|
mwa #mountaintable modify
|
||||||
mva #1 color
|
mva #1 color
|
||||||
@@ -216,6 +217,29 @@ NotLower
|
|||||||
bpl @-
|
bpl @-
|
||||||
sta temp2
|
sta temp2
|
||||||
inc temp2 ; this is our minimum
|
inc temp2 ; this is our minimum
|
||||||
|
bit ClearSky
|
||||||
|
bpl NoClearSky
|
||||||
|
; Clear Sky
|
||||||
|
mwa #0 ydraw
|
||||||
|
jsr plot.MakePlot ; after plot we have: (xbyte),y - addres of screen byte
|
||||||
|
@ lda #$ff
|
||||||
|
sta (xbyte),y
|
||||||
|
adw xbyte #screenBytes ; next line
|
||||||
|
inc ydraw
|
||||||
|
lda xdraw
|
||||||
|
ldy ydraw
|
||||||
|
clc
|
||||||
|
adc linetableL,y
|
||||||
|
sta xbyte
|
||||||
|
lda linetableH,y
|
||||||
|
adc xdraw+1
|
||||||
|
sta xbyte+1
|
||||||
|
tya
|
||||||
|
cmp #screenheight
|
||||||
|
beq NoClearSky
|
||||||
|
cmp temp2 ; our minimum height od sky
|
||||||
|
bne @-
|
||||||
|
NoClearSky
|
||||||
MinCalculated
|
MinCalculated
|
||||||
ldy #0
|
ldy #0
|
||||||
lda (modify),y
|
lda (modify),y
|
||||||
@@ -288,6 +312,22 @@ MinCalculated
|
|||||||
bne @-
|
bne @-
|
||||||
NotFillBytes
|
NotFillBytes
|
||||||
.ELSE
|
.ELSE
|
||||||
|
bit ClearSky
|
||||||
|
bpl NoClearSky
|
||||||
|
; Clear Sky
|
||||||
|
ldy #0
|
||||||
|
lda (modify),y
|
||||||
|
sta ydraw
|
||||||
|
sty ydraw+1
|
||||||
|
sty color
|
||||||
|
clearline
|
||||||
|
jsr plot.MakePlot
|
||||||
|
dec ydraw
|
||||||
|
lda ydraw
|
||||||
|
cmp #$ff
|
||||||
|
bne clearline
|
||||||
|
mva #1 color
|
||||||
|
NoClearSky
|
||||||
ldy #0
|
ldy #0
|
||||||
lda (modify),y
|
lda (modify),y
|
||||||
cmp #screenheight
|
cmp #screenheight
|
||||||
|
|||||||
+2
-1
@@ -35,8 +35,9 @@
|
|||||||
icl 'definitions.asm'
|
icl 'definitions.asm'
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
|
|
||||||
FirstZpageVariable = $52 ; $57
|
FirstZpageVariable = $51 ; $57
|
||||||
.zpvar DliColorBack .byte = FirstZpageVariable
|
.zpvar DliColorBack .byte = FirstZpageVariable
|
||||||
|
.zpvar ClearSky .byte ; $ff - Crear sky during drawmountains, 0 - no clear sky
|
||||||
.zpvar MeteorsFlag .byte ; set 7th bit - block meteors
|
.zpvar MeteorsFlag .byte ; set 7th bit - block meteors
|
||||||
.zpvar MeteorsRound .byte ; set 7th bit - block meteors in round
|
.zpvar MeteorsRound .byte ; set 7th bit - block meteors in round
|
||||||
.zpvar GradientNr .byte
|
.zpvar GradientNr .byte
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user