Fixed rendering issues with projectiles during scrolling

This commit is contained in:
blondie7575 2017-10-22 13:44:05 -07:00
parent bfec5c2234
commit 4cd1dcfbef
3 changed files with 22 additions and 0 deletions

View File

@ -44,6 +44,7 @@ beginGameplay:
jsr renderPlayerHeader jsr renderPlayerHeader
jsr protectPlayers jsr protectPlayers
jsr protectProjectiles
gameplayLoop: gameplayLoop:
@ -217,6 +218,7 @@ endGame:
scrollMap: scrollMap:
jsr unclipTerrain jsr unclipTerrain
jsr unrenderPlayers jsr unrenderPlayers
jsr unrenderProjectiles
sta mapScrollPos sta mapScrollPos
asl asl
@ -230,6 +232,7 @@ scrollMap:
sta mapScrollRequested sta mapScrollRequested
jsr protectPlayers jsr protectPlayers
jsr protectProjectiles
lda #1 lda #1
sta terrainDirty sta terrainDirty
rts rts

Binary file not shown.

View File

@ -313,6 +313,25 @@ deleteProjectile:
rts rts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; protectProjectiles
;
;
protectProjectiles:
SAVE_AXY
lda projectileData
bmi protectProjectilesDone
VRAM_PTR projectileData
lda #projectileData+GO_BACKGROUND
jsr protectGameObject
protectProjectilesDone:
RESTORE_AXY
rts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; renderProjectiles ; renderProjectiles
; ;