From c5aaa07f3e0d26cdca73a057a7fdd64368055972 Mon Sep 17 00:00:00 2001 From: aerinon Date: Thu, 15 Jan 2026 15:47:23 -0700 Subject: [PATCH] feat: king tomb bonk fix --- boots.asm | 26 +++++++++++++------------- hooks.asm | 8 +++++++- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/boots.asm b/boots.asm index 4e8c771..26fcfad 100644 --- a/boots.asm +++ b/boots.asm @@ -28,16 +28,19 @@ AddBonkTremors: JSL AddDashTremor : JSL Player_ApplyRumbleToSprites ; things we wrote over RTL ;-------------------------------------------------------------------------------- -BonkBreakableWall: - PHX : PHP - SEP #$30 ; set 8-bit accumulator and index registers +ValidDashCheck: + PHP + SEP #$20 LDA.l BootsModifier : CMP.b #$01 : BEQ + - LDA.l BootsEquipment : BNE + ; Check for Boots - PLP : PLX : LDA.w #$0000 : RTL - + - PLP : PLX - LDA.w LinkDashing : AND.w #$00FF ; things we wrote over -RTL + LDA.l BootsEquipment : BEQ .exit + + LDA.w LinkDashing +.exit + BEQ + + PLP : REP #$02 + RTL + + + PLP : SEP #$02 + RTL ;-------------------------------------------------------------------------------- BonkRockPile: LDA.l BootsModifier : CMP.b #$01 : BEQ + @@ -48,10 +51,7 @@ BonkRockPile: RTL ;-------------------------------------------------------------------------------- GravestoneHook: - LDA.l BootsModifier : CMP.b #$01 : BEQ + - LDA.l BootsEquipment : BEQ .done ; Check for Boots - + - LDA.w LinkDashing : BEQ .done ; things we wrote over + JSL ValidDashCheck : BEQ .done ; JML moveGravestone .done JML GravestoneHook_continue diff --git a/hooks.asm b/hooks.asm index 5e5c224..806b773 100644 --- a/hooks.asm +++ b/hooks.asm @@ -117,7 +117,7 @@ JSL AddBonkTremors : NOP #4 ; Bonk Breakable Walls ;-------------------------------------------------------------------------------- org $81CF8E ; CF8E <- Bank01.asm : 11641 (LDA $0372 : AND.w #$00FF) -JSL BonkBreakableWall : NOP #2 +JSL ValidDashCheck : NOP #2 ;-------------------------------------------------------------------------------- ;================================================================================ @@ -136,6 +136,12 @@ GravestoneHook_continue: org $87C106 moveGravestone: ;-------------------------------------------------------------------------------- +org $899A30 +JSL ValidDashCheck : NOP #2 +org $899A3A +JSL ValidDashCheck : NOP #2 +;-------------------------------------------------------------------------------- + ;================================================================================ ; Jump Down Ledge