Merge branch 'DRMain' into OWMain

This commit is contained in:
codemann8
2021-06-04 21:49:55 -05:00
4 changed files with 46 additions and 25 deletions

View File

@@ -572,6 +572,18 @@ InroomStairsY:
dw $0058, $0148, $0198, $0190 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 ; dungeon tables
; HC HC EP DP AT SP PD MM SW IP TH TT TR GT ; HC HC EP DP AT SP PD MM SW IP TH TT TR GT
org $27f000 org $27f000
@@ -676,3 +688,5 @@ LinksHouseDarkWorld:
dw $ffff dw $ffff
SanctuaryDarkWorld: SanctuaryDarkWorld:
dw $ffff dw $ffff
OldManDarkWorld:
dw $ffff

View File

@@ -3,7 +3,8 @@ CheckDarkWorldSpawn:
LDA.l DRFlags : AND #$0200 : BEQ + ; skip if the flag isn't set LDA.l DRFlags : AND #$0200 : BEQ + ; skip if the flag isn't set
LDA.l $7EF357 : AND #$00FF : BNE + ; moon pearl? LDA.l $7EF357 : AND #$00FF : BNE + ; moon pearl?
LDA.l LinksHouseDarkWorld : CMP $A0 : BEQ ++ 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 ++ SEP #$30 : LDA #$17 : STA $5D
INC $02E0 : LDA.b #$40 : STA !DARK_WORLD : REP #$30 INC $02E0 : LDA.b #$40 : STA !DARK_WORLD : REP #$30
+ RTL + RTL

View File

@@ -173,6 +173,12 @@ JSL RainPrevention : NOP #2
org $1edabf ; <- sprite_energy_ball.asm : 86-7 Sprite_EnergyBall (LDA.b #$10 : LDX.b #$00) org $1edabf ; <- sprite_energy_ball.asm : 86-7 Sprite_EnergyBall (LDA.b #$10 : LDX.b #$00)
JSL StandardAgaDmg 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 ; 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 ; 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 ; Hera BK door back can be seen with Pot clipping - likely useful for no logic seeds

View File

@@ -85,32 +85,24 @@ SuctionOverworldFix:
stz $49 stz $49
+ rtl + rtl
; TT Alcove, Mire bridges, pod falling, SW torch room, TR Pipe room, Bob's Room, Ice Many Pots, Mire Hub !CutoffTable = "$27E000"
; 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!!!
CutoffEntranceRug: CutoffEntranceRug:
pha : phx PHA : PHX
lda.l DRMode : beq .norm LDA.l DRMode : BEQ .norm
lda $04 : cmp #$000A : beq + LDA $04 : cmp #$000A : BEQ + ; only affect A & C objects
cmp #$000C : bne .norm cmp #$000C : BNE .norm
+ lda $a0 : sep #$20 : ldx #$0000 + LDX #$0000 : LDA !CutoffTable, x
- cmp.l CutoffRooms, x : beq .check - CMP.W $A0 : BEQ .check
inx : cpx #$000B : !blt - ; CutoffRoomCount is here! INX #2 : LDA !CutoffTable, x : CMP.w #$FFFF : BNE -
rep #$20 .norm PLX : PLA : LDA $9B52, y : STA $7E2000, x ; what we wrote over
.norm plx : pla : lda $9B52, y : sta $7E2000, x ; what we wrote over RTL
rtl
.check .check
rep #$20 LDA $0c : CMP #$0004 : !BGE .skip
lda $0c : cmp #$0006 : !bge .skip LDA $0e : CMP #$0008 : !BGE .skip
lda $0e : cmp #$0008 : !bge .skip CMP.l #$0004 : !BLT .skip
cmp #$0004 : !blt .skip BRA .norm
bra .norm .skip PLX : PLA : RTL
.skip plx : pla : rtl
StoreTempBunnyState: StoreTempBunnyState:
LDA $5D : CMP #$1C : BNE + LDA $5D : CMP #$1C : BNE +
@@ -132,7 +124,7 @@ RainPrevention:
LDA.l BlockSanctuaryDoorInRain : BEQ .done ;flagged LDA.l BlockSanctuaryDoorInRain : BEQ .done ;flagged
LDA $A0 : CMP #$0012 : BNE + ;we're in the sanctuary LDA $A0 : CMP #$0012 : BNE + ;we're in the sanctuary
LDA.l $7EF3CC : AND #$00FF : CMP #$0001 : BEQ .done ; zelda is following 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 PLA : LDA #$0008 : RTL
+ LDA.l BlockCastleDoorsInRain : AND #$00FF : BEQ .done ;flagged + LDA.l BlockCastleDoorsInRain : AND #$00FF : BEQ .done ;flagged
LDX #$FFFE LDX #$FFFE
@@ -149,3 +141,11 @@ StandardAgaDmg:
LDA.b #$10 ; hurt him! LDA.b #$10 ; hurt him!
+ RTL ; A is zero if the AND results in zero and then Agahnim's invincible! + 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