update all sprites to use SprFlash instead of SprMiscA

This commit is contained in:
scawful
2024-07-07 10:20:15 -04:00
parent 15031bb6ec
commit 0979c4eb81
10 changed files with 17 additions and 53 deletions

View File

@@ -405,11 +405,10 @@ Sprite_KydrogBoss_Main:
%PlayAnimation(0, 0, 10)
JSL Sprite_KillFriends
LDA $0DA0, X : INC : CMP.b #$08 : BNE .dontReset
LDA.w SprFlash, X : INC : CMP.b #$08 : BNE .dontReset
LDA.b #$00
.dontReset
STA $0DA0, X
.dontReset
STA.w SprFlash, X
RTS
}
@@ -424,7 +423,6 @@ Sprite_KydrogBoss_Main:
; Increase the Z for a bit until he is off screen
LDA SprHeight, X : CLC : ADC.b #$04
STA.w SprHeight, X : CMP.b #$B0 : BCC .not_off_screen
;
LDA #$40 : STA.w SprTimerD, X
%GotoAction($0B)
.not_off_screen
@@ -505,7 +503,7 @@ CheckForNextPhase:
LDA #$80 : STA $0E50, X
LDA #$01 : STA $0D80, X
STA !KydrogPhase
INC $0DA0, X
INC.w SprFlash, X
RTS
.phase_three
@@ -577,38 +575,6 @@ KydrogBoss_Set_Damage:
; =========================================================
Sprite_DamageFlash_Long:
{
PHB : PHK : PLB
JSR Sprite_Damage_Flash
PLB
RTL
}
; =========================================================
Sprite_Damage_Flash:
{
LDA $0EF0, X : BEQ .dontFlash
; Change the palette to the next in the cycle
LDA $0DA0, X : INC : CMP.b #$08 : BNE .dontReset
LDA.b #$00
.dontReset
STA $0DA0, X
BRA .flash
.dontFlash
STZ $0DA0, X
.flash
RTS
}
; =========================================================
Sprite_Offspring_SpawnHead:
{
JSL GetRandomInt : AND.b #$3F : BNE .normal_head
@@ -744,8 +710,7 @@ Sprite_KydrogBoss_Draw:
LDA .start_index, Y : STA $06 ; Needs to be 16 bit ; Y = 00, 02, 04, 06
SEP #$20
; Store Palette thing
LDA $0DA0, X : STA $08
LDA.w SprFlash, X : STA $08
PHX ; Store Sprite ID

View File

@@ -892,8 +892,7 @@ Sprite_Twinrova_Draw:
LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame
LDA .start_index, Y : STA $06
; Store Palette thing
LDA $0DA0, X : STA $08
LDA.w SprFlash, X : STA $08
PHX
LDX .nbr_of_tiles, Y ;amount of tiles -1

View File

@@ -337,9 +337,7 @@ Sprite_Wolfos_Draw:
LDA $0DC0, X : CLC : ADC $0D90, X : TAY ;Animation Frame
LDA .start_index, Y : STA $06
; Store Palette thing
LDA $0DA0, X : STA $08
LDA.w SprFlash, X : STA $08
PHX
LDX .nbr_of_tiles, Y ;amount of tiles -1

View File

@@ -336,7 +336,7 @@ Sprite_AntiKirby_Draw:
LDA SprGfx, X : CLC : ADC SprFrame, X : TAY;Animation Frame
LDA .start_index, Y : STA $06
LDA.w SprMiscA, X : STA $08
LDA.w SprFlash, X : STA $08
LDA.w SprMiscC, X : STA $09
PHX

View File

@@ -193,7 +193,8 @@ Sprite_Booki_Draw:
LDA SprGfx, X : CLC : ADC SprFrame, X : TAY;Animation Frame
LDA .start_index, Y : STA $06
LDA.w SprMiscA, X : STA $08
LDA.w SprFlash, X : STA $08
LDA.w SprMiscC, X : STA $09
PHX

View File

@@ -39,6 +39,7 @@ Sprite_Darknut_Long:
PHB : PHK : PLB
JSR Sprite_Darknut_Draw ; Call the draw code
JSL Sprite_DrawShadow
JSL Sprite_CheckActive ; Check if game is not paused
BCC .SpriteIsNotActive ; Skip Main code is sprite is innactive
@@ -143,8 +144,8 @@ Sprite_Darknut_Draw:
LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame
LDA .start_index, Y : STA $06
LDA.w SprMiscA, X : STA $08
LDA.w SprFlash, X : STA $08
PHX
LDX .nbr_of_tiles, Y ;amount of tiles -1

View File

@@ -295,7 +295,7 @@ Sprite_Goriya_Draw:
LDA.w SprGfx, X : CLC : ADC.w SprFrame, X : TAY;Animation Frame
LDA.w .start_index, Y : STA $06
LDA.w SprMiscA, X : STA $08
LDA.w SprFlash, X : STA $08
PHX
LDX .nbr_of_tiles, Y ;amount of tiles - 1
@@ -389,7 +389,7 @@ Sprite_Boomerang_Draw:
LDA SprGfx, X : CLC : ADC SprFrame, X : TAY;Animation Frame
LDA .start_index, Y : STA $06
LDA.w SprMiscA, X : STA $08
LDA.w SprFlash, X : STA $08
PHX

View File

@@ -143,7 +143,7 @@ Sprite_PolsVoice_Draw:
LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame
LDA .start_index, Y : STA $06
LDA $0DA0, X : STA $08
LDA.w SprFlash, X : STA $08
PHX
LDX .nbr_of_tiles, Y ;amount of tiles -1

View File

@@ -214,7 +214,7 @@ Sprite_Puffstool_Draw:
LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame
LDA .start_index, Y : STA $06
LDA.w SprMiscA, X : STA $08 ; Palette damage flash
LDA.w SprFlash, X : STA $08 ; Palette damage flash
PHX
LDX .nbr_of_tiles, Y ;amount of tiles -1

View File

@@ -224,7 +224,7 @@ Sprite_ThunderGhost_Draw:
LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame
LDA .start_index, Y : STA $06
LDA.w SprMiscA, X : STA $08
LDA.w SprFlash, X : STA $08
PHX