cleanup mermaid/maple

This commit is contained in:
scawful
2024-06-17 19:09:42 -04:00
parent cf122b85a4
commit 437531c1a0

View File

@@ -33,22 +33,24 @@
Sprite_Mermaid_Long: Sprite_Mermaid_Long:
PHB : PHK : PLB {
PHB : PHK : PLB
LDA.w SprMiscE, X : BEQ .MermaidDraw LDA.w SprMiscE, X : BEQ .MermaidDraw
JSR Sprite_Maple_Draw JSR Sprite_Maple_Draw
JMP .Continue JMP .Continue
.MermaidDraw .MermaidDraw
JSR Sprite_Mermaid_Draw ; Call the draw code JSR Sprite_Mermaid_Draw ; Call the draw code
.Continue .Continue
JSL Sprite_CheckActive ; Check if game is not paused JSL Sprite_CheckActive ; Check if game is not paused
BCC .SpriteIsNotActive ; Skip Main code is sprite is innactive BCC .SpriteIsNotActive ; Skip Main code is sprite is innactive
JSR Sprite_Mermaid_Main ; Call the main sprite code JSR Sprite_Mermaid_Main ; Call the main sprite code
.SpriteIsNotActive .SpriteIsNotActive
PLB ; Get back the databank we stored previously PLB ; Get back the databank we stored previously
RTL ; Go back to original code RTL ; Go back to original code
}
Sprite_Mermaid_Prep: Sprite_Mermaid_Prep:
@@ -67,57 +69,57 @@ Sprite_Mermaid_Prep:
Sprite_Mermaid_Main: Sprite_Mermaid_Main:
LDA.w SprAction, X; Load the SprAction
JSL UseImplicitRegIndexedLocalJumpTable; Goto the SprAction we are currently in
dw MermaidWait
dw MermaidDive
dw MermaidSwim
dw MapleIdle
MermaidWait:
{ {
%PlayAnimation(0,0, 20) LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
dw MermaidWait
dw MermaidDive
dw MermaidSwim
dw MapleIdle
LDA.w SprTimerA, X : BNE + MermaidWait:
LDA.b #$20 : STA.w SprTimerA, X {
INC.w SprAction, X %PlayAnimation(0,0, 20)
+ JSL Sprite_PlayerCantPassThrough
RTS
}
MermaidDive: LDA.w SprTimerA, X : BNE +
{ LDA.b #$20 : STA.w SprTimerA, X
%PlayAnimation(1,2, 14) INC.w SprAction, X
+
RTS
}
LDA.w SprTimerA, X : BNE + MermaidDive:
INC.w SprAction, X {
LDA.b #-10 : STA.w SprXSpeed, X %PlayAnimation(1,2, 14)
LDA.b #$02 : STA.w SprTimerA, X
+
RTS LDA.w SprTimerA, X : BNE +
} INC.w SprAction, X
LDA.b #-10 : STA.w SprXSpeed, X
LDA.b #$02 : STA.w SprTimerA, X
+
MermaidSwim: RTS
{ }
%PlayAnimation(3,3, 20) MermaidSwim:
JSL Sprite_Move {
%PlayAnimation(3,3, 20)
JSL Sprite_Move
LDA.w SprTimerA, X : BEQ + LDA.w SprTimerA, X : BEQ +
JSR SpawnSplash JSR SpawnSplash
+ +
RTS RTS
}
} MapleIdle:
{
MapleIdle: %PlayAnimation(0,1,16)
{ JSL Sprite_PlayerCantPassThrough
%PlayAnimation(0,1,16) RTS
JSL Sprite_PlayerCantPassThrough }
RTS
} }
Sprite_Mermaid_Draw: Sprite_Mermaid_Draw: