Old Man House bunny spawn

Cutoff bounding box implemented
Added a couple more lobby possibilities
This commit is contained in:
aerinon
2021-06-03 13:56:57 -06:00
parent c81865b33f
commit 7442d66211
8 changed files with 72 additions and 32 deletions

View File

@@ -572,6 +572,33 @@ InroomStairsY:
dw $0058, $0148, $0198, $0190
org $27E000
CutoffRooms:
; Room, quad, y max, x max, x min
dw $00bc, $0007, $0009, $0003 ; TT Alcove
dw $00a2, $0007, $000b, $0000 ; Mire Bridge Left & Right
dw $00a3, $0009, $0008, $0004 ; Mire Bent Bridge
dw $00c2, $0007, $0008, $0000 ; Mire Hub
;dw $00c2, $0004, $0008, $0004 ; Mire Hub
dw $001a, $0007, $0008, $0004 ; Pod Falling & Harmless
dw $0049, $0004, $0008, $0004 ; SW Star Pits
dw $0014, $0009, $0008, $0004 ; TR Lava Escape & TR Dual Pipes
dw $008c, $0009, $0008, $0004 ; Bob's Room & GT Big Chest
dw $009f, $0009, $000a, $0002 ; Ice Many Pots
dw $0066, $0009, $0008, $0000 ; Swamp Waterfall
dw $005d, $0007, $000b, $0000 ; GT Gauntlet 3
dw $00a8, $0007, $0008, $0004 ; Eastern Push Block
dw $00a9, $0009, $0009, $0003 ; Eastern Courtyard
dw $00aa, $0009, $0009, $0003 ; Eastern Map Valley
dw $00b9, $0008, $000b, $0000 ; Eastern Cannonball
dw $0052, $0008, $000a, $0003 ; HC East Hall - affects both doors
dw $0050, $0009, $000a, $0002 ; HC West Hall
dw $00c5, $0008, $0008, $0000 ; TR Dash Bridge
dw $00c6, $0007, $0008, $0004 ; TR Hub
dw $ffff
; dungeon tables
; HC HC EP DP AT SP PD MM SW IP TH TT TR GT
org $27f000
@@ -675,4 +702,6 @@ org $27fff0
LinksHouseDarkWorld:
dw $ffff
SanctuaryDarkWorld:
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 $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

View File

@@ -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
TXA : !ADD #$0008 : TAX : 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.l !CutoffTable+2, x : !BGE .skip
LDA $0e : CMP.l !CutoffTable+4, x : !BGE .skip
CMP.l !CutoffTable+6, x : !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
@@ -150,6 +142,7 @@ StandardAgaDmg:
; 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