From 050ce5e20ee46756aa21902892c16a47e4cb3d60 Mon Sep 17 00:00:00 2001 From: aerinon Date: Fri, 4 Jun 2021 17:02:23 -0600 Subject: [PATCH] Changes from DR 0.4.0.6 --- doortables.asm | 14 ++++++++++++++ dr_lobby.asm | 3 ++- drhooks.asm | 6 ++++++ overrides.asm | 48 ++++++++++++++++++++++++------------------------ 4 files changed, 46 insertions(+), 25 deletions(-) diff --git a/doortables.asm b/doortables.asm index dbbdb3c..db1b671 100644 --- a/doortables.asm +++ b/doortables.asm @@ -572,6 +572,18 @@ InroomStairsY: dw $0058, $0148, $0198, $0190 +org $27E000 +CutoffRooms: +; TT Alcove, Mire Bridge Left & Right, Mire Bent Bridge, Mire Hub +; Pod Falling & Harmless, SW Star Pits, TR Lava Escape & TR Dual Pipes, Bob's Room & GT Big Chest +dw $00bc, $00a2, $00a3, $00c2, $001a, $0049, $0014, $008c +; Ice Many Pots, Swamp Waterfall, GT Gauntlet 3, Eastern Push Block, Eastern Courtyard, Eastern Map Valley +; Eastern Cannonball, HC East Hall +dw $009f, $0066, $005d, $00a8, $00a9, $00aa, $00b9, $0052 +; HC West Hall, TR Dash Bridge, TR Hub, Pod Arena, GT Petting Zoo +dw $0050, $00c5, $00c6, $0009, $0003, $002a, $007d +dw $ffff + ; dungeon tables ; HC HC EP DP AT SP PD MM SW IP TH TT TR GT org $27f000 @@ -675,4 +687,6 @@ org $27fff0 LinksHouseDarkWorld: dw $ffff SanctuaryDarkWorld: +dw $ffff +OldManDarkWorld: dw $ffff \ No newline at end of file diff --git a/dr_lobby.asm b/dr_lobby.asm index 1cac9d1..15ee435 100644 --- a/dr_lobby.asm +++ b/dr_lobby.asm @@ -3,7 +3,8 @@ CheckDarkWorldSpawn: LDA.l DRFlags : AND #$0200 : BEQ + ; skip if the flag isn't set LDA.l $7EF357 : AND #$00FF : BNE + ; moon pearl? LDA.l LinksHouseDarkWorld : CMP $A0 : BEQ ++ - LDA.l SanctuaryDarkWorld : CMP $A0 : BNE + + LDA.l SanctuaryDarkWorld : CMP $A0 : BEQ ++ + LDA.l OldManDarkWorld : CMP $A0 : BNE + ++ SEP #$30 : LDA #$17 : STA $5D INC $02E0 : LDA.b #$40 : STA !DARK_WORLD : REP #$30 + RTL diff --git a/drhooks.asm b/drhooks.asm index 6739de3..2824771 100644 --- a/drhooks.asm +++ b/drhooks.asm @@ -173,6 +173,12 @@ JSL RainPrevention : NOP #2 org $1edabf ; <- sprite_energy_ball.asm : 86-7 Sprite_EnergyBall (LDA.b #$10 : LDX.b #$00) JSL StandardAgaDmg + +org $09a681 ; < - similar to talalong.asm : 1157 (JSL Main_ShowTextMessage) +JSL BlindsAtticHint : NOP #2 +org $1cfd69 +Main_ShowTextMessage: + ; These two, if enabled together, have implications for vanilla BK doors in IP/Hera/Mire ; IPBJ is common enough to consider not doing this. Mire is not a concern for vanilla - maybe glitched modes ; Hera BK door back can be seen with Pot clipping - likely useful for no logic seeds diff --git a/overrides.asm b/overrides.asm index 8f78bb5..f984286 100644 --- a/overrides.asm +++ b/overrides.asm @@ -84,32 +84,24 @@ SuctionOverworldFix: stz $49 + rtl -; TT Alcove, Mire bridges, pod falling, SW torch room, TR Pipe room, Bob's Room, Ice Many Pots, Mire Hub -; swamp waterfall, Gauntlet 3, Eastern Push block -CutoffRooms: -db $bc, $a2, $1a, $49, $14, $8c, $9f, $c2 -db $66, $5d, $a8 -; Don't forget CutoffRoomCount!!! +!CutoffTable = "$27E000" CutoffEntranceRug: - pha : phx - lda.l DRMode : beq .norm - lda $04 : cmp #$000A : beq + - cmp #$000C : bne .norm - + lda $a0 : sep #$20 : ldx #$0000 - - cmp.l CutoffRooms, x : beq .check - inx : cpx #$000B : !blt - ; CutoffRoomCount is here! - rep #$20 - .norm plx : pla : lda $9B52, y : sta $7E2000, x ; what we wrote over -rtl + PHA : PHX + LDA.l DRMode : BEQ .norm + LDA $04 : cmp #$000A : BEQ + ; only affect A & C objects + cmp #$000C : BNE .norm + + LDX #$0000 : LDA !CutoffTable, x + - CMP.W $A0 : BEQ .check + INX #2 : LDA !CutoffTable, x : CMP.w #$FFFF : BNE - + .norm PLX : PLA : LDA $9B52, y : STA $7E2000, x ; what we wrote over +RTL .check - rep #$20 - lda $0c : cmp #$0006 : !bge .skip - lda $0e : cmp #$0008 : !bge .skip - cmp #$0004 : !blt .skip - bra .norm -.skip plx : pla : rtl - + LDA $0c : CMP #$0004 : !BGE .skip + LDA $0e : CMP #$0008 : !BGE .skip + CMP.l #$0004 : !BLT .skip + BRA .norm +.skip PLX : PLA : RTL StoreTempBunnyState: LDA $5D : CMP #$1C : BNE + @@ -131,7 +123,7 @@ RainPrevention: LDA.l BlockSanctuaryDoorInRain : BEQ .done ;flagged LDA $A0 : CMP #$0012 : BNE + ;we're in the sanctuary LDA.l $7EF3CC : AND #$00FF : CMP #$0001 : BEQ .done ; zelda is following - LDA $00 : CMP #$02A1 : BNE .done + LDA $00 : AND #$00FF : CMP #$00A1 : BNE .done ; position is a1 PLA : LDA #$0008 : RTL + LDA.l BlockCastleDoorsInRain : AND #$00FF : BEQ .done ;flagged LDX #$FFFE @@ -148,3 +140,11 @@ StandardAgaDmg: LDA.b #$10 ; hurt him! + RTL ; A is zero if the AND results in zero and then Agahnim's invincible! +; note: this skips both maiden dialog triggers if the hole is open +BlindsAtticHint: + REP #$20 + CMP.w #$0122 : BNE + + LDA $7EF0CA : AND.w #$0100 : BEQ + + SEP #$20 : RTL ; skip the dialog box if the hole is already open + + SEP #$20 : JML Main_ShowTextMessage +