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 #$6739, #$15C5, #$150E, #$26C9, #$17AA, #$21F4, #$17DF, #$42DB
dw #$14A5, #$14BC, #$14B2, #$14A5, #$7FFF, #$7A18, #$178C dw #$14A5, #$14BC, #$14B2, #$14A5, #$7FFF, #$7A18, #$178C
print "End of Masks/deku_mask.asm ", pc
; ========================================================= ; =========================================================
; Indicates somaria platform status. ; Indicates somaria platform status.
@@ -56,56 +58,31 @@ warnpc $07A6BE
; ========================================================= ; =========================================================
org $07811A Link_HandleChangeInZVelocity = $078926
JSR Link_HandleDekuTransformation Link_HandleChangeInZVelocity_preset = $078932
pullpc ; Free space in bank07 - all_sprites.asm PlaySFX_Set2 = $078028
Link_HandleDekuTransformation: PlaySFX_Set3 = $07802F
{
; 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:
org $07A6BE org $07A6BE
LinkState_UsingQuake: LinkState_UsingQuake:
{ {
.anim_step .anim_step
db #$00, #$01, #$02, #$03 db #$00, #$01, #$02, #$03
db #$00, #$01, #$02, #$03 db #$00, #$01, #$02, #$03
db #$10, #$10, #$00, #$00 ; 16 db #$10, #$10, #$00, #$00 ; 16
.anim_timer .anim_timer
db 5, 5, 5, 5 db 5, 5, 5, 5
db 5, 5, 5, 5 db 5, 5, 5, 5
db 5, 5, 5, 19 db 5, 5, 5, 19
JSR $F514 ; CacheCameraPropertiesIfOutdoors JSR $F514 ; CacheCameraPropertiesIfOutdoors
STZ.b $27 : STZ.b $28 ; Reset recoil X and Y STZ.b $27 : STZ.b $28 ; Reset recoil X and Y
; SPIN STEP CHECK ; 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 $0362 : STA.b $29
LDA.w $0363 : STA.w $02C7 LDA.w $0363 : STA.w $02C7
LDA.w $0364 : STA.b $24 LDA.w $0364 : STA.b $24
@@ -116,56 +93,51 @@ LinkState_UsingQuake:
JSL LinkHop_FindArbitraryLandingSpot JSL LinkHop_FindArbitraryLandingSpot
; Link recoil Z value, hop Z value ; 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 LDA.w $02C7 : STA.w $0363
; Z Position of Link ; Z Position of Link
LDA.b $24 : STA.w $0364 : BMI .still_ascending LDA.b $24 : STA.w $0364 : BMI .still_ascending
; End of ASCEND ----------------------------------------- ; End of ASCEND -------------------------------------
; Link recoil Z LDY.b #$00 : LDA.b LinkRecoilZ : BPL .done_ascending
LDY.b #$00 : LDA.b $29 : 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 .not_ascending
DEC.b $3D : BPL .special DEC.b $3D : BPL .special
.still_ascending .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 ; Prevent repeat spellcast set
PHX : LDA.b #$23 : JSR PlaySFX_Set3 : PLX LDA.b #$01 : STA.w $0324
.skip_swish_sfx LDA.b #$12 : STA LinkZ
CPX.b #$0C : BNE .dont_reset_step LDA.b #$FF : STA FallTimer
LDA.b #$0B : STA.w $031D LDA.b #$01 : STA $70
; -------------------------------------------------
TAX .exit
.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
RTS RTS
.special .special
DEC $5C DEC $5C
JSL DekuLink_HoverBasedOnInput JSL DekuLink_HoverBasedOnInput
RTS RTS

View File

@@ -510,11 +510,19 @@ LinkY = $20 ; Position Y of link
LinkYH = $21 ; High position Y of link LinkYH = $21 ; High position Y of link
LinkX = $22 ; Position X of link LinkX = $22 ; Position X of link
LinkXH = $23 ; High position X of link LinkXH = $23 ; High position X of link
LinkZ = $24 ; Position Z of link
; ----UDLR ; ----UDLR
; [U Up][D Down][L Left][R Right] ; [U Up][D Down][L Left][R Right]
; Direction link is pushing against ; Direction link is pushing against
LinkPushDir = $26 LinkPushDir = $26
; Link's recoiling speed
; By themselves, these do not do much
; They will be reset every frame Link is not in recoil state
LinkRecoilY = $27
LinkRecoilX = $28
LinkRecoilZ = $29
; Link's subpixel velocity ; Link's subpixel velocity
; when this value overflows, Link's main velocity gains an extra pixel ; when this value overflows, Link's main velocity gains an extra pixel
@@ -538,9 +546,6 @@ LinkMoveDir = $67
; 0: Not moving, 1: Moving cardinal, 2: Moving diagonally ; 0: Not moving, 1: Moving cardinal, 2: Moving diagonally
LinkMoveInfo = $6A LinkMoveInfo = $6A
LinkRecoilY = $27 ; Recoiling speed Y of link
LinkRecoilX = $28 ; Recoiling speed X of link
LinkVisible = $4B ; if set to 0x0C link will be invisible LinkVisible = $4B ; if set to 0x0C link will be invisible
LinkBunnyGfx = $56 ; if set to 1 link will be bunny, otherwise link LinkBunnyGfx = $56 ; if set to 1 link will be bunny, otherwise link
@@ -552,6 +557,7 @@ LinkSpeedTbl = $5E
; if is set to 0x02 or 0x03 link is falling ; if is set to 0x02 or 0x03 link is falling
LinkFalling = $5B LinkFalling = $5B
FallTimer = $5C
; LinkState_Default : 0x00 ; LinkState_Default : 0x00
; LinkState_Pits : 0x01 ; LinkState_Pits : 0x01
@@ -643,6 +649,10 @@ LinkAnim = $037A
LinkWallCheat = $037F ; If non zero can walk through walls LinkWallCheat = $037F ; If non zero can walk through walls
; Animation step/graphics for spin attack animations; including medallions.
LinkSpinGfx = $031C
LinkSpinStep = $031D
; ========================================================= ; =========================================================
Link_ReceiveItem = $0799AD ; Y = item id Link_ReceiveItem = $0799AD ; Y = item id