From 0ba976a321d0f2a7515abe3e56fc39f0b3de8b20 Mon Sep 17 00:00:00 2001 From: blondie7575 Date: Wed, 1 Nov 2017 12:43:37 -0700 Subject: [PATCH] Revert "Top to bottom terrain rendering" This reverts commit e49d1ea908d16acb6a46ec32b4701863ac1b7e04. --- graphics.s | 14 -------------- terrain.s | 26 +++++++------------------- 2 files changed, 7 insertions(+), 33 deletions(-) diff --git a/graphics.s b/graphics.s index 2b087c5..110a7a1 100644 --- a/graphics.s +++ b/graphics.s @@ -155,20 +155,6 @@ drawNumber: rts -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; BORDER_COLOR -; -; Trashes A -; -.macro BORDER_COLOR color - BITS8 - lda BORDERCOLOR - and #$f0 - ora color - sta BORDERCOLOR - BITS16 -.endmacro - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Vertical blank checkers ; diff --git a/terrain.s b/terrain.s index 12d46b1..1b1d9a3 100644 --- a/terrain.s +++ b/terrain.s @@ -21,9 +21,9 @@ VISIBLETERRAINWINDOW = 80 ; In words ; renderTerrain: FASTGRAPHICS - lda #0 + lda #MAXTERRAINHEIGHT sta SCRATCHL2 ; Row counter - lda #$5f1f ; 4 Point stack to end of VRAM + lda #$9cff ; 4 Point stack to end of VRAM tcs ; 2 sec @@ -43,20 +43,9 @@ renderRowComplete: sec sbc #COMPILEDTERRAINROW sta PARAML0 + dec SCRATCHL2 + bne renderTerrainLoop - tsc - clc - adc #320 - tcs - - lda SCRATCHL2 - inc - cmp #MAXTERRAINHEIGHT - beq renderTerrainDone - sta SCRATCHL2 - bra renderTerrainLoop - -renderTerrainDone: SLOWGRAPHICS rts @@ -227,16 +216,15 @@ unclipTerrainLoop: compileTerrain: SAVE_AY - ldy #0 + ldy #MAXTERRAINHEIGHT-1 lda #compiledTerrain sta PARAML0 compileTerrainLoop: sty PARAML1 jsr compileTerrainRow - iny - cpy #MAXTERRAINHEIGHT - beq compileTerrainDone + dey + bmi compileTerrainDone clc lda #COMPILEDTERRAINROW