Add Moosh documentation and cleanup mask_routines

This commit is contained in:
scawful
2024-10-04 00:08:19 -04:00
parent 15ea5fbfe6
commit 15df798812
2 changed files with 40 additions and 43 deletions

View File

@@ -9,10 +9,13 @@
; 04 = Bunny Hood ; 04 = Bunny Hood
; 05 = Minish Form ; 05 = Minish Form
; 06 = GBC Form ; 06 = GBC Form
; 07 = Moosh Form
!CurrentMask = $02B2 !CurrentMask = $02B2
; Indexed by the bank number ; Indexed by the bank number
!LinkGraphics = $BC !LinkGraphics = $BC
; If set, player is diving with Zora Mask
!ZoraDiving = $0AAB !ZoraDiving = $0AAB
; If set, deku is hovering and can drop bombs ; If set, deku is hovering and can drop bombs

View File

@@ -4,8 +4,7 @@
macro PlayerTransform() macro PlayerTransform()
LDY.b #$04 : LDA.b #$23 LDY.b #$04 : LDA.b #$23
JSL AddTransformationCloud JSL AddTransformationCloud
LDA.b #$14 LDA.b #$14 : STA.w $0CF8
STA.w $0CF8
JSL $0DBB67 ; Link_CalculateSFXPan JSL $0DBB67 ; Link_CalculateSFXPan
ORA.w $0CF8 ORA.w $0CF8
STA $012E STA $012E
@@ -22,7 +21,7 @@ macro CheckNewR_ButtonPress()
endmacro endmacro
; ========================================================= ; =========================================================
; Change Link's sprite by setting $BC to the bank with the gfx ; Change Link's sprite by setting $BC to the gfx bank
; InitializeMemoryAndSRAM ; InitializeMemoryAndSRAM
org $008827 org $008827
@@ -81,7 +80,6 @@ ForceResetMask_GameOver:
.gbc_link .gbc_link
JSL UpdateGbcPalette JSL UpdateGbcPalette
LDA #$3B : STA $BC ; change link's sprite LDA #$3B : STA $BC ; change link's sprite
.still_link .still_link
LDA.b #$30 LDA.b #$30
STA.b $98 STA.b $98
@@ -91,10 +89,9 @@ ForceResetMask_GameOver:
ForceResetMask_SaveAndQuit: ForceResetMask_SaveAndQuit:
{ {
LDA !CurrentMask : BEQ .still_link LDA !CurrentMask : BEQ .still_link
%ResetToLinkGraphics() %ResetToLinkGraphics()
.still_link .still_link
LDA.b #$0F LDA.b #$0F : STA.b $95
STA.b $95
RTL RTL
} }
@@ -331,7 +328,6 @@ Link_TransformMask:
Link_TransformMoosh: Link_TransformMoosh:
{ {
PHB : PHK : PLB PHB : PHK : PLB
LDA.w !CurrentMask : CMP.b #$07 : BNE + LDA.w !CurrentMask : CMP.b #$07 : BNE +
%PlayerTransform() %PlayerTransform()
%ResetToLinkGraphics() %ResetToLinkGraphics()
@@ -471,14 +467,12 @@ DekuLink_HoverBasedOnInput:
STZ.b $48 STZ.b $48
JSR HandleMovement JSR HandleMovement
JSL Link_HandleCardinalCollision_Long JSL Link_HandleCardinalCollision_Long
JSL Link_HandleVelocityAndSandDrag JSL Link_HandleVelocityAndSandDrag
STZ.w $0302 STZ.w $0302
JSL HandleIndoorCameraAndDoors JSL HandleIndoorCameraAndDoors
JSL Link_CancelDash JSL Link_CancelDash
; Pos - Cache Pos = difference ; Pos - Cache Pos = difference