diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 8b54f58..9bc9d75 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -26,7 +26,7 @@ org $3FFFFF ; <- 1FFFFF db #$00 ; expand file to 2mb org $1FFFF8 ; <- FFFF8 timestamp rom -db #$20, #$17, #$11, #$14 ; year/month/day +db #$20, #$17, #$11, #$18 ; year/month/day ;================================================================================ diff --git a/dialog.asm b/dialog.asm index 42f1f62..68e7155 100644 --- a/dialog.asm +++ b/dialog.asm @@ -151,6 +151,7 @@ FreeDungeonItemNotice: %CopyDialog(Notice_BigKeyOf) BRA .dungeon + : CMP.b #$A0 : BNE + ; small key of... + LDA !ITEM_TEMPORARY : CMP.b #$AF : BNE ++ : BRL .skip : ++ %CopyDialog(Notice_SmallKeyOf) PLA : AND.b #$0F : STA $7F5020 : LDA.b #$0F : !SUB $7F5020 : PHA LDA #$01 : STA $7F5010 ; set up a flip for small keys diff --git a/events.asm b/events.asm index e824ad8..1a4467d 100644 --- a/events.asm +++ b/events.asm @@ -87,6 +87,10 @@ OnLinkDamagedFromPit: LDA.b #$14 : STA $11 ; thing we wrote over RTL ;-------------------------------------------------------------------------------- +OnLinkDamagedFromPitOutdoors: + JSL.l OHKOTimer ; make sure this is last +RTL +;-------------------------------------------------------------------------------- !RNG_ITEM_LOCK_IN = "$7F5090" OnOWTransition: JSL.l FloodGateReset diff --git a/hooks.asm b/hooks.asm index 59c13b9..079d99d 100644 --- a/hooks.asm +++ b/hooks.asm @@ -1008,6 +1008,25 @@ org $05EDDF ; <- 2EDDF - sprite_zelda.asm:398 - (LDA.b #$02 : STA $7EF3C5) JSL.l EndRainState : NOP #2 ;-------------------------------------------------------------------------------- +;================================================================================ +; Generic Keys +;-------------------------------------------------------------------------------- +org $028166 ; <- 10166 - Bank02.asm:396 - (LDA $7EF37C, X) +JSL.l LoadKeys +;-------------------------------------------------------------------------------- +org $029A32 ; <- 11A32 - Bank02.asm:4785 - (LDA $7EF37C, X) +JSL.l LoadKeys +;-------------------------------------------------------------------------------- +org $02A0D1 ; <- 120D1 - Bank02.asm:5841 - (STA $7EF37C, X) +JSL.l SaveKeys +;-------------------------------------------------------------------------------- +org $09F584 ; <- 4F584 - module_death.asm:447 - (STA $7EF37C, X) +JSL.l SaveKeys +;-------------------------------------------------------------------------------- +org $0282EC ; <- 102EC - Bank02.asm:650 - (STA $7EF36F) +JSL.l ClearOWKeys +;-------------------------------------------------------------------------------- + ;================================================================================ ; Pendant / Crystal Fixes ;-------------------------------------------------------------------------------- @@ -1752,6 +1771,9 @@ LinkDamaged_linkNotDamaged: org $0794FB ; <- 394FB - Bank07.asm:3336 (LDA.b #$14 : STA $11) JSL.l OnLinkDamagedFromPit ;-------------------------------------------------------------------------------- +org $01FFE7 ; <- FFE7 - Bank01.asm:16375 (LDA $7EF36D) +JSL.l OnLinkDamagedFromPitOutdoors +;-------------------------------------------------------------------------------- org $078F27 ; <- 38F27 JSL.l FlipperReset ;-------------------------------------------------------------------------------- diff --git a/inventory.asm b/inventory.asm index 84ce870..8b5247f 100644 --- a/inventory.asm +++ b/inventory.asm @@ -735,6 +735,44 @@ UpgradeFlute: RTL ;-------------------------------------------------------------------------------- +;-------------------------------------------------------------------------------- +; LoadKeys: +;-------------------------------------------------------------------------------- +LoadKeys: + LDA.l GenericKeys : BEQ + + LDA $7EF38B + RTL + + + LDA $7EF37C, X +RTL +;-------------------------------------------------------------------------------- + +;-------------------------------------------------------------------------------- +; SaveKeys: +;-------------------------------------------------------------------------------- +SaveKeys: + PHA + LDA.l GenericKeys : BEQ + + PLA : STA $7EF38B + RTL + + + PLA : STA $7EF37C, X +RTL +;-------------------------------------------------------------------------------- + +;-------------------------------------------------------------------------------- +; ClearOWKeys: +;-------------------------------------------------------------------------------- +ClearOWKeys: + PHA + LDA.l GenericKeys : BEQ + + PLA : LDA $7EF38B : STA $7EF36F + RTL + + + PLA : STA $7EF36F, X +RTL +;-------------------------------------------------------------------------------- + ;-------------------------------------------------------------------------------- ; GetWitchLootOAMTableIndex ; in: A - Loot ID diff --git a/tables.asm b/tables.asm index c9f221b..e3d4b37 100644 --- a/tables.asm +++ b/tables.asm @@ -131,7 +131,7 @@ org $30803B ; PC 0x18003B MapMode: db #$00 ; #$00 = Always On (default) - #$01 = Require Map Item CompassMode: -db #$02 ; #$00 = Off (default) - #$01 = Display Dungeon Count w/Compass - #$02 = Display Dungeon Count Always +db #$00 ; #$00 = Off (default) - #$01 = Display Dungeon Count w/Compass - #$02 = Display Dungeon Count Always ;-------------------------------------------------------------------------------- org $30803D ; PC 0x18003D PersistentFloodgate: @@ -720,6 +720,10 @@ org $308171 ; PC 0x180171 GanonPyramidRespawn: db #$01 ; #00 = Do not respawn on Pyramid after Death - #$01 = Respawn on Pyramid after Death (default) ;================================================================================ +org $308172 ; PC 0x180172 +GenericKeys: +db #$00 ; #00 = Dungeon-Specific Keys (Default) - #$01 = Generic Keys +;================================================================================ org $308190 ; PC 0x180190 TimerStyle: db #$00 ; #$00 = Off (Default) - #$01 Countdown - #$02 = Stopwatch @@ -1210,7 +1214,7 @@ db $04 ;AC - Small Key of Turtle Rock ;AD - Small Key of Ganon's Tower ;AE - Reserved -;AF - Reserved +;AF - Generic Small Key ;-------------------------------------------------------------------------------- org $308400 ; PC 0x180400 ;================================================================================