diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 9635e8f..af8cc20 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -501,6 +501,9 @@ Sprite_ShowMessageUnconditional: org $05EC96 Sprite_ZeldaLong: +org $0680FA +Player_ApplyRumbleToSprites: + org $0683E6 Utility_CheckIfHitBoxesOverlapLong: diff --git a/boots.asm b/boots.asm index 7589b3d..555fcb8 100644 --- a/boots.asm +++ b/boots.asm @@ -3,13 +3,75 @@ ;-------------------------------------------------------------------------------- !BOOTS_MODIFIER = "$7F50CE" ModifyBoots: - PHA - LDA !BOOTS_MODIFIER : CMP.b #$01 : BNE + - PLA : AND $7EF379 : ORA.b #$04 : RTL ; yes boots - + : CMP #$02 : BNE + - PLA : AND $7EF379 : AND.b #$FB : RTL ; no boots - + - PLA - AND $7EF379 ; regular boots + PHA + LDA !BOOTS_MODIFIER : CMP.b #$01 : BNE + + PLA : AND $7EF379 : ORA.b #$04 : RTL ; yes boots + + : CMP.b #$02 : BNE + + PLA : AND $7EF379 : AND.b #$FB : RTL ; no boots + + : LDA FakeBoots : CMP.b #$01 : BNE + + LDA $5B : BEQ ++ : LDA $59 : BNE + ; hover check + ++ : PLA : AND $7EF379 : ORA.b #$04 : RTL ; yes boots, not hovering + + + PLA + AND $7EF379 ; regular boots +RTL +;-------------------------------------------------------------------------------- +AddBonkTremors: + PHA + LDA $46 : BNE + ; Check for incapacitated Link + JSL.l IncrementBonkCounter + + + LDA !BOOTS_MODIFIER : CMP.b #$01 : BEQ + + LDA $7EF355 : BNE + ; Check for Boots + PLA : RTL + + + PLA + JSL.l AddDashTremor : JSL.l Player_ApplyRumbleToSprites ; things we wrote over +RTL +;-------------------------------------------------------------------------------- +BonkBreakableWall: + PHX : PHP + SEP #$30 ; set 8-bit accumulator and index registers + LDA !BOOTS_MODIFIER : CMP.b #$01 : BEQ + + LDA $7EF355 : BNE + ; Check for Boots + PLP : PLX : LDA.w #$0000 : RTL + + + PLP : PLX + LDA $0372 : AND.w #$00FF ; things we wrote over +RTL +;-------------------------------------------------------------------------------- +BonkRockPile: + LDA !BOOTS_MODIFIER : CMP.b #$01 : BEQ + + LDA $7EF355 : BNE + ; Check for Boots + LDA.b #$00 : RTL + + + LDA $02EF : AND.b #$70 ; things we wrote over +RTL +;-------------------------------------------------------------------------------- +GravestoneHook: + LDA !BOOTS_MODIFIER : CMP.b #$01 : BEQ + + LDA $7EF355 : BEQ .done ; Check for Boots + + + LDA $0372 : BEQ .done ; things we wrote over + JML.l moveGravestone + .done + JML.l GravestoneHook_continue +;-------------------------------------------------------------------------------- +JumpDownLedge: + LDA !BOOTS_MODIFIER : CMP.b #$01 : BEQ + + LDA $7EF355 : BNE + ; Check for Boots + ; Disarm Waterwalk + LDA $5B : CMP.b #$01 : BNE + + STZ $5B + + + LDA $1B : BNE .done : LDA.b #$02 : STA $EE ; things we wrote over + .done +RTL +;-------------------------------------------------------------------------------- +BonkRecoil: + LDA !BOOTS_MODIFIER : CMP.b #$01 : BEQ + + LDA $7EF355 : BNE + ; Check for Boots + LDA.b #$16 : STA $29 : RTL + + + LDA.b #$24 : STA $29 ; things we wrote over RTL -;-------------------------------------------------------------------------------- \ No newline at end of file diff --git a/hooks.asm b/hooks.asm index 6a48892..1ddd019 100755 --- a/hooks.asm +++ b/hooks.asm @@ -62,6 +62,51 @@ org $079C22 ; <- 39222 - Bank07.asm : 4494 (AND $7EF379 : BEQ .cantDoAction) JSL.l ModifyBoots ;-------------------------------------------------------------------------------- +;================================================================================ +; Enable/Disable Bonk Tremors +;-------------------------------------------------------------------------------- +org $079202 ; 39202 <- Bank07.asm : 2859 (JSL AddDashTremor : JSL Player_ApplyRumbleToSprites) +JSL.l AddBonkTremors : NOP #4 +;-------------------------------------------------------------------------------- + +;================================================================================ +; Bonk Breakable Walls +;-------------------------------------------------------------------------------- +org $01CF8E ; CF8E <- Bank01.asm : 11641 (LDA $0372 : AND.w #$00FF) +JSL.l BonkBreakableWall : NOP #2 +;-------------------------------------------------------------------------------- + +;================================================================================ +; Bonk Rock Pile +;-------------------------------------------------------------------------------- +org $07C196 ; 3C196 <- Bank07.asm : 10310 (LDA $02EF : AND.b #$70) +JSL.l BonkRockPile : NOP +;-------------------------------------------------------------------------------- + +;================================================================================ +; Move Gravestone +;-------------------------------------------------------------------------------- +org $07C0FD ; 3C0FD <- Bank07.asm : 10197 (LDA $0372 : BNE .moveGravestone) +JML.l GravestoneHook : NOP +GravestoneHook_continue: +org $07C106 +moveGravestone: +;-------------------------------------------------------------------------------- + +;================================================================================ +; Jump Down Ledge +;-------------------------------------------------------------------------------- +org $078966 ; 38966 <- Bank07.asm : 1618 (LDA $1B : BNE .indoors : LDA.b #$02 : STA $EE) +JSL.l JumpDownLedge : NOP #4 +;-------------------------------------------------------------------------------- + +;================================================================================ +; Bonk Recoil +;-------------------------------------------------------------------------------- +org $07922C ; 3922C <- Bank07.asm : 2869 (LDA.b #$24 : STA $29) +JSL.l BonkRecoil +;-------------------------------------------------------------------------------- + ;================================================================================ ; Dungeon Exit Hook ;-------------------------------------------------------------------------------- @@ -486,9 +531,6 @@ JSL.l CheckGanonHammerDamage : NOP ;================================================================================ ; Stat Hooks ;-------------------------------------------------------------------------------- -org $079202 ; 39202 <- Bank07.asm : 2859 (JSL AddDashTremor) -JSL.l StatBonkCounter -;-------------------------------------------------------------------------------- org $02B797 ; <- 13797 - Bank02.asm : 8712 (LDA.b #$19 : STA $10) JSL.l StatsFinalPrep ;-------------------------------------------------------------------------------- diff --git a/stats.asm b/stats.asm index 4bd3699..a853fc1 100644 --- a/stats.asm +++ b/stats.asm @@ -144,16 +144,12 @@ !LOCK_STATS = "$7EF443" ;-------------------------------------------------------------------------------- !BONK_COUNTER = "$7EF420" -StatBonkCounter: - PHA - JSL Ancilla_CheckIfAlreadyExistsLong : BCS + - LDA !LOCK_STATS : BNE + - LDA !BONK_COUNTER : INC - CMP.b #100 : BEQ + ; decimal 100 - STA !BONK_COUNTER +IncrementBonkCounter: + LDA !LOCK_STATS : BNE + + LDA !BONK_COUNTER : INC + CMP.b #100 : BEQ + ; decimal 100 + STA !BONK_COUNTER + - PLA - JSL.l AddDashTremor ; thing we wrote over RTL ;-------------------------------------------------------------------------------- !SAVE_COUNTER = "$7EF42D" diff --git a/tables.asm b/tables.asm index b26436f..a376a84 100644 --- a/tables.asm +++ b/tables.asm @@ -388,7 +388,11 @@ org $30808D ; PC 0x18008D InstantPostAgaWorldState: db $00 ; #$00 = Off (default) - #$01 = On ;-------------------------------------------------------------------------------- -; 0x18008E - 0x18008F (unused) +org $30808E ; PC 0x18008E +FakeBoots: +db $00 ; #$00 = Off (default) - #$01 = On +;-------------------------------------------------------------------------------- +; 0x18008F (unused) ;-------------------------------------------------------------------------------- org $308090 ; PC 0x180090 - 0x180097 ProgressiveSwordLimit: