diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 4003371..4931b50 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, #$18, #$03, #$11 ; year/month/day +db #$20, #$18, #$03, #$12 ; year/month/day ;================================================================================ @@ -124,10 +124,6 @@ incsrc accessability.asm incsrc heartbeep.asm incsrc capacityupgrades.asm incsrc timer.asm -incsrc glitched.asm -incsrc hardmode.asm -incsrc goalitem.asm -incsrc compasses.asm incsrc doorframefixes.asm incsrc music.asm incsrc hashalphabet.asm @@ -155,6 +151,10 @@ org $A1FF00 ; static mapping area incsrc init.asm org $A48000 ; code bank - PUT NEW CODE HERE +incsrc glitched.asm +incsrc hardmode.asm +incsrc goalitem.asm +incsrc compasses.asm incsrc openmode.asm incsrc quickswap.asm incsrc endingsequence.asm diff --git a/events.asm b/events.asm index 6e99e6a..de04596 100644 --- a/events.asm +++ b/events.asm @@ -14,7 +14,6 @@ OnDrawHud: RTL ;-------------------------------------------------------------------------------- ;OnDungeonEntrance: -; ; STA $7EC172 ; thing we wrote over ;RTL ;-------------------------------------------------------------------------------- @@ -60,7 +59,11 @@ OnFileLoad: LDA $7EF38B : STA $7EF36F ; copy generic keys to key counter + - STA $FFFFFF + LDA SilverArrowsUseRestriction : BEQ + ; fix bow type for restricted arrow mode + LDA $7EF340 : CMP.b #$3 : !BLT + + !SUB.b #$02 : STA $7EF340 + + + LDA $7EF3C5 : CMP.b #$01 : BNE .notrain ; check if we're in rain state .rain LDA.l EscapeAssist diff --git a/inventory.asm b/inventory.asm index 5582939..2b556af 100644 --- a/inventory.asm +++ b/inventory.asm @@ -66,20 +66,28 @@ RTL PHX : LDX.b #$00 ; scan ancilla table for arrows -- : CPX.b #$0A : !BGE ++ LDA $0C4A, X : CMP.b #$09 : BNE +++ - PLX : BRA .errorJump ; found an arrow, don't allow the swap + PLX : BRA .errorJump2 ; found an arrow, don't allow the swap +++ INX : BRA -- : ++ PLX + LDA.l SilverArrowsUseRestriction : BEQ ++ + LDA $A0 : ORA $A1 : BEQ ++ ; not in ganon's room in restricted mode + LDA $7EF340 : CMP.b #$03 : !BLT .errorJump : !SUB #$02 : STA $7EF340 + BRA .errorJump2 + ++ LDA $7EF340 : !SUB #$01 : EOR #$02 : !ADD #$01 : STA $7EF340 ; swap bows LDA.b #$20 : STA $012F ; menu select sound BRL .captured + + BRA + + .errorJump + BRA .errorJump2 + CMP #$05 : BNE + ; powder LDA !INVENTORY_SWAP : AND #$30 : CMP #$30 : BNE .errorJump ; make sure we have mushroom & magic powder LDA $7EF344 : EOR #$03 : STA $7EF344 ; swap mushroom & magic powder LDA.b #$20 : STA $012F ; menu select sound BRL .captured - ;+ BRA + - .errorJump + + BRA + + .errorJump2 BRA .error + CMP #$0D : BNE + ; flute LDA $037A : CMP #$01 : BEQ .midShovel ; inside a shovel animation, force the shovel & make error sound diff --git a/newitems.asm b/newitems.asm index 77b77a8..963744b 100755 --- a/newitems.asm +++ b/newitems.asm @@ -231,9 +231,12 @@ AddReceivedItemExpandedGetItem: %ProgrammableItemLogic(3) BRL .done + CMP.b #$58 : BNE + ; Upgrade-Only Sivler Arrows - LDA $7EF340 : BEQ ++ : CMP.b #$03 : !BGE ++ - !ADD.b #$02 : STA $7EF340 ; switch to silver bow - ++ + LDA.l SilverArrowsUseRestriction : BNE +++ + LDA.l SilverArrowsAutoEquip : AND.b #$01 : BEQ +++ + LDA $7EF340 : BEQ ++ : CMP.b #$03 : !BGE ++ + !ADD.b #$02 : STA $7EF340 ; switch to silver bow + ++ + +++ LDA.l ArrowMode : BEQ ++ LDA.b #$01 : STA $7EF376 ++ diff --git a/stats.asm b/stats.asm index 3dd8784..874a4c2 100644 --- a/stats.asm +++ b/stats.asm @@ -184,6 +184,13 @@ DungeonHoleWarpTransition: BRA StatTransitionCounter DungeonHoleEntranceTransition: JSL EnableForceBlank + + LDA.l SilverArrowsAutoEquip : AND.b #$02 : BEQ + + LDA $7EF340 : BEQ + + CMP.b #$03 : !BGE + + !ADD #$02 : STA $7EF340 + + + BRA StatTransitionCounter DungeonStairsTransition: JSL Dungeon_SaveRoomQuadrantData diff --git a/tables.asm b/tables.asm index b474b0c..c16466e 100644 --- a/tables.asm +++ b/tables.asm @@ -797,6 +797,14 @@ org $308180 ; PC 0x180180 StunItemAction: db #$03 ; #$03 = Hookshot and Boomerang (Default) ;================================================================================ +org $308181 ; PC 0x180181 +SilverArrowsUseRestriction: +db #$00 ; #$00 = Off (Default) - #$01 = Only At Ganon +;================================================================================ +org $308182 ; PC 0x180182 +SilverArrowsAutoEquip: +db #$01 ; #$00 = Off - #$01 = Collection Time (Default) - #$02 = Entering Ganon - #$03 = Collection Time & Entering Ganon +;================================================================================ org $308190 ; PC 0x180190 TimerStyle: db #$00 ; #$00 = Off (Default) - #$01 Countdown - #$02 = Stopwatch