Added better item animation structure
This commit is contained in:
@@ -196,6 +196,7 @@ DrawPotItem:
|
|||||||
LDA.w GfxChrHalfSlotVerify : CMP.b #$03 : BCC +
|
LDA.w GfxChrHalfSlotVerify : CMP.b #$03 : BCC +
|
||||||
PLA : SEC : RTL
|
PLA : SEC : RTL
|
||||||
+
|
+
|
||||||
|
JSR PrepItemAnimation
|
||||||
PLA
|
PLA
|
||||||
|
|
||||||
PHX
|
PHX
|
||||||
@@ -264,23 +265,21 @@ DrawPotItem:
|
|||||||
STA.w SpriteDynamicOAM : STA.w SpriteDynamicOAM+8
|
STA.w SpriteDynamicOAM : STA.w SpriteDynamicOAM+8
|
||||||
|
|
||||||
.draw
|
.draw
|
||||||
; special handling
|
; special animation handling
|
||||||
LDY.b Scrap07 : CPY.b #$D2 : BNE + ; fairy
|
LDY.b Scrap07 : CPY.b #$D2 : BNE + ; fairy
|
||||||
LDA.b FrameCounter : AND.w #$0020 : BEQ ++ ; alternate every 32 frames
|
LDY.w SpriteDirectionTable, X : BEQ ++ : CPY.b #$03 : BEQ ++ ; use other fairy GFX
|
||||||
LDA.w SpriteDynamicOAM+4 : CLC : ADC.w #$02 ; use other fairy GFX
|
LDA.w SpriteDynamicOAM+4 : CLC : ADC.w #$0002 : STA.w SpriteDynamicOAM+4
|
||||||
STA.w SpriteDynamicOAM+4
|
++ CPY.b #$02 : BCC .skipSpecial ; move fairy up 2 pixels
|
||||||
++ LDA.b FrameCounter : SEC : SBC.w #$10 : AND.w #$0020 : BEQ + ; alternate every 32 frames
|
LDA.w SpriteDynamicOAM+2 : SEC : SBC.w #$0002 : STA.w SpriteDynamicOAM+2
|
||||||
LDA.w SpriteDynamicOAM+2 : SEC : SBC.w #$02 ; move fairy up 2 pixels
|
BRA .skipSpecial
|
||||||
STA.w SpriteDynamicOAM+2
|
|
||||||
+ CPY.b #$D6 : BNE + ; good bee
|
+ CPY.b #$D6 : BNE + ; good bee
|
||||||
LDA.b FrameCounter : AND.w #$0020 : BEQ ++ ; alternate every 32 frames
|
LDY.w SpriteDirectionTable, X : BEQ ++ : CPY.b #$03 : BEQ ++ ; use other bee GFX
|
||||||
LDA.w SpriteDynamicOAM+12 : SEC : SBC.w #$10 ; use other fairy GFX
|
LDA.w SpriteDynamicOAM+12 : SEC : SBC.w #$0010 : STA.w SpriteDynamicOAM+12
|
||||||
STA.w SpriteDynamicOAM+12
|
++ CPY.b #$02 : BCC + ; move bee up 2 pixels
|
||||||
++ LDA.b FrameCounter : SEC : SBC.w #$10 : AND.w #$0020 : BEQ + ; alternate every 32 frames
|
LDA.w SpriteDynamicOAM+10 : SEC : SBC.w #$0002 : STA.w SpriteDynamicOAM+10
|
||||||
LDA.w SpriteDynamicOAM+10 : SEC : SBC.w #$02 ; move fairy up 2 pixels
|
|
||||||
STA.w SpriteDynamicOAM+10
|
|
||||||
+
|
+
|
||||||
|
|
||||||
|
.skipSpecial
|
||||||
LDA.w #SpriteDynamicOAM : STA.b Scrap08
|
LDA.w #SpriteDynamicOAM : STA.b Scrap08
|
||||||
SEP #$20
|
SEP #$20
|
||||||
STZ.b Scrap07
|
STZ.b Scrap07
|
||||||
@@ -445,6 +444,10 @@ ConditionalPushBlockTransfer:
|
|||||||
.return
|
.return
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
|
PrepItemAnimation:
|
||||||
|
LDA.b FrameCounter : AND.b #$30 : LSR #4 : STA.w SpriteDirectionTable, X
|
||||||
|
RTS
|
||||||
|
|
||||||
pushpc
|
pushpc
|
||||||
; fix Arghuss/Zora splash graphics
|
; fix Arghuss/Zora splash graphics
|
||||||
org $868595
|
org $868595
|
||||||
|
|||||||
Reference in New Issue
Block a user