cleanup deku mask, remove unused code

This commit is contained in:
scawful
2024-07-06 19:47:35 -04:00
parent f0f89a1fb7
commit 935346fb13
2 changed files with 59 additions and 77 deletions

View File

@@ -25,6 +25,8 @@ deku_palette:
dw #$6739, #$15C5, #$150E, #$26C9, #$17AA, #$21F4, #$17DF, #$42DB
dw #$14A5, #$14BC, #$14B2, #$14A5, #$7FFF, #$7A18, #$178C
print "End of Masks/deku_mask.asm ", pc
; =========================================================
; Indicates somaria platform status.
@@ -56,56 +58,31 @@ warnpc $07A6BE
; =========================================================
org $07811A
JSR Link_HandleDekuTransformation
Link_HandleChangeInZVelocity = $078926
Link_HandleChangeInZVelocity_preset = $078932
pullpc ; Free space in bank07 - all_sprites.asm
Link_HandleDekuTransformation:
{
; Check if using Quake Medallion
LDA $5D : CMP.b #$0A : BEQ .continue
.continue
JSR $82DA ; Link_HandleBunnyTransformation
RTS
}
print "End of Masks/deku_mask.asm ", pc
pushpc
org $078926
Link_HandleChangeInZVelocity:
org $078932
Link_HandleChangeInZVelocity_preset:
org $078028
PlaySFX_Set2:
org $07802F
PlaySFX_Set3:
PlaySFX_Set2 = $078028
PlaySFX_Set3 = $07802F
org $07A6BE
LinkState_UsingQuake:
{
.anim_step
db #$00, #$01, #$02, #$03
db #$00, #$01, #$02, #$03
db #$10, #$10, #$00, #$00 ; 16
.anim_step
db #$00, #$01, #$02, #$03
db #$00, #$01, #$02, #$03
db #$10, #$10, #$00, #$00 ; 16
.anim_timer
db 5, 5, 5, 5
db 5, 5, 5, 5
db 5, 5, 5, 19
.anim_timer
db 5, 5, 5, 5
db 5, 5, 5, 5
db 5, 5, 5, 19
JSR $F514 ; CacheCameraPropertiesIfOutdoors
STZ.b $27 : STZ.b $28 ; Reset recoil X and Y
; SPIN STEP CHECK
LDA.w $031D : CMP.b #$0A : BNE .not_ascending
LDA.w LinkSpinStep : CMP.b #$0A : BNE .not_ascending
LDA.w $0362 : STA.b $29
LDA.w $0363 : STA.w $02C7
LDA.w $0364 : STA.b $24
@@ -116,56 +93,51 @@ LinkState_UsingQuake:
JSL LinkHop_FindArbitraryLandingSpot
; Link recoil Z value, hop Z value
LDA.b $29 : STA.w $0362
LDA.b LinkRecoilZ : STA.w $0362
LDA.w $02C7 : STA.w $0363
; Z Position of Link
LDA.b $24 : STA.w $0364 : BMI .still_ascending
; End of ASCEND -----------------------------------------
; Link recoil Z
LDY.b #$00 : LDA.b $29 : BPL .done_ascending
; End of ASCEND -------------------------------------
LDY.b #$00 : LDA.b LinkRecoilZ : BPL .done_ascending
LDY.b #$00 ; Thrust Sword Down OAM Frame Set
LDY.b #$00 ; Thrust Sword Down OAM Frame Set
.done_ascending
STY.w $031C : BRA .exit
; -------------------------------------------------------
.done_ascending
STY.w $031C : BRA .exit
; ---------------------------------------------------
.not_ascending
DEC.b $3D : BPL .special
.still_ascending
INC.w $031D
INC.w LinkSpinStep
LDX.w LinkSpinStep
CPX.b #$04 : BNE .skip_swish_sfx
PHX : LDA.b #$23 : JSR PlaySFX_Set3 : PLX
.skip_swish_sfx
CPX.b #$0C : BNE .dont_reset_step
LDA.b #$0B : STA.w LinkSpinStep
TAX
.dont_reset_step
LDA.w .anim_timer,X : STA.b $3D
LDA.w .anim_step,X : STA.w $031C
LDA.w $0324 : BNE .special ; Prevent repeat spellcast check
CPX.b #$0B : BNE .special ; Animation step check
; $031D - Spin Step
LDX.w $031D : CPX.b #$04 : BNE .skip_swish_sfx
PHX : LDA.b #$23 : JSR PlaySFX_Set3 : PLX
.skip_swish_sfx
CPX.b #$0C : BNE .dont_reset_step
LDA.b #$0B : STA.w $031D
; -------------------------------------------------
; Prevent repeat spellcast set
LDA.b #$01 : STA.w $0324
LDA.b #$12 : STA LinkZ
LDA.b #$FF : STA FallTimer
LDA.b #$01 : STA $70
; -------------------------------------------------
TAX
.dont_reset_step
LDA.w .anim_timer,X : STA.b $3D
LDA.w .anim_step,X : STA.w $031C
LDA.w $0324 : BNE .special ; Prevent repeat spellcast check
CPX.b #$0B : BNE .special ; Animation step check
; -----------------------------------------------------
; Prevent repeat spellcast set
LDA.b #$01 : STA.w $0324
LDA.b #$12 : STA $24
LDA.b #$FF : STA $5C
LDA.b #$01 : STA $70
; -----------------------------------------------------
.exit
.exit
RTS
.special
.special
DEC $5C
JSL DekuLink_HoverBasedOnInput
RTS