add Moosh form to Eon Abyss Song of Soaring

This commit is contained in:
scawful
2024-07-08 20:27:28 -04:00
parent b48324805b
commit fcf843b626
6 changed files with 75 additions and 10 deletions

View File

@@ -185,8 +185,11 @@ LinkItem_NewFlute:
; Are we indoors? ; Are we indoors?
LDA.b $1B : BNE .return LDA.b $1B : BNE .return
; Are we in the dark world? The flute doesn't work there. ; Are we in the dark world? Then become Moosh form.
LDA.b $8A : AND.b #$40 : BNE .return LDA.b $8A : AND #$40 : BEQ .light_world
JSL Link_TransformMoosh
RTS
.light_world
; Also doesn't work in special areas like Master Sword area. ; Also doesn't work in special areas like Master Sword area.
LDA.b $10 : CMP.b #$0B : BEQ .return LDA.b $10 : CMP.b #$0B : BEQ .return
@@ -398,7 +401,7 @@ UpdateFluteSong_Long:
; R Button Pressed - Increment song ; R Button Pressed - Increment song
INC $030F ; increment $030F Song RAM INC $030F ; increment $030F Song RAM
LDA $030F ; load incremented Song RAM LDA $030F ; load incremented Song RAM
CMP.b #$04 CMP.b #$05
BCS .wrap_to_min BCS .wrap_to_min
.update_song .update_song
RTL RTL

View File

@@ -61,3 +61,7 @@ org $388000
org $3B8000 org $3B8000
incbin gfx/gbc_link.4bpp incbin gfx/gbc_link.4bpp
incsrc "Masks/gbc_form.asm" incsrc "Masks/gbc_form.asm"
org $338000
incbin gfx/moosh.4bpp
incsrc "Masks/moosh.asm"

BIN
Masks/gfx/moosh.4bpp Normal file

Binary file not shown.

View File

@@ -108,6 +108,7 @@ Palette_ArmorAndGloves:
CMP.b #$04 : BEQ .bunny_hood CMP.b #$04 : BEQ .bunny_hood
CMP.b #$05 : BEQ .minish_form CMP.b #$05 : BEQ .minish_form
CMP.b #$06 : BEQ .gbc_form CMP.b #$06 : BEQ .gbc_form
CMP.b #$07 : BEQ .moosh_form
JMP .original_sprite JMP .original_sprite
.deku_mask .deku_mask
@@ -139,11 +140,13 @@ Palette_ArmorAndGloves:
LDA.b #$39 : STA $BC : JMP .original_palette LDA.b #$39 : STA $BC : JMP .original_palette
.gbc_form .gbc_form
; Load GBC Link Location
LDA.b #$3B : STA $BC
JSL UpdateGbcPalette JSL UpdateGbcPalette
RTL RTL
.moosh_form
JSL UpdateMooshPalette
RTL
.original_sprite .original_sprite
; Load Original Sprite Location ; Load Original Sprite Location
LDA.b #$10 : STA $BC LDA.b #$10 : STA $BC
@@ -301,11 +304,10 @@ Link_TransformMask:
TAY TAY
; LDA $02B2 ; LDA $02B2
CPY !CurrentMask : BEQ .unequip ; check if mask is on CPY !CurrentMask : BEQ .unequip ; check if mask is on
STA $02B2 : TAX STA $02B2 : TAX
LDA .mask_gfx, X : STA $BC ; set the mask gfx LDA .mask_gfx, X : STA $BC ; set the mask gfx
JSL Palette_ArmorAndGloves ; set the palette JSL Palette_ArmorAndGloves ; set the palette
STA $02F5 ; Somaria platform flag, no dash ; STA $02F5 ; Somaria platform flag, no dash
PLB : CLC : RTL PLB : CLC : RTL
.unequip .unequip
@@ -322,6 +324,20 @@ Link_TransformMask:
db $00, $35, $36, $38, $37, $39, $3A, $3B db $00, $35, $36, $38, $37, $39, $3A, $3B
} }
; TODO: Return to normal Link.
Link_TransformMoosh:
{
PHB : PHK : PLB
LDA.b #$07 : STA.w !CurrentMask
LDA.b #$33 : STA $BC
%PlayerTransform()
JSL Palette_ArmorAndGloves
PLB
RTL
}
; ========================================================= ; =========================================================
; Modifies the value of the Y register before it indexes the table ; Modifies the value of the Y register before it indexes the table
@@ -335,6 +351,12 @@ DekuLink_SpinOrRecoil:
LDY.b #$05 ; Recoil LDY.b #$05 ; Recoil
JML $0DA435 ; JML $0DA40B JML $0DA435 ; JML $0DA40B
.spin .spin
; Moosh form configuration
LDA.w $02B2 : CMP.b #$07 : BEQ +
TYA
LDY.b #$16 ; Pushing
JML $0DA435
+
TYA TYA
LDY.b #$1B ; Spin and die LDY.b #$1B ; Spin and die
JML $0DA40B JML $0DA40B
@@ -1302,6 +1324,7 @@ LinkOAM_CheckForDrawShield:
+ +
CMP.w #$0001 : BEQ .no_shield CMP.w #$0001 : BEQ .no_shield
CMP.w #$0003 : BEQ .no_shield CMP.w #$0003 : BEQ .no_shield
CMP.w #$0007 : BEQ .no_shield
.shield .shield
RTL RTL
} }

35
Masks/moosh.asm Normal file
View File

@@ -0,0 +1,35 @@
UpdateMooshPalette:
{
REP #$30 ; change 16bit mode
LDX #$001E
.loop
LDA.l MooshPalette, X : STA $7EC6E0, X
DEX : DEX : BPL .loop
SEP #$30 ; go back to 8 bit mode
INC $15 ; update the palette
RTL ; or RTS depending on where you need it
}
MooshPalette:
{
dw #$0000, #$7FFF, #$237E, #$46FF, #$369E, #$14A5, #$01FF, #$1078
dw #$6E25, #$7AEF, #$6759, #$0A4A, #$12EF, #$2A5C, #$1571, #$7A18
}
Link_HoverIfMooshWantsToDash:
{
LDA.w !CurrentMask : CMP.b #$07 : BNE .return
JSL PrepareQuakeSpell
LDA.b #$0A : STA.b $5D
.return
JSL Link_HandleMovingAnimation_FullLongEntry
RTL
}
print "End of Masks/moosh.asm ", pc
org $079093
JSL Link_HoverIfMooshWantsToDash

View File

@@ -10,7 +10,7 @@
; 2E - HUD ; 2E - HUD
; 2F - Unused ; 2F - Unused
; 30-32 Sprites: all_sprites.asm ; 30-32 Sprites: all_sprites.asm
; 33 - Unused ; 33 - Moosh Form Gfx and Palette
; 34 - Time System, Custom Overworld Overlays ; 34 - Time System, Custom Overworld Overlays
; 35 - Deku Link Gfx and Palette ; 35 - Deku Link Gfx and Palette
; 36 - Zora Link Gfx and Palette ; 36 - Zora Link Gfx and Palette