From eb31b0e5e28f9afe2dbb180a8b5fddab94afdff1 Mon Sep 17 00:00:00 2001 From: Karkat Date: Sat, 26 May 2018 14:51:06 -0400 Subject: [PATCH] added temporary boots modifier --- LTTP_RND_GeneralBugfixes.asm | 1 + boots.asm | 15 +++++++++++++++ hooks.asm | 7 +++++++ tables.asm | 3 ++- 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 boots.asm diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index c4da614..0464c95 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -163,6 +163,7 @@ incsrc cuccostorm.asm incsrc compression.asm incsrc retro.asm incsrc dpadinvert.asm +incsrc boots.asm warnpc $A58000 ;org $228000 ; contrib area diff --git a/boots.asm b/boots.asm new file mode 100644 index 0000000..7589b3d --- /dev/null +++ b/boots.asm @@ -0,0 +1,15 @@ +;================================================================================ +; Boots State Modifier +;-------------------------------------------------------------------------------- +!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 +RTL +;-------------------------------------------------------------------------------- \ No newline at end of file diff --git a/hooks.asm b/hooks.asm index eb2b7cc..131b715 100644 --- a/hooks.asm +++ b/hooks.asm @@ -51,6 +51,13 @@ JML.l InvertDPad : SKIP #6 InvertDPadReturn: ;-------------------------------------------------------------------------------- +;================================================================================ +; Enable/Disable Boots +;-------------------------------------------------------------------------------- +org $079C22 ; <- 39222 - Bank07.asm : 4494 (AND $7EF379 : BEQ .cantDoAction) +JSL.l ModifyBoots +;-------------------------------------------------------------------------------- + ;================================================================================ ; Dungeon Exit Hook ;-------------------------------------------------------------------------------- diff --git a/tables.asm b/tables.asm index 3a23b0b..a083348 100644 --- a/tables.asm +++ b/tables.asm @@ -1495,9 +1495,10 @@ dw #9999 ; Rupee Limit ; $7F50C8 - Infinite Arrows Modifier ; $7F50C9 - Infinite Bombs Modifier ; $7F50CA - Infinite Magic Modifier -; $7F50CB - Invert D-Pad +; $7F50CB - Invert D-Pad (Fill in values) ; $7F50CC - Temporary OHKO ; $7F50CD - Sprite Swapper +; $7F50CE - Boots Modifier (0=Off, 1=Always, 2=Never) ; $7F50D0 - $7F50FF - Block Cypher Parameters ; $7F5100 - $7F51FF - Block Cypher Buffer