From 7794964f46ac1d3c0a5fdf9f850fc1d088bd826f Mon Sep 17 00:00:00 2001 From: Karkat Date: Tue, 30 May 2017 23:06:27 -0400 Subject: [PATCH] let's dev 5/30/17 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dwarf follower gets Zelda’s graphics when spawning at Sanctuary (KK) Lumberjack tree issue when you defeat Agahnim before rescuing Zelda (then fix Escape Cape logic) Remove the locked doors fix we put in pre Zelda rescue Double check castle warp/gate, Zelda in her cell, old man, castle doors, any other post-Aga stuff (KK/VT) “Make Ganon invulnerable to all swords” flag/switch (to correctly control the Goal) --- entrances.asm | 15 +++++++++++++-- hooks.asm | 6 +++++- tables.asm | 14 +++++++++----- zelda.asm | 17 ++++++++++++----- 4 files changed, 39 insertions(+), 13 deletions(-) diff --git a/entrances.asm b/entrances.asm index cdf9e31..869341d 100644 --- a/entrances.asm +++ b/entrances.asm @@ -3,13 +3,24 @@ ; Returns: 0=Unlocked - 1=Locked ;-------------------------------------------------------------------------------- LockAgahnimDoors: + LDA.l AgahnimDoorStyle + BNE + + ;#$0 = Never Locked + LDA.w #$0000 : RTL + + : CMP.w #$0001 : BNE + + JSR.w OldLockAgahnimDoors : RTL + + + LDA.w #$0000 ; fallback to never locked +RTL +;-------------------------------------------------------------------------------- +OldLockAgahnimDoors: LDA $7EF3C5 : AND.w #$000F : CMP.w #$0002 : !BGE + ; if we rescued zelda, skip LDA $22 : CMP.w #1992 : !BLT + ; door too far left, skip CMP.w #2088 : !BGE + ; door too rat right, skip LDA $20 : CMP.w #1720 : !BGE + ; door too low, skip LDA.w #$0001 -RTL +RTS + LDA.w #$0000 -RTL +RTS ;-------------------------------------------------------------------------------- \ No newline at end of file diff --git a/hooks.asm b/hooks.asm index 3ec176b..ca09f90 100644 --- a/hooks.asm +++ b/hooks.asm @@ -47,7 +47,8 @@ NOP #18 ; Zelda Sprite Fixes ;-------------------------------------------------------------------------------- org $05EBCF ; <- 2EBCF - sprite_zelda.asm : 23 (LDA $7EF359 : CMP.b #$02 : BCS .hasMasterSword) -NOP #8 +JSL.l SpawnZelda : NOP #2 +;NOP #8 ;-------------------------------------------------------------------------------- ;org $06C06F ; <- 3406F - Bank06.asm : 1794 (JSL Sprite_ZeldaLong) ;JSL.l SpawnZelda @@ -825,6 +826,9 @@ JSL.l SetUncleRainState : RTS ;org $0280DD ; <- 100DD - Bank02.asm:298 - (LDA $7EF3C5 : CMP.b #$02 : BCC .indoors) ;JSL.l ForceLinksHouse ;-------------------------------------------------------------------------------- +org $05EDDF ; <- 2EDDF - sprite_zelda.asm:398 - (LDA.b #$02 : STA $7EF3C5) +JSL.l EndRainState : NOP #2 +;-------------------------------------------------------------------------------- ;================================================================================ ; Pendant / Crystal Fixes diff --git a/tables.asm b/tables.asm index e5ba42e..bb96525 100644 --- a/tables.asm +++ b/tables.asm @@ -90,8 +90,8 @@ org $06B55C ; PC 0x3355C ; sprite_smithy_bros.asm : 634 SmithSword: db #$02 ; #$02 = Tempered Sword (default) -org $05EBD4 ; PC 0x2EBD4 - sprite_zelda.asm:23 - (LDA $7EF359 : CMP.b #$02 : BCS .hasMasterSword) - Zelda Spawnpoint Sword Check -db #$05 ; #$02 = Tempered Sword (default) - #$05 = All Swords +;org $05EBD4 ; PC 0x2EBD4 - sprite_zelda.asm:23 - (LDA $7EF359 : CMP.b #$02 : BCS .hasMasterSword) - Zelda Spawnpoint Sword Check +;db #$05 ; #$02 = Tempered Sword (default) - #$05 = All Swords ;-------------------------------------------------------------------------------- org $308030 ; PC 0x180030 EnableSRAMTrace: @@ -603,15 +603,19 @@ StandingKey_Hera: ;================================================================================ org $308165 ; PC 0x180165 GoalItemIcon: -dw #$280D ; #280D = Star (default) - #$280E = Triforce Piece +dw #$280D ; #$280D = Star (default) - #$280E = Triforce Piece ;================================================================================ org $308167 ; PC 0x180167 GoalItemRequirement: -db #$00 ; #00 = Off (default) - #$XX = Require $XX Goal Items +db #$00 ; #$00 = Off (default) - #$XX = Require $XX Goal Items ;================================================================================ org $308168 ; PC 0x180168 ByrnaCaveSpikeDamage: -db #$08 ; #08 = 1 Heart (default) - #$02 = 1/4 Heart +db #$08 ; #$08 = 1 Heart (default) - #$02 = 1/4 Heart +;================================================================================ +org $308169 ; PC 0x180169 +AgahnimDoorStyle: +db #$00 ; #00 = Never Locked - #$01 = Locked During Escape (default) ;================================================================================ org $308190 ; PC 0x180190 TimerStyle: diff --git a/zelda.asm b/zelda.asm index c73dd78..f9dd945 100644 --- a/zelda.asm +++ b/zelda.asm @@ -1,9 +1,16 @@ ;================================================================================ ; Spawn Zelda (or not) ;-------------------------------------------------------------------------------- -;SpawnZelda: -; LDA.l $7EF3CC : CMP #$08 : BEQ .skip -; JSL.l Sprite_ZeldaLong -; .skip -;RTL +SpawnZelda: + LDA.l $7EF3CC : CMP #$08 : BEQ + + CLC : RTL + + + SEC +RTL +;-------------------------------------------------------------------------------- +EndRainState: + LDA $7EF3C5 : CMP.b #$02 : !BGE + ; skip if past escape already + LDA.b #$02 : STA $7EF3C5 ; end rain state + + +RTL ;-------------------------------------------------------------------------------- \ No newline at end of file