mirror of
https://github.com/blondie7575/GSCats.git
synced 2024-11-05 02:08:21 +00:00
Firing of selected weapon type
This commit is contained in:
parent
3144b7c9fb
commit
c29ddd74c1
BIN
gscats.2mg
BIN
gscats.2mg
Binary file not shown.
2
player.s
2
player.s
@ -173,6 +173,8 @@ playerFire:
|
||||
sta projectileParams+4
|
||||
lda playerData+PD_POWER,y
|
||||
sta projectileParams+6
|
||||
lda playerData+PD_CURRWEAPON,y
|
||||
sta projectileParams+8
|
||||
jsr fireProjectile
|
||||
|
||||
pla
|
||||
|
20
projectile.s
20
projectile.s
@ -92,6 +92,7 @@ projectileParams:
|
||||
.word 0 ; Starting pos Y
|
||||
.word 0 ; Initial angle
|
||||
.word 0 ; Initial power
|
||||
.word 0 ; Type
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@ -157,6 +158,9 @@ fireProjectile:
|
||||
jsr mult88
|
||||
sta projectileData+JD_VY,y
|
||||
|
||||
lda projectileParams+8 ; Type
|
||||
sta projectileData+JD_TYPE,y
|
||||
|
||||
lda #1
|
||||
sta projectileData+JD_NEW,y
|
||||
stz projectileActive
|
||||
@ -373,12 +377,18 @@ DNANGLE = $ffaf
|
||||
;
|
||||
;
|
||||
renderProjectiles:
|
||||
pha
|
||||
SAVE_AY
|
||||
|
||||
lda projectileData
|
||||
bpl renderProjectilesDoIt
|
||||
jmp renderProjectilesDone
|
||||
|
||||
renderProjectilesDoIt:
|
||||
|
||||
lda projectileData+JD_TYPE
|
||||
tay
|
||||
PROJECTILETYPEPTR_Y
|
||||
|
||||
lda #projectileData
|
||||
sta PARAML0
|
||||
|
||||
@ -393,7 +403,7 @@ renderProjectilesDoIt:
|
||||
bmi renderProjectilesFlat
|
||||
|
||||
renderProjectilesUpAngle:
|
||||
lda #4 ; Up angle
|
||||
lda projectileTypes+PT_FRAME0,y ; Up angle
|
||||
bra renderProjectilesGoSprite
|
||||
|
||||
renderProjectilesNegYPosX:
|
||||
@ -401,7 +411,7 @@ renderProjectilesNegYPosX:
|
||||
bpl renderProjectilesFlat
|
||||
|
||||
renderProjectilesDownAngle:
|
||||
lda #6 ; Down angle
|
||||
lda projectileTypes+PT_FRAME2,y ; Down angle
|
||||
bra renderProjectilesGoSprite
|
||||
|
||||
renderProjectilesNegX:
|
||||
@ -419,13 +429,13 @@ renderProjectilesNegYNegX:
|
||||
bra renderProjectilesUpAngle
|
||||
|
||||
renderProjectilesFlat:
|
||||
lda #5 ; Flat
|
||||
lda projectileTypes+PT_FRAME1,y ; Flat
|
||||
|
||||
renderProjectilesGoSprite:
|
||||
jsr renderGameObject
|
||||
|
||||
renderProjectilesDone:
|
||||
pla
|
||||
RESTORE_AY
|
||||
rts
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user