mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-20 22:34:21 +02:00
Significant acceleration of drawing mountains on Atari
This commit is contained in:
+32
-5
@@ -204,11 +204,22 @@ drawmountainsloop
|
|||||||
sta ydraw
|
sta ydraw
|
||||||
sty ydraw+1
|
sty ydraw+1
|
||||||
.IF FASTER_GRAF_PROCS = 1
|
.IF FASTER_GRAF_PROCS = 1
|
||||||
|
; calculate lower opoint in one screen byte
|
||||||
|
lda xdraw
|
||||||
|
and #%00000111 ; only every 8th pixel
|
||||||
|
bne MinCalculated
|
||||||
|
ldy #7
|
||||||
|
@ cmp (modify),y
|
||||||
|
bcs NotLower
|
||||||
|
lda (modify),y
|
||||||
|
NotLower
|
||||||
|
dey
|
||||||
|
bpl @-
|
||||||
|
sta temp2
|
||||||
|
inc temp2 ; this is our minimum
|
||||||
|
iny
|
||||||
|
MinCalculated
|
||||||
; there was Drawline proc
|
; there was Drawline proc
|
||||||
lda #screenheight
|
|
||||||
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
|
||||||
@@ -219,9 +230,25 @@ drawmountainsloop
|
|||||||
sta (xbyte),y
|
sta (xbyte),y
|
||||||
;IntoDraw
|
;IntoDraw
|
||||||
adw xbyte #screenBytes
|
adw xbyte #screenBytes
|
||||||
dec tempbyte01
|
inc ydraw
|
||||||
|
lda ydraw
|
||||||
|
cmp temp2 ; this is our minimum
|
||||||
bne @-
|
bne @-
|
||||||
; end of Drawline proc
|
; end of Drawline proc
|
||||||
|
; and now fill bytes!
|
||||||
|
lda xdraw
|
||||||
|
and #%00000111 ; only every 8th pixel
|
||||||
|
bne NotFillBytes
|
||||||
|
; A=0 is here
|
||||||
|
dec ydraw ; protection if temp2=screenheight
|
||||||
|
@ lda #0
|
||||||
|
sta (xbyte),y
|
||||||
|
adw xbyte #screenBytes
|
||||||
|
inc ydraw
|
||||||
|
lda ydraw
|
||||||
|
cmp #screenheight
|
||||||
|
bne @-
|
||||||
|
NotFillBytes
|
||||||
.ELSE
|
.ELSE
|
||||||
; there was Drawline proc
|
; there was Drawline proc
|
||||||
drawline
|
drawline
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
;---------------------------------------------------
|
;---------------------------------------------------
|
||||||
.macro build
|
.macro build
|
||||||
dta d"1.30" ; number of this build (4 bytes)
|
dta d"1.31" ; number of this build (4 bytes)
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro RMTSong
|
.macro RMTSong
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user