mirror of
https://github.com/jeremysrand/BuGS.git
synced 2024-10-31 16:05:49 +00:00
Fix the bugs related to marking dirty tiles for the player. Everything seems to move smoothly now and works well at 2.8MHz. Next, I need to block the player from going over top of mushrooms.
This commit is contained in:
parent
edcddc0bd8
commit
f58a831eb9
@ -117,8 +117,8 @@ updatePlayer_skipDeltas anop
|
||||
|
||||
updatePlayer_shift anop
|
||||
adc mouseYAddress,y
|
||||
sta mouseAddress
|
||||
dec a
|
||||
sta mouseAddress
|
||||
tay
|
||||
jsl drawShipShift
|
||||
bra updatePlayer_dirty
|
||||
@ -127,19 +127,27 @@ updatePlayer_dirty anop
|
||||
lda mouseAddress
|
||||
sec
|
||||
sbc #SCREEN_ADDRESS
|
||||
and #$fff8
|
||||
and #$fffc
|
||||
tax
|
||||
lda >screenToTileOffset,x
|
||||
tax
|
||||
lda #TILE_STATE_DIRTY
|
||||
cpx #RHS_FIRST_TILE_OFFSET
|
||||
bge updatePlayer_tileOffscreen1
|
||||
sta tileDirty,x
|
||||
updatePlayer_tileOffscreen1 anop
|
||||
ldy tileRight,x
|
||||
cpy #RHS_FIRST_TILE_OFFSET
|
||||
bge updatePlayer_tileOffscreen2
|
||||
sta tileDirty,y
|
||||
updatePlayer_tileOffscreen2 anop
|
||||
ldy tileBelow,x
|
||||
cpy #INVALID_TILE_NUM
|
||||
beq updatePlayer_done
|
||||
sta tileDirty,y
|
||||
ldx tileRight,y
|
||||
cpx #RHS_FIRST_TILE_OFFSET
|
||||
bge updatePlayer_done
|
||||
sta tileDirty,x
|
||||
|
||||
updatePlayer_done anop
|
||||
|
@ -8,6 +8,7 @@ s6d2 =
|
||||
|
||||
s7d1 = /Users/jrand/Library/Developer/Xcode/DerivedData/BuGS-bffpexoblaghkzcbtjtzxeulnuto/Build/Products/Debug/BuGS.2mg
|
||||
|
||||
g_limit_speed = 3
|
||||
|
||||
|
||||
bram1[00] = 00 00 00 01 00 00 0d 06 02 01 01 00 01 00 00 00
|
||||
|
Loading…
Reference in New Issue
Block a user