Fixed projectile flicker during tracking
This commit is contained in:
parent
1c283efeed
commit
2c6ddc48ec
|
@ -57,8 +57,10 @@ gameplayLoop:
|
|||
;;;;;;;;;;;
|
||||
; Update
|
||||
;
|
||||
; lda projectileActive
|
||||
; bpl gameplayLoopShotTracking ; Skip input during shots
|
||||
lda #1
|
||||
sta projectilesDirty
|
||||
lda projectileActive
|
||||
bpl gameplayLoopShotTracking ; Skip input during shots
|
||||
|
||||
; Check for keys down
|
||||
jsr kbdScan
|
||||
|
@ -67,6 +69,11 @@ gameplayLoop:
|
|||
; lda paused
|
||||
; bne gameplayLoopEndFrame
|
||||
|
||||
bra gameplayLoopScroll
|
||||
|
||||
gameplayLoopShotTracking:
|
||||
jsr trackActiveShot
|
||||
|
||||
gameplayLoopScroll:
|
||||
|
||||
; Scroll map if needed
|
||||
|
@ -112,11 +119,16 @@ gameplayLoopRender:
|
|||
jsr renderPlayers
|
||||
|
||||
gameplayLoopProjectiles:
|
||||
; jsr unrenderProjectiles
|
||||
; jsr updateProjectilePhysics
|
||||
; jsr protectProjectiles
|
||||
; jsr renderProjectiles
|
||||
; jsr updateProjectileCollisions
|
||||
lda projectilesDirty
|
||||
beq gameplayLoopProjectilesSkip
|
||||
|
||||
jsr unrenderProjectiles
|
||||
jsr updateProjectilePhysics
|
||||
jsr protectProjectiles
|
||||
jsr renderProjectiles
|
||||
|
||||
gameplayLoopProjectilesSkip:
|
||||
jsr updateProjectileCollisions
|
||||
|
||||
; lda turnRequested
|
||||
; beq gameplayLoopVictoryCondition
|
||||
|
@ -134,10 +146,6 @@ gameplayLoopEndFrame:
|
|||
gameplayLoopContinue:
|
||||
jmp gameplayLoop
|
||||
|
||||
gameplayLoopShotTracking:
|
||||
; jsr trackActiveShot
|
||||
; bra gameplayLoopScroll
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; trackActiveShot
|
||||
|
@ -238,7 +246,9 @@ scrollMap:
|
|||
jsr unclipTerrain
|
||||
jsl unrenderTerrainSpans
|
||||
jsr unrenderPlayers
|
||||
; jsr unrenderProjectiles
|
||||
jsr unrenderProjectiles
|
||||
|
||||
jsr updateProjectilePhysics ; Good idea?
|
||||
|
||||
sta mapScrollPos
|
||||
asl
|
||||
|
@ -252,10 +262,12 @@ scrollMap:
|
|||
sta mapScrollRequested
|
||||
|
||||
jsr protectPlayers
|
||||
; jsr protectProjectiles
|
||||
jsr protectProjectiles
|
||||
jsr renderPlayers
|
||||
jsr renderProjectiles ; Prevents flicker, but ads jitter to shot tracking
|
||||
lda #1
|
||||
sta terrainDirty
|
||||
stz projectilesDirty
|
||||
rts
|
||||
|
||||
|
||||
|
@ -324,6 +336,8 @@ turnRequested:
|
|||
.word $0000
|
||||
terrainDirty:
|
||||
.word 1
|
||||
projectilesDirty:
|
||||
.word 1
|
||||
activePlayer:
|
||||
.word 0
|
||||
currentPlayer:
|
||||
|
|
BIN
gscats.2mg
BIN
gscats.2mg
Binary file not shown.
Loading…
Reference in New Issue