Add an extra column when coordinates are not tile-aligned
This commit is contained in:
parent
8ed851cb33
commit
8d31720e1c
|
@ -94,12 +94,19 @@ _UpdateBG0TileMap
|
|||
stz :Left ; prepare to do the entire screen
|
||||
lda ScreenTileWidth ; and then whack off the parts
|
||||
sta :Right ; that are not needed
|
||||
lda StartX
|
||||
and #$0003 ; If not tile-aligned, then we need to draw one extra column
|
||||
beq *+2
|
||||
inc :Right
|
||||
|
||||
stz :Top
|
||||
lda ScreenTileHeight
|
||||
sta :Bottom
|
||||
and #$0007
|
||||
beq *+2
|
||||
inc :Bottom
|
||||
|
||||
; If we are supposed to refresh the while field, just do that and return
|
||||
; If we are supposed to refresh the whole field, just do that and return
|
||||
lda :Refresh
|
||||
beq :NoRefresh
|
||||
jmp :DrawRectBG0 ; Let the DrawRectBG0 RTS take care of the return for us
|
||||
|
@ -371,3 +378,6 @@ _UpdateBG0TileMap
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue