mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-21 06:39:46 +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
|
||||
|
||||
+19
-19
@@ -1,33 +1,33 @@
|
||||
.enum @dmactl
|
||||
blank = %00
|
||||
narrow = %01
|
||||
standard= %10
|
||||
wide = %11
|
||||
missiles= %100
|
||||
players = %1000
|
||||
blank = %00
|
||||
narrow = %01
|
||||
standard= %10
|
||||
wide = %11
|
||||
missiles= %100
|
||||
players = %1000
|
||||
lineX1 = %10000
|
||||
lineX2 = %00000
|
||||
dma = %100000
|
||||
dma = %100000
|
||||
.ende
|
||||
|
||||
scr48 = @dmactl(wide|dma|players|missiles|lineX1) ;screen 48b
|
||||
scr40 = @dmactl(standard|dma|players|missiles|lineX1) ;screen 40b
|
||||
scr32 = @dmactl(narrow|dma|players|missiles|lineX1) ;screen 32b
|
||||
scr48 = @dmactl(wide|dma|players|missiles|lineX1)
|
||||
scr40 = @dmactl(standard|dma|players|missiles|lineX1)
|
||||
scr32 = @dmactl(narrow|dma|players|missiles|lineX1)
|
||||
|
||||
.enum @pmcntl
|
||||
missiles= %1
|
||||
players = %10
|
||||
missiles= %1
|
||||
players = %10
|
||||
trigs = %100
|
||||
.ende
|
||||
|
||||
.enum @gtictl
|
||||
prior0 = %0
|
||||
prior1 = %1
|
||||
prior2 = %10
|
||||
prior4 = %100
|
||||
prior8 = %1000
|
||||
ply5 = %10000 ; Fifth Player Enable
|
||||
mlc = %100000 ; Multiple Color Player Enable
|
||||
prior0 = %0
|
||||
prior1 = %1
|
||||
prior2 = %10
|
||||
prior4 = %100
|
||||
prior8 = %1000
|
||||
ply5 = %10000 ; Fifth Player Enable
|
||||
mlc = %100000 ; Multiple Color Player Enable
|
||||
mode9 = %01000000
|
||||
mode10 = %10000000
|
||||
mode11 = %11000000
|
||||
|
||||
Reference in New Issue
Block a user