mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
FOX PLOTS FASTER
This commit is contained in:
+24
-33
@@ -1334,8 +1334,8 @@ EndOfUnPlot
|
||||
; game. If you are going to speed up the game, start with
|
||||
; plot - it is used by every single effect starting from explosions
|
||||
; through line drawing and small text output!!!
|
||||
; We tried to keep it clear and therefore it is far from
|
||||
; optimal speed.
|
||||
;
|
||||
; Optimized by 0xF (Fox) THXXXX!!!
|
||||
|
||||
; -----------------------------------------
|
||||
; is it not over the screen ???
|
||||
@@ -1346,28 +1346,24 @@ CheckX02
|
||||
bcs EndOfPlot ;nearest RTS
|
||||
MakePlot
|
||||
; let's calculate coordinates from xdraw and ydraw
|
||||
mwa xdraw xbyte
|
||||
|
||||
|
||||
lda xbyte
|
||||
and #$7
|
||||
sta ybit
|
||||
|
||||
;xbyte = xbyte/8
|
||||
lda xbyte
|
||||
lsr xbyte+1
|
||||
ror ;just one bit over 256. Max screenwidth = 512!!!
|
||||
lsr
|
||||
lda xdraw+1
|
||||
lsr
|
||||
tay ;save
|
||||
lda xdraw
|
||||
ror ;just one bit over 256. Max screenwidth = 512!!!
|
||||
lsr
|
||||
lsr
|
||||
sta xbyte
|
||||
;---
|
||||
ldx ydraw
|
||||
lda linetableL,x
|
||||
sta xbyte
|
||||
ldy linetableL,x
|
||||
lda linetableH,x
|
||||
sta xbyte+1
|
||||
|
||||
ldx ybit
|
||||
lda xdraw
|
||||
and #$7
|
||||
tax
|
||||
lda color
|
||||
bne ClearPlot
|
||||
|
||||
@@ -1390,35 +1386,30 @@ ClearPlot
|
||||
; result is in A (zero or appropriate bit is set)
|
||||
|
||||
; let's calculate coordinates from xdraw and ydraw
|
||||
mwa xdraw xbyte
|
||||
|
||||
lda xbyte
|
||||
and #$7
|
||||
sta ybit
|
||||
|
||||
;xbyte = xbyte/8
|
||||
lda xbyte
|
||||
lsr xbyte+1
|
||||
ror ;just one bit over 256. Max screenwidht = 512!!!
|
||||
lsr
|
||||
lda xdraw+1
|
||||
lsr
|
||||
tay ;save
|
||||
lda xdraw
|
||||
ror ;just one bit over 256. Max screenwidht = 512!!!
|
||||
lsr
|
||||
lsr
|
||||
sta xbyte
|
||||
;---
|
||||
ldx ydraw
|
||||
lda linetableL,x
|
||||
sta xbyte
|
||||
ldy linetableL,x
|
||||
lda linetableH,x
|
||||
sta xbyte+1
|
||||
|
||||
ldx ybit
|
||||
lda xdraw
|
||||
and #$7
|
||||
tax
|
||||
|
||||
lda (xbyte),y
|
||||
eor #$ff
|
||||
and bittable,x
|
||||
eor bittable,x
|
||||
rts
|
||||
.endp
|
||||
|
||||
;--------------------------------------------------
|
||||
.endp;--------------------------------------------------
|
||||
.proc DrawLine
|
||||
;--------------------------------------------------
|
||||
mva #0 ydraw+1
|
||||
|
||||
Reference in New Issue
Block a user