mirror of
https://github.com/blondie7575/GSCats.git
synced 2024-05-30 13:41:29 +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
|
lda #1
|
||||||
sta dirtExplosionActive
|
sta dirtExplosionActive
|
||||||
|
|
||||||
lda #120
|
lda #3 ; Radius hard-coded for now
|
||||||
sta PARAML0
|
|
||||||
lda #100
|
|
||||||
sta PARAML1
|
|
||||||
lda #3
|
|
||||||
sta PARAML2
|
sta PARAML2
|
||||||
asl
|
asl
|
||||||
sta CACHEDATA ; Cache diameter
|
sta CACHEDATA ; Cache diameter
|
||||||
|
@ -168,10 +164,13 @@ createDirtExplosionColumnLoopNowY:
|
||||||
;
|
;
|
||||||
renderDirtExplosion:
|
renderDirtExplosion:
|
||||||
SAVE_AXY
|
SAVE_AXY
|
||||||
|
|
||||||
lda dirtExplosionActive
|
lda dirtExplosionActive
|
||||||
beq renderDirtExplosionDone
|
beq renderDirtExplosionDone
|
||||||
|
|
||||||
ldx #0
|
ldx #0
|
||||||
|
stz dirtExplosionActive ; Assume we're done unless a particle says otherwise
|
||||||
|
|
||||||
renderDirtExplosionLoop:
|
renderDirtExplosionLoop:
|
||||||
PARTICLEPTR_XY
|
PARTICLEPTR_XY
|
||||||
jsr updateDirtParticle
|
jsr updateDirtParticle
|
||||||
|
@ -266,8 +265,13 @@ updateDirtParticle:
|
||||||
lda #$11
|
lda #$11
|
||||||
sta SHADOWVRAMBANK,x
|
sta SHADOWVRAMBANK,x
|
||||||
|
|
||||||
|
; Let everyone know we did work
|
||||||
|
lda #1
|
||||||
|
sta dirtExplosionActive
|
||||||
|
|
||||||
updateDirtParticleDone:
|
updateDirtParticleDone:
|
||||||
RESTORE_AXY
|
RESTORE_AXY
|
||||||
|
updateDirtParticleDoneRTS:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
updateDirtParticleKill:
|
updateDirtParticleKill:
|
||||||
|
|
|
@ -177,6 +177,8 @@ gameplayLoopVictoryCondition:
|
||||||
gameplayEndTurnCondition:
|
gameplayEndTurnCondition:
|
||||||
lda turnRequested
|
lda turnRequested
|
||||||
beq gameplayLoopEndFrame
|
beq gameplayLoopEndFrame
|
||||||
|
lda dirtExplosionActive
|
||||||
|
bne gameplayLoopEndFrame
|
||||||
jsr endTurn
|
jsr endTurn
|
||||||
|
|
||||||
gameplayLoopEndFrame:
|
gameplayLoopEndFrame:
|
||||||
|
|
BIN
gscats.2mg
BIN
gscats.2mg
Binary file not shown.
15
projectile.s
15
projectile.s
|
@ -222,9 +222,6 @@ allocProjectileDone:
|
||||||
;
|
;
|
||||||
;
|
;
|
||||||
fireProjectile:
|
fireProjectile:
|
||||||
jsr createDirtExplosion
|
|
||||||
rts
|
|
||||||
|
|
||||||
SAVE_AXY
|
SAVE_AXY
|
||||||
|
|
||||||
; Allocate a projectile
|
; Allocate a projectile
|
||||||
|
@ -880,7 +877,7 @@ processPlayerImpactDeath:
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; processTerrainImpact
|
; processTerrainImpact
|
||||||
;
|
;
|
||||||
; Trashes A,Y, SCRATCHL
|
; Trashes A,Y, SCRATCHL, PARAML0, PARAML1
|
||||||
;
|
;
|
||||||
processTerrainImpact:
|
processTerrainImpact:
|
||||||
ldy projectileActive
|
ldy projectileActive
|
||||||
|
@ -901,10 +898,12 @@ processTerrainImpactNegative:
|
||||||
|
|
||||||
processTerrainStoreContinue:
|
processTerrainStoreContinue:
|
||||||
sta PARAML0
|
sta PARAML0
|
||||||
|
pha ; Dirt explosion will need this
|
||||||
lda projectileData+GO_POSY,y
|
lda projectileData+GO_POSY,y
|
||||||
sec
|
sec
|
||||||
sbc #GAMEOBJECTHEIGHT ; This fudge makes tunneling work better
|
sbc #GAMEOBJECTHEIGHT ; This fudge makes tunneling work better
|
||||||
sta PARAML1
|
sta PARAML1
|
||||||
|
pha ; Dirt explosion will need this
|
||||||
|
|
||||||
lda projectileData+JD_TYPE,y
|
lda projectileData+JD_TYPE,y
|
||||||
tay
|
tay
|
||||||
|
@ -915,7 +914,7 @@ processTerrainStoreContinue:
|
||||||
phy ; We'll need the radius in a moment
|
phy ; We'll need the radius in a moment
|
||||||
|
|
||||||
jsr craterTerrain
|
jsr craterTerrain
|
||||||
|
|
||||||
jsr unclipTerrain
|
jsr unclipTerrain
|
||||||
|
|
||||||
; Recompile the rows affected by the crater
|
; Recompile the rows affected by the crater
|
||||||
|
@ -937,4 +936,10 @@ processTerrainStoreContinue:
|
||||||
|
|
||||||
jsr clipTerrain
|
jsr clipTerrain
|
||||||
|
|
||||||
|
pla
|
||||||
|
sta PARAML1
|
||||||
|
pla
|
||||||
|
sta PARAML0
|
||||||
|
jsr createDirtExplosion
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
|
@ -282,7 +282,7 @@ compileTerrainDone:
|
||||||
; X = Last row to compile (bottom-relative)
|
; X = Last row to compile (bottom-relative)
|
||||||
; A = |X-Y|
|
; A = |X-Y|
|
||||||
;
|
;
|
||||||
; Trashes A,Y, SCRATCHL
|
; Trashes A,Y, SCRATCHL, PARAML0, PARAML1
|
||||||
;
|
;
|
||||||
compileTerrainChunk:
|
compileTerrainChunk:
|
||||||
;HARDBRK
|
;HARDBRK
|
||||||
|
|
Loading…
Reference in New Issue
Block a user