From 15031bb6ec9f60d42c7b0d95aca40f6699b47d7b Mon Sep 17 00:00:00 2001 From: scawful Date: Sun, 7 Jul 2024 10:19:54 -0400 Subject: [PATCH] move Sprite_DamageFlash, replace SprMiscA with SprFlash --- Sprites/ZSpriteLib/sprite_functions.asm | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Sprites/ZSpriteLib/sprite_functions.asm b/Sprites/ZSpriteLib/sprite_functions.asm index ad61cbe..8d26339 100644 --- a/Sprites/ZSpriteLib/sprite_functions.asm +++ b/Sprites/ZSpriteLib/sprite_functions.asm @@ -275,6 +275,38 @@ DragPlayer: ; ========================================================= +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.w SprFlash, X : INC : CMP.b #$08 : BNE .dontReset + LDA.b #$00 + + .dontReset + STA.w SprFlash, X + BRA .flash + +.dontFlash + STZ.w SprFlash, X + +.flash + RTS +} + +; ========================================================= + Intro_Dungeon_Main: { LDA $0E20 : CMP.b #$92 : BNE .not_sprite_body_boss