Faster pixel skipping on 4x4, 2x2 tiers

Iterate at fill_masks[fill_level]+1 instead of every pixel and then
skipping, saves a smidge of time

view 1 with expanded memory:
10.514 ms/px before
10.430 ms/px after
This commit is contained in:
Brooke Vibber 2025-01-04 10:06:12 -08:00
parent dcf5a3f59e
commit d157fe1306

View file

@ -1737,12 +1737,15 @@ update_status:
skipped: skipped:
; sx += fill_level[fill_masks] + 1
ldx fill_level
lda fill_masks,x
clc clc
lda sx adc #1 ; will never carry
adc #1 adc sx
sta sx sta sx
lda sx + 1 lda #0
adc #0 adc sx + 1
sta sx + 1 sta sx + 1
lda sx lda sx
@ -1752,12 +1755,15 @@ skipped:
loop_sx_done: loop_sx_done:
; sy += fill_level[fill_masks] + 1
ldx fill_level
lda fill_masks,x
clc clc
lda sy adc #1 ; will never carry
adc #1 adc sy
sta sy sta sy
lda sy + 1 lda #0
adc #0 adc sy + 1
sta sy + 1 sta sy + 1
lda sy lda sy