mirror of
https://github.com/blondie7575/GSCats.git
synced 2025-01-10 10:29:25 +00:00
Optimization
This commit is contained in:
parent
e7ada08d40
commit
0b5ba93a22
BIN
gscats.2mg
BIN
gscats.2mg
Binary file not shown.
26
terrain.s
26
terrain.s
@ -63,14 +63,24 @@ renderClippedSpanChain:
|
||||
sta renderSpanComplete+1 ; 4
|
||||
|
||||
; Find right edge of screen within span chains
|
||||
; = 27 cycles per skipped span
|
||||
; = 26 cycles per skipped span
|
||||
renderClippedSpanChainLoop:
|
||||
|
||||
lda spanChain,y ; 4
|
||||
sec ; 2
|
||||
sbc <RIGHTEDGE ; 3
|
||||
bmi renderClippedSpanChainNextSpan ; 2/3
|
||||
beq renderClippedSpanChainNextSpan ; 2/3
|
||||
beq renderClippedSpanChainNextSpan ; 2
|
||||
bpl renderClippedSpanChainLoop2 ; 2
|
||||
|
||||
renderClippedSpanChainNextSpan:
|
||||
; Track remaining distance from right edge and
|
||||
; continue searching for visible right edge
|
||||
eor #$ffff ; 2
|
||||
inc ; 2
|
||||
sta <RIGHTEDGE ; 3
|
||||
dey ; 2
|
||||
dey ; 2
|
||||
bra renderClippedSpanChainLoop ; 3
|
||||
|
||||
renderClippedSpanChainLoop2:
|
||||
; Now render spans until left edge of screen
|
||||
@ -107,16 +117,6 @@ renderClippedSpanChainRenderNext:
|
||||
lda spanChain,y ; 5
|
||||
bra renderClippedSpanChainLoop2 ; 3
|
||||
|
||||
renderClippedSpanChainNextSpan:
|
||||
; Track remaining distance from right edge and
|
||||
; continue searching for visible right edge
|
||||
eor #$ffff ; 2
|
||||
inc ; 2
|
||||
sta <RIGHTEDGE ; 3
|
||||
dey ; 2
|
||||
dey ; 2
|
||||
bra renderClippedSpanChainLoop ; 3
|
||||
|
||||
renderClippedSpanChainLastSpan:
|
||||
; Render visible portion of last visible span
|
||||
; = 26 cycles per row
|
||||
|
Loading…
x
Reference in New Issue
Block a user