mirror of
https://github.com/blondie7575/GSCats.git
synced 2025-01-09 18:32:11 +00:00
Dirt explosions now happen at point of projectile hit
This commit is contained in:
parent
48f2e17491
commit
5490294c5f
14
dirt.s
14
dirt.s
@ -33,11 +33,7 @@ createDirtExplosion:
|
||||
lda #1
|
||||
sta dirtExplosionActive
|
||||
|
||||
lda #120
|
||||
sta PARAML0
|
||||
lda #100
|
||||
sta PARAML1
|
||||
lda #3
|
||||
lda #3 ; Radius hard-coded for now
|
||||
sta PARAML2
|
||||
asl
|
||||
sta CACHEDATA ; Cache diameter
|
||||
@ -168,10 +164,13 @@ createDirtExplosionColumnLoopNowY:
|
||||
;
|
||||
renderDirtExplosion:
|
||||
SAVE_AXY
|
||||
|
||||
lda dirtExplosionActive
|
||||
beq renderDirtExplosionDone
|
||||
|
||||
ldx #0
|
||||
stz dirtExplosionActive ; Assume we're done unless a particle says otherwise
|
||||
|
||||
renderDirtExplosionLoop:
|
||||
PARTICLEPTR_XY
|
||||
jsr updateDirtParticle
|
||||
@ -266,8 +265,13 @@ updateDirtParticle:
|
||||
lda #$11
|
||||
sta SHADOWVRAMBANK,x
|
||||
|
||||
; Let everyone know we did work
|
||||
lda #1
|
||||
sta dirtExplosionActive
|
||||
|
||||
updateDirtParticleDone:
|
||||
RESTORE_AXY
|
||||
updateDirtParticleDoneRTS:
|
||||
rts
|
||||
|
||||
updateDirtParticleKill:
|
||||
|
@ -177,6 +177,8 @@ gameplayLoopVictoryCondition:
|
||||
gameplayEndTurnCondition:
|
||||
lda turnRequested
|
||||
beq gameplayLoopEndFrame
|
||||
lda dirtExplosionActive
|
||||
bne gameplayLoopEndFrame
|
||||
jsr endTurn
|
||||
|
||||
gameplayLoopEndFrame:
|
||||
|
BIN
gscats.2mg
BIN
gscats.2mg
Binary file not shown.
15
projectile.s
15
projectile.s
@ -222,9 +222,6 @@ allocProjectileDone:
|
||||
;
|
||||
;
|
||||
fireProjectile:
|
||||
jsr createDirtExplosion
|
||||
rts
|
||||
|
||||
SAVE_AXY
|
||||
|
||||
; Allocate a projectile
|
||||
@ -880,7 +877,7 @@ processPlayerImpactDeath:
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; processTerrainImpact
|
||||
;
|
||||
; Trashes A,Y, SCRATCHL
|
||||
; Trashes A,Y, SCRATCHL, PARAML0, PARAML1
|
||||
;
|
||||
processTerrainImpact:
|
||||
ldy projectileActive
|
||||
@ -901,10 +898,12 @@ processTerrainImpactNegative:
|
||||
|
||||
processTerrainStoreContinue:
|
||||
sta PARAML0
|
||||
pha ; Dirt explosion will need this
|
||||
lda projectileData+GO_POSY,y
|
||||
sec
|
||||
sbc #GAMEOBJECTHEIGHT ; This fudge makes tunneling work better
|
||||
sta PARAML1
|
||||
pha ; Dirt explosion will need this
|
||||
|
||||
lda projectileData+JD_TYPE,y
|
||||
tay
|
||||
@ -915,7 +914,7 @@ processTerrainStoreContinue:
|
||||
phy ; We'll need the radius in a moment
|
||||
|
||||
jsr craterTerrain
|
||||
|
||||
|
||||
jsr unclipTerrain
|
||||
|
||||
; Recompile the rows affected by the crater
|
||||
@ -937,4 +936,10 @@ processTerrainStoreContinue:
|
||||
|
||||
jsr clipTerrain
|
||||
|
||||
pla
|
||||
sta PARAML1
|
||||
pla
|
||||
sta PARAML0
|
||||
jsr createDirtExplosion
|
||||
|
||||
rts
|
||||
|
Loading…
Reference in New Issue
Block a user