Fix _PopDirtyTile2 routine to sync with new TS_DIRTY conventions; fixes basic dirty sprite rendering

This commit is contained in:
Lucas Scharenbroich 2022-07-07 09:12:23 -05:00
parent 182ebfd566
commit 77b69cdc82
2 changed files with 2 additions and 3 deletions

View File

@ -129,7 +129,7 @@ _CalcDirtySprite
adc StartYMod208
bpl :y_ok
clc
adc #208 ; Wrap the actual coordinat around
adc #208 ; Wrap the actual coordinate around
:y_ok and #$FFF8 ; mask first to ensure LSR will clear the carry
lsr
lsr

View File

@ -70,8 +70,7 @@ _PopDirtyTile2 ; alternate entry point
sty DirtyTileCount ; remove last item from the list
ldx DirtyTiles,y ; load the offset into the Tile Store
lda #$FFFF
stal TileStore+TS_DIRTY,x ; clear the occupied backlink
stz TileStore+TS_DIRTY,x ; clear the occupied backlink
rts
; An optimized subroutine that runs through the dirty tile list and executes a callback function