mirror of
https://github.com/blondie7575/GSCats.git
synced 2024-11-21 15:33:11 +00:00
Fixed crosshair rendering glitches on turn switch
This commit is contained in:
parent
11b2cc9048
commit
c2dde9a4b7
@ -14,6 +14,9 @@ crosshairGameObject:
|
|||||||
.word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
.word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||||
.word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
.word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||||
|
|
||||||
|
crosshairBackgroundStale:
|
||||||
|
.word 0
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; updateCrosshair
|
; updateCrosshair
|
||||||
@ -115,6 +118,8 @@ protectCrosshair:
|
|||||||
sta PARAML0
|
sta PARAML0
|
||||||
jsr protectGameObject
|
jsr protectGameObject
|
||||||
|
|
||||||
|
stz crosshairBackgroundStale
|
||||||
|
|
||||||
protectCrosshairDone:
|
protectCrosshairDone:
|
||||||
pla
|
pla
|
||||||
rts
|
rts
|
||||||
@ -128,6 +133,9 @@ protectCrosshairDone:
|
|||||||
unrenderCrosshair:
|
unrenderCrosshair:
|
||||||
pha
|
pha
|
||||||
|
|
||||||
|
lda crosshairBackgroundStale
|
||||||
|
bne unrenderCrosshairDone
|
||||||
|
|
||||||
lda #crosshairGameObject
|
lda #crosshairGameObject
|
||||||
sta PARAML0
|
sta PARAML0
|
||||||
jsr unrenderGameObject
|
jsr unrenderGameObject
|
||||||
|
@ -44,6 +44,8 @@ beginGameplay:
|
|||||||
jsr renderInventory
|
jsr renderInventory
|
||||||
jsr protectPlayers
|
jsr protectPlayers
|
||||||
jsr renderPlayers
|
jsr renderPlayers
|
||||||
|
ldy #0
|
||||||
|
jsr updateCrosshair
|
||||||
|
|
||||||
; Fade in from menu
|
; Fade in from menu
|
||||||
lda #basePalette
|
lda #basePalette
|
||||||
@ -95,6 +97,7 @@ gameplayLoopScroll:
|
|||||||
bmi gameplayLoopAngleCheck
|
bmi gameplayLoopAngleCheck
|
||||||
|
|
||||||
jsr scrollMap
|
jsr scrollMap
|
||||||
|
ldy currentPlayer
|
||||||
jsr updateCrosshair
|
jsr updateCrosshair
|
||||||
|
|
||||||
gameplayLoopAngleCheck:
|
gameplayLoopAngleCheck:
|
||||||
@ -107,7 +110,7 @@ gameplayLoopRenderJmp:
|
|||||||
gameplayLoopAngle:
|
gameplayLoopAngle:
|
||||||
; Update aim angle if needed
|
; Update aim angle if needed
|
||||||
lda angleDeltaRequested
|
lda angleDeltaRequested
|
||||||
beq gameplayLoopAim
|
beq gameplayLoopPower
|
||||||
jsr changeAngle
|
jsr changeAngle
|
||||||
|
|
||||||
gameplayLoopAim:
|
gameplayLoopAim:
|
||||||
@ -155,8 +158,11 @@ gameplayLoopRender:
|
|||||||
beq gameplayLoopRenderPlayersAnyway
|
beq gameplayLoopRenderPlayersAnyway
|
||||||
jsr unrenderPlayers
|
jsr unrenderPlayers
|
||||||
jsr protectPlayers
|
jsr protectPlayers
|
||||||
jsr unrenderCrosshair
|
|
||||||
|
lda dirtExplosionActive ; Crosshair is dirty if map scrolled and dirt is finished
|
||||||
|
bne gameplayLoopRenderPlayersAnyway
|
||||||
jsr protectCrosshair
|
jsr protectCrosshair
|
||||||
|
jsr renderCrosshair
|
||||||
|
|
||||||
gameplayLoopRenderPlayersAnyway:
|
gameplayLoopRenderPlayersAnyway:
|
||||||
jsr renderPlayers
|
jsr renderPlayers
|
||||||
@ -297,8 +303,6 @@ endTurnHeader:
|
|||||||
jsr renderPlayerHeader
|
jsr renderPlayerHeader
|
||||||
jsr renderInventory
|
jsr renderInventory
|
||||||
stz turnRequested
|
stz turnRequested
|
||||||
|
|
||||||
jsr protectCrosshair
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
endTurnFocusPlayer0:
|
endTurnFocusPlayer0:
|
||||||
@ -338,6 +342,8 @@ scrollMap:
|
|||||||
lda projectileActive ; Crosshair is visible if projectile isn't
|
lda projectileActive ; Crosshair is visible if projectile isn't
|
||||||
beq scrollMapApplyScrolling
|
beq scrollMapApplyScrolling
|
||||||
jsr unrenderCrosshair
|
jsr unrenderCrosshair
|
||||||
|
lda #1
|
||||||
|
sta crosshairBackgroundStale
|
||||||
|
|
||||||
scrollMapApplyScrolling:
|
scrollMapApplyScrolling:
|
||||||
pla
|
pla
|
||||||
@ -358,7 +364,6 @@ scrollMapApplyScrolling:
|
|||||||
sta playersDirty
|
sta playersDirty
|
||||||
sta projectilesDirty
|
sta projectilesDirty
|
||||||
sta terrainDirty
|
sta terrainDirty
|
||||||
sta crosshairDirty
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
@ -486,9 +491,7 @@ playerMoveRequested:
|
|||||||
terrainDirty:
|
terrainDirty:
|
||||||
.word 1
|
.word 1
|
||||||
playersDirty:
|
playersDirty:
|
||||||
.word 0
|
.word 1
|
||||||
crosshairDirty:
|
|
||||||
.word 0
|
|
||||||
projectilesDirty:
|
projectilesDirty:
|
||||||
.word 1
|
.word 1
|
||||||
inventoryDirty:
|
inventoryDirty:
|
||||||
|
Loading…
Reference in New Issue
Block a user