Better? "drawmountains"

Mountains are drawn only by the plot procedure.
Easier for the C64?
This commit is contained in:
Pecusx
2023-04-05 12:30:47 +02:00
parent 16fc84aa6f
commit f2de25a769
3 changed files with 5 additions and 12 deletions
+5 -12
View File
@@ -1295,22 +1295,15 @@ drawmountainsloop
sty ydraw+1 sty ydraw+1
; jsr DrawLine ; jsr DrawLine
; there was Drawline proc ; there was Drawline proc
lda #screenheight drawline
sec
sbc ydraw
sta tempbyte01
jsr plot.MakePlot jsr plot.MakePlot
; after plot we have: (xbyte),y - addres of screen byte; X - index in bittable (number of bit) ; after plot we have: (xbyte),y - addres of screen byte; X - index in bittable (number of bit)
; jmp IntoDraw ; jumps inside Draw routine ; jmp IntoDraw ; jumps inside Draw routine
; because one pixel is already plotted (and who cares? :) ) ; because one pixel is already plotted (and who cares? :) )
@ inc ydraw
lda (xbyte),y lda ydraw
and bittable2,x cmp #screenheight
sta (xbyte),y bne drawline
;IntoDraw
adw xbyte #screenBytes
dec tempbyte01
bne @-
; end of Drawline proc ; end of Drawline proc
NoMountain NoMountain
inw modify inw modify
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.