diff --git a/src/Sprite2.s b/src/Sprite2.s index bc24434..d622bfb 100644 --- a/src/Sprite2.s +++ b/src/Sprite2.s @@ -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 diff --git a/src/tiles/DirtyTileQueue.s b/src/tiles/DirtyTileQueue.s index 459c00e..bd16e1b 100644 --- a/src/tiles/DirtyTileQueue.s +++ b/src/tiles/DirtyTileQueue.s @@ -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