clamp cart position to 16x16 grid before changing directions

This commit is contained in:
scawful
2024-05-10 17:06:12 -04:00
parent 2d794c876f
commit dc5ab707fd

View File

@@ -550,7 +550,7 @@ HandleTileDirections:
TAY ; Transfer to Y to use as an offset for the rows TAY ; Transfer to Y to use as an offset for the rows
LDA.w .DirectionTileLookup, Y : TAY LDA.w .DirectionTileLookup, Y : TAY
; JSR ClampSpritePositionToGrid JSR ClampSpritePositionToGrid
CPY #$01 : BEQ .move_north CPY #$01 : BEQ .move_north
CPY #$02 : BEQ .move_east CPY #$02 : BEQ .move_east
CPY #$03 : BEQ .move_south CPY #$03 : BEQ .move_south