Bulk of Lobby randomization work
This commit is contained in:
@@ -39,21 +39,22 @@ db $70
|
||||
|
||||
org $279F00
|
||||
DoorOffset:
|
||||
db $00,$01,$02,$00,$03,$00,$04,$00,$00,$00,$00,$00,$00,$05,$00,$00
|
||||
db $00,$01,$02,$00,$03,$00,$04,$00,$00,$00,$00,$00,$9A,$05,$99,$00
|
||||
db $00,$06,$07,$08,$09,$0A,$0B,$00,$00,$0C,$0D,$0E,$00,$0F,$10,$11
|
||||
db $12,$13,$14,$15,$16,$00,$17,$00,$00,$00,$18,$19,$00,$00,$1A,$00
|
||||
db $12,$13,$14,$15,$16,$00,$17,$00,$98,$00,$18,$19,$00,$00,$1A,$00
|
||||
db $1B,$00,$1C,$1D,$1E,$1F,$20,$21,$22,$23,$24,$25,$00,$26,$27,$00
|
||||
db $96,$28,$97,$29,$2A,$2B,$2C,$00,$00,$2D,$2E,$2F,$30,$31,$32,$00
|
||||
db $33,$34,$35,$36,$00,$00,$37,$38,$39,$3A,$3B,$3C,$3D,$3E,$3F,$40
|
||||
db $41,$42,$43,$00,$00,$00,$44,$45,$46,$00,$47,$48,$49,$4A,$4B,$00
|
||||
db $00,$4C,$00,$00,$00,$4D,$4E,$00,$00,$00,$00,$4F,$50,$51,$52,$53
|
||||
db $00,$54,$00,$00,$00,$55,$00,$00,$00,$00,$00,$56,$57,$58,$59,$00
|
||||
db $5A,$5B,$5C,$5D,$00,$5E,$5F,$00,$00,$60,$00,$61,$62,$63,$64,$65
|
||||
db $41,$42,$43,$A0,$00,$00,$44,$45,$46,$00,$47,$48,$49,$4A,$4B,$00
|
||||
; 0 1 2 3 4 5 6 7 8 9 a b c d e f --Offset Ruler
|
||||
db $00,$4C,$00,$00,$00,$4D,$4E,$9E,$00,$00,$00,$4F,$50,$51,$52,$53
|
||||
db $00,$54,$00,$9C,$9D,$55,$00,$00,$00,$00,$00,$56,$57,$58,$59,$00
|
||||
db $5A,$5B,$5C,$5D,$00,$5E,$5F,$00,$9B,$60,$00,$61,$62,$63,$64,$65
|
||||
db $66,$67,$68,$69,$6A,$6B,$00,$00,$6C,$6D,$6E,$6F,$70,$00,$71,$72
|
||||
db $00,$73,$74,$75,$76,$77,$78,$79,$7A,$7B,$7C,$7D,$7E,$00,$7F,$80
|
||||
db $00,$81,$82,$83,$84,$85,$86,$87,$88,$89,$00,$8A,$8B,$00,$8C,$00
|
||||
db $00,$8D,$8E,$00,$00,$8F,$90,$00,$91,$92,$93,$94,$95,$00,$00,$00
|
||||
db $00
|
||||
db $9f
|
||||
|
||||
org $27A000
|
||||
DoorTable:
|
||||
@@ -210,7 +211,16 @@ dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003,
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; TT SE Quad
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Aga 6F
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Sewers Rope
|
||||
; this should end at 27AE40 about (152 * 24 bytes = 3648 or E40)
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Swamp Lobby
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Ice Lobby
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; GT Lobby
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Mire Lobby
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Desert West Lobby
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Desert Main Lobby
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Hera Lobby
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Tower Lobby
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Desert Back Lobby
|
||||
; this should end at 27AF18 about (160 * 24 bytes = 3840 or F18)
|
||||
; some values you can hardcode for spirals
|
||||
;dw $0070, $36a0 ; ->HC Stairwell
|
||||
;dw $0072, $4ff8 ; ->HC Map Room
|
||||
|
||||
@@ -101,9 +101,11 @@ nop : stz $0dd0, X : rts
|
||||
.not_in_ganons_tower
|
||||
|
||||
|
||||
org $208206
|
||||
;org $208206
|
||||
org $20820E
|
||||
jsl MirrorCheckOverride2
|
||||
org $208270
|
||||
;org $208270
|
||||
org $208278
|
||||
jsl MirrorCheckOverride2
|
||||
org $07a955 ; <- Bank07.asm : around 6564 (JP is a bit different) (STZ $05FC : STZ $05FD)
|
||||
jsl BlockEraseFix
|
||||
@@ -123,19 +125,27 @@ nop #3
|
||||
org $028fc9
|
||||
nop #2 : jsl BlindAtticFix
|
||||
|
||||
org $028409
|
||||
jsl SuctionOverworldFix
|
||||
|
||||
; also rando's hooks.asm line 1360
|
||||
; 106e4e -> goes to a0ee4e
|
||||
org $a0ee8a ; <- 6FC4C - headsup_display.asm : 836 (LDA $7EF36E : AND.w #$00FF : ADD.w #$0007 : AND.w #$FFF8 : TAX)
|
||||
;org $a0ee8a ; <- 6FC4C - headsup_display.asm : 836 (LDA $7EF36E : AND.w #$00FF : ADD.w #$0007 : AND.w #$FFF8 : TAX)
|
||||
org $a0ee9a
|
||||
jsl DrHudOverride
|
||||
org $0ded04 ; <- rando's hooks.asm line 2192 - 6ED04 - equipment.asm : 1963 (REP #$30)
|
||||
jsl DrHudDungeonItemsAdditions
|
||||
org $098638 ; rando's hooks.asm line 2192
|
||||
jsl CountChestKeys
|
||||
;org $098638 ; rando's hooks.asm line 2192
|
||||
;jsl CountChestKeys
|
||||
org $06D192 ; rando's hooks.asm line 457
|
||||
jsl CountAbsorbedKeys
|
||||
; rando's hooks.asm line 1020
|
||||
org $05FC7E ; <- 2FC7E - sprite_dash_item.asm : 118 (LDA $7EF36F : INC A : STA $7EF36F)
|
||||
jsl CountBonkItem
|
||||
;org $05FC7E ; <- 2FC7E - sprite_dash_item.asm : 118 (LDA $7EF36F : INC A : STA $7EF36F)
|
||||
;jsl CountBonkItem
|
||||
|
||||
org $019dbd ; <- Bank01.asm : 4465 of Object_Draw8xN (LDA $9B52, Y : STA $7E2000, X)
|
||||
jsl CutoffEntranceRug : bra .nextTile : nop
|
||||
.nextTile
|
||||
|
||||
; 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
|
||||
|
||||
@@ -126,27 +126,27 @@ ConvertToDisplay2:
|
||||
+ !add #$2816 : rts
|
||||
++ lda #$2483 : rts ; 0/O for 0 or placeholder digit
|
||||
|
||||
CountChestKeys:
|
||||
jsl ItemDowngradeFix
|
||||
jsr CountChest
|
||||
rtl
|
||||
;CountChestKeys:
|
||||
; jsl ItemDowngradeFix
|
||||
; jsr CountChest
|
||||
; rtl
|
||||
|
||||
CountChest:
|
||||
lda !MULTIWORLD_ITEM_PLAYER_ID : bne .end
|
||||
cpy #$24 : beq +
|
||||
cpy #$a0 : !blt .end
|
||||
cpy #$ae : !bge .end
|
||||
pha : phx
|
||||
tya : and #$0f : bne ++
|
||||
inc a
|
||||
++ tax : bra .count
|
||||
+ pha : phx
|
||||
lda $040c : lsr : tax
|
||||
.count
|
||||
lda $7ef4b0, x : inc : sta $7ef4b0, x
|
||||
lda $7ef4e0, x : inc : sta $7ef4e0, x
|
||||
.restore plx : pla
|
||||
.end rts
|
||||
;CountChest:
|
||||
; lda !MULTIWORLD_ITEM_PLAYER_ID : bne .end
|
||||
; cpy #$24 : beq +
|
||||
; cpy #$a0 : !blt .end
|
||||
; cpy #$ae : !bge .end
|
||||
; pha : phx
|
||||
; tya : and #$0f : bne ++
|
||||
; inc a
|
||||
; ++ tax : bra .count
|
||||
; + pha : phx
|
||||
; lda $040c : lsr : tax
|
||||
; .count
|
||||
; lda $7ef4b0, x : inc : sta $7ef4b0, x
|
||||
; lda $7ef4e0, x : inc : sta $7ef4e0, x
|
||||
; .restore plx : pla
|
||||
; .end rts
|
||||
|
||||
CountAbsorbedKeys:
|
||||
jsl IncrementSmallKeysNoPrimary : phx
|
||||
@@ -155,19 +155,19 @@ CountAbsorbedKeys:
|
||||
lda $7ef4b0, x : inc : sta $7ef4b0, x
|
||||
+ plx : rtl
|
||||
|
||||
CountBonkItem:
|
||||
jsl GiveBonkItem
|
||||
lda $a0 ; check room ID - only bonk keys in 2 rooms so we're just checking the lower byte
|
||||
cmp #115 : bne + ; Desert Bonk Key
|
||||
lda.l BonkKey_Desert
|
||||
bra ++
|
||||
+ : cmp #140 : bne + ; GTower Bonk Key
|
||||
lda.l BonkKey_GTower
|
||||
bra ++
|
||||
+ lda.b #$24 ; default to small key
|
||||
++ cmp #$24 : bne +
|
||||
phy : tay : jsr CountChest : ply
|
||||
+ rtl
|
||||
;CountBonkItem:
|
||||
; jsl GiveBonkItem
|
||||
; lda $a0 ; check room ID - only bonk keys in 2 rooms so we're just checking the lower byte
|
||||
; cmp #115 : bne + ; Desert Bonk Key
|
||||
; lda.l BonkKey_Desert
|
||||
; bra ++
|
||||
; + : cmp #140 : bne + ; GTower Bonk Key
|
||||
; lda.l BonkKey_GTower
|
||||
; bra ++
|
||||
; + lda.b #$24 ; default to small key
|
||||
; ++ cmp #$24 : bne +
|
||||
; phy : tay : jsr CountChest : ply
|
||||
; + rtl
|
||||
|
||||
;================================================================================
|
||||
; 16-bit A, 8-bit X
|
||||
|
||||
@@ -79,4 +79,27 @@ BlindAtticFix:
|
||||
lda.l DRMode : beq +
|
||||
lda #$01 : rtl
|
||||
+ lda $7EF3CC : cmp.b #$06
|
||||
rtl
|
||||
rtl
|
||||
|
||||
SuctionOverworldFix:
|
||||
stz $50 : stz $5e
|
||||
lda.l DRMode : beq +
|
||||
stz $49
|
||||
+ rtl
|
||||
|
||||
CutoffEntranceRug:
|
||||
pha
|
||||
lda.l DRMode : beq +
|
||||
lda $04 : cmp #$000A : bne +
|
||||
lda $a0 : cmp #$00BC : beq .check ;; TT Alcove
|
||||
cmp #$00A2 : beq .check ; Mire Bridges
|
||||
cmp #$00C2 : bne + ; Mire Hub
|
||||
.check
|
||||
lda $0c : cmp #$0007 : !bge .skip
|
||||
lda $0e : cmp #$0009 : !bge .skip
|
||||
cmp #$0003 : !blt .skip
|
||||
bra +
|
||||
.skip pla : rtl
|
||||
+ pla : lda $9B52, y : sta $7E2000, x ; what we wrote over
|
||||
rtl
|
||||
|
||||
|
||||
Reference in New Issue
Block a user