Merge branch 'DRUnstable' into OWMain
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
incsrc drhooks.asm
|
||||
|
||||
;Main Code
|
||||
org $278000 ;138000
|
||||
org $A78000 ;138000
|
||||
db $44, $52 ;DR
|
||||
DRMode:
|
||||
dw 0
|
||||
@@ -52,7 +52,7 @@ incsrc edges.asm
|
||||
incsrc math.asm
|
||||
incsrc hudadditions.asm
|
||||
incsrc dr_lobby.asm
|
||||
warnpc $279C00
|
||||
warnpc $A79C00
|
||||
|
||||
incsrc doortables.asm
|
||||
warnpc $288000
|
||||
warnpc $A88000
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
org $279C00
|
||||
org $A79C00
|
||||
KeyDoorOffset:
|
||||
; 0 1 2 3 4 5 6 7 8 9 a b c d e f --Offset Ruler
|
||||
dw $0000,$0001,$0003,$0000,$0006,$0000,$000b,$0000,$0000,$0000,$000c,$000d,$0010,$0011,$0012,$0000
|
||||
@@ -18,7 +18,7 @@ dw $01f1,$01f3,$01f7,$0000,$0000,$01f8,$01fa,$0000,$01fd,$0200,$0203,$0204,$0206
|
||||
dw $0207
|
||||
|
||||
|
||||
org $279E00
|
||||
org $A79E00
|
||||
SpiralOffset:
|
||||
; 0 1 2 3 4 5 6 7 8 9 a b c d e f --Offset Ruler
|
||||
db $00,$01,$02,$00,$03,$00,$00,$04,$00,$05,$07,$00,$08,$00,$0b,$00
|
||||
@@ -37,7 +37,7 @@ db $67,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
|
||||
db $6a,$6d,$6e,$00,$00,$00,$00,$00,$00,$00,$6f,$00,$00,$00,$00,$00
|
||||
db $70
|
||||
|
||||
org $279F00
|
||||
org $A79F00
|
||||
DoorOffset:
|
||||
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
|
||||
@@ -56,7 +56,7 @@ 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 $9f
|
||||
|
||||
org $27A000
|
||||
org $A7A000
|
||||
DoorTable:
|
||||
;; NW 00 N 01 NE 02 WN 00 W 01 WS 02 SW 00 S 01 SE 02 EN 00 E 01 ES 02 - Door ruler
|
||||
dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003 ; Default/Garbage row
|
||||
@@ -226,7 +226,7 @@ dw $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003, $0003,
|
||||
;dw $0072, $4ff8 ; ->HC Map Room
|
||||
;dw $0080, $1f50 ; ->zelda's cellblock
|
||||
|
||||
org $27B000
|
||||
org $A7B000
|
||||
SpiralTable: ;113 4 byte entries - should end at 27B1C4
|
||||
dw $0203, $8080 ;null row
|
||||
dw $0203, $8080 ;HC Backhallway
|
||||
@@ -309,7 +309,7 @@ dw $0203, $8080 ;East Attic Start
|
||||
dw $0203, $8080 ;Tower Entrance
|
||||
|
||||
|
||||
org $27C000 ;ends around 27C418
|
||||
org $A7C000 ;ends around 27C418
|
||||
PairedDoorTable:
|
||||
dw $0000 ; the bad template
|
||||
dw $0000,$0000
|
||||
@@ -503,7 +503,7 @@ dw $0000,$0000,$0000,$0000
|
||||
dw $ffff ; indicates the end - we can drop this
|
||||
|
||||
; Edge Transition Table (Target Room, Flags, MultiDiv ratio for edges)
|
||||
org $27C500 ;ends around 27C5F(9) 4 bytes would be 27C649
|
||||
org $A7C500 ;ends around 27C5F(9) 4 bytes would be 27C649
|
||||
;I kind of want to split the 3rd byte into two
|
||||
NorthOpenEdge:
|
||||
db $00,$80,$11, $00,$80,$11, $00,$80,$11, $00,$80,$11
|
||||
@@ -559,11 +559,11 @@ db $01, $02, $03, $04, $05, $06, $0a, $14
|
||||
|
||||
; In-room stairs in North/South pairs. From left to right:
|
||||
; PoD, IP right side, IP Freezor chest and GT
|
||||
org $27C700
|
||||
org $A7C700
|
||||
InroomStairsTable:
|
||||
dw $0003,$0003, $0003,$0003, $0003,$0003, $0003,$0003
|
||||
|
||||
org $27C720
|
||||
org $A7C720
|
||||
InroomStairsRoom:
|
||||
db $0B,$1B, $3F,$1F, $7E,$5E, $96,$3D
|
||||
InroomStairsX:
|
||||
@@ -572,7 +572,7 @@ InroomStairsY:
|
||||
dw $0058, $0148, $0198, $0190
|
||||
|
||||
|
||||
org $27E000
|
||||
org $A7E000
|
||||
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
|
||||
@@ -588,7 +588,7 @@ dw $ffff
|
||||
|
||||
; dungeon tables
|
||||
; HC HC EP DP AT SP PD MM SW IP TH TT TR GT
|
||||
org $27f000
|
||||
org $A7f000
|
||||
CompassBossIndicator:
|
||||
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
|
||||
TotalKeys: ;27f020
|
||||
@@ -603,13 +603,13 @@ TotalLocationsLow: ;27f080
|
||||
db $08, $08, $06, $06, $02, $00, $04, $08, $08, $08, $06, $08, $02, $07, $00, $00
|
||||
TotalLocationsHigh: ;27f090
|
||||
db $00, $00, $00, $00, $00, $01, $01, $00, $00, $00, $00, $00, $01, $02, $00, $00
|
||||
org $27f0a0
|
||||
org $A7f0a0
|
||||
TotalLocations:
|
||||
db $08, $08, $06, $06, $02, $0a, $0e, $08, $08, $08, $06, $08, $0c, $1b, $00, $00
|
||||
; no more room here
|
||||
|
||||
; Vert 0,6,0 Horz 2,0,8
|
||||
org $27f0b0
|
||||
org $A7f0b0
|
||||
CoordIndex: ; Horizontal 1st
|
||||
db 2, 0 ; Coordinate Index $20-$23
|
||||
OppCoordIndex:
|
||||
@@ -631,16 +631,16 @@ dw $00ff, $010b ; Right/Bot camera bounds when not frozen + appropriate low byte
|
||||
dw $017f, $0187 ; Right/Bot camera bound when at edge or layout frozen
|
||||
;27f0ce next free byte
|
||||
|
||||
org $27f0f0
|
||||
org $A7f0f0
|
||||
RemoveRainDoorsRoom:
|
||||
dw $0060, $0062, $ffff ; ffff indicates end of list
|
||||
RainDoorMatch: ; org $27f0f6 and f8 for now
|
||||
RainDoorMatch: ; org $A7f0f6 and f8 for now
|
||||
dw $0081, $0061 ; not xba'd
|
||||
BlockSanctuaryDoorInRain: ;27f0fa
|
||||
dw $0000
|
||||
|
||||
|
||||
org $27f100
|
||||
org $A7f100
|
||||
TilesetTable:
|
||||
; 0 1 2 3 4 5 6 7 8 9 a b c d e f --Offset Ruler
|
||||
db $13,$04,$04,$06,$0d,$ff,$08,$05,$06,$07,$07,$07,$0e,$0e,$0b,$ff
|
||||
@@ -680,14 +680,14 @@ db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$14,$20
|
||||
db $00,$07,$20,$20,$07,$07,$07,$07,$07,$20,$20,$07,$20,$20,$20,$20
|
||||
db $07,$07,$02,$02,$02,$02,$07,$07,$07,$20,$20,$07,$20,$20,$20,$07
|
||||
|
||||
;27f300
|
||||
;A7f300
|
||||
DungeonTilesets:
|
||||
db $04,$04,$05,$12,$04,$08,$07,$0C,$09,$0B,$05,$0A,$0D,$0E,$06,$06
|
||||
|
||||
;
|
||||
;org $27ff00
|
||||
;org $A7ff00
|
||||
|
||||
org $27fff0
|
||||
org $A7fff0
|
||||
LinksHouseDarkWorld:
|
||||
dw $ffff
|
||||
SanctuaryDarkWorld:
|
||||
|
||||
@@ -1,68 +1,68 @@
|
||||
org $02b5c4 ; -- moving right routine 135c4
|
||||
org $82b5c4 ; -- moving right routine 135c4
|
||||
jsl WarpRight
|
||||
org $02b665 ; -- moving left routine
|
||||
org $82b665 ; -- moving left routine
|
||||
jsl WarpLeft
|
||||
org $02b713 ; -- moving down routine
|
||||
org $82b713 ; -- moving down routine
|
||||
jsl WarpDown
|
||||
org $02b7b4 ; -- moving up routine
|
||||
org $82b7b4 ; -- moving up routine
|
||||
jsl WarpUp
|
||||
org $02bd80
|
||||
org $82bd80
|
||||
jsl AdjustTransition
|
||||
nop
|
||||
|
||||
;turn off linking doors -- see .notRoomLinkDoor label in Bank02.asm
|
||||
org $02b5a8 ; <- 135a8 - Bank02.asm : 8368 (LDA $7EC004 : STA $A0)
|
||||
org $82b5a8 ; <- 135a8 - Bank02.asm : 8368 (LDA $7EC004 : STA $A0)
|
||||
jsl CheckLinkDoorR
|
||||
bcc NotLinkDoor1
|
||||
org $02b5b6
|
||||
org $82b5b6
|
||||
NotLinkDoor1:
|
||||
org $02b649 ; <- 135a8 - Bank02.asm : 8482 (LDA $7EC004 : STA $A0)
|
||||
org $82b649 ; <- 135a8 - Bank02.asm : 8482 (LDA $7EC004 : STA $A0)
|
||||
jsl CheckLinkDoorL
|
||||
bcc NotLinkDoor2
|
||||
org $02b657
|
||||
org $82b657
|
||||
NotLinkDoor2:
|
||||
|
||||
|
||||
; Staircase routine
|
||||
org $01c3d4 ; <- c3d4 - Bank01.asm : 9762-4 (Dungeon_DetectStaircase-> STA $A0 : LDA $063D, X)
|
||||
org $81c3d4 ; <- c3d4 - Bank01.asm : 9762-4 (Dungeon_DetectStaircase-> STA $A0 : LDA $063D, X)
|
||||
jsl RecordStairType : nop
|
||||
org $02a1e7 ;(PC: 121e7)
|
||||
org $82a1e7 ;(PC: 121e7)
|
||||
jsl SpiralWarp
|
||||
|
||||
org $0291b3 ; <- Bank02.asm : 3303 (LDA $0462 : AND.b #$04)
|
||||
org $8291b3 ; <- Bank02.asm : 3303 (LDA $0462 : AND.b #$04)
|
||||
jsl SpiralPriorityHack : nop
|
||||
org $0290f9 ; <- Bank02.asm : 3188 (LDA $0462 : AND.b #$04)
|
||||
org $8290f9 ; <- Bank02.asm : 3188 (LDA $0462 : AND.b #$04)
|
||||
jsl SpiralPriorityHack : nop
|
||||
|
||||
org $029369 ; <- 11369 - Bank02.asm : 3610 (STX $0464 : STY $012E)
|
||||
org $829369 ; <- 11369 - Bank02.asm : 3610 (STX $0464 : STY $012E)
|
||||
jsl StraightStairsAdj : nop #2
|
||||
org $029383 ; <- 11384 - Bank02.asm : 3629 (.walkingDownStaircase-> ADD $20 : STA $20)
|
||||
org $829383 ; <- 11384 - Bank02.asm : 3629 (.walkingDownStaircase-> ADD $20 : STA $20)
|
||||
jsl StraightStairsFix : nop
|
||||
org $0293aa ; <- 113aa - Bank02.asm : 3653 (ADD $20 : STA $20)
|
||||
org $8293aa ; <- 113aa - Bank02.asm : 3653 (ADD $20 : STA $20)
|
||||
jsl StraightStairsFix : nop
|
||||
org $0293d1 ; <- 113d1 - Bank02.asm : 3683 (ADD $20 : STA $20 BRANCH_IOTA)
|
||||
org $8293d1 ; <- 113d1 - Bank02.asm : 3683 (ADD $20 : STA $20 BRANCH_IOTA)
|
||||
jsl StraightStairsFix : nop
|
||||
org $029396 ; <- 11396 - Bank02.asm : 3641 (LDA $01C322, X)
|
||||
org $829396 ; <- 11396 - Bank02.asm : 3641 (LDA $01C322, X)
|
||||
jsl StraightStairLayerFix
|
||||
org $02c06d ; <- Bank02.asm : 9874 (LDX $0418, CMP.b #$02)
|
||||
org $82c06d ; <- Bank02.asm : 9874 (LDX $0418, CMP.b #$02)
|
||||
jsl DoorToStraight : nop
|
||||
org $02c092 ; STA $0020, Y : LDX #$00
|
||||
org $82c092 ; STA $0020, Y : LDX #$00
|
||||
jsl DoorToInroom : nop
|
||||
org $02c0f8 ; CMP $02C034, X
|
||||
org $82c0f8 ; CMP $02C034, X
|
||||
jsl DoorToInroomEnd
|
||||
org $02941a ; <- Bank02.asm : 3748 module 7.12.11 (LDA $0464 : BNE BRANCH_$11513 : INC $B0 : RTS)
|
||||
org $82941a ; <- Bank02.asm : 3748 module 7.12.11 (LDA $0464 : BNE BRANCH_$11513 : INC $B0 : RTS)
|
||||
jsl StraightStairsTrapDoor : rts
|
||||
org $028b54 ; <- Bank02.asm : 2200 (JSL UseImplicitRegIndexedLocalJumpTable)
|
||||
org $828b54 ; <- Bank02.asm : 2200 (JSL UseImplicitRegIndexedLocalJumpTable)
|
||||
jsl InroomStairsTrapDoor
|
||||
|
||||
org $0289a0 ; JSL $0091C4
|
||||
org $8289a0 ; JSL $0091C4
|
||||
jsl QuadrantLoadOrderBeforeScroll
|
||||
org $02bd9c ; JSL $0091C4
|
||||
org $82bd9c ; JSL $0091C4
|
||||
jsl QuadrantLoadOrderAfterScroll
|
||||
|
||||
|
||||
; Graphics fix
|
||||
org $02895d ; Bank 02 line 1812 (JSL Dungeon_LoadRoom : JSL Dungeon_InitStarTileChr : JSL $00D6F9 : INC $B0)
|
||||
org $82895d ; Bank 02 line 1812 (JSL Dungeon_LoadRoom : JSL Dungeon_InitStarTileChr : JSL $00D6F9 : INC $B0)
|
||||
Splicer:
|
||||
jsl GfxFixer
|
||||
lda $b1 : beq .done
|
||||
@@ -70,145 +70,145 @@ rts
|
||||
nop #5
|
||||
.done
|
||||
|
||||
org $01b618 ; Bank01.asm : 7963 Dungeon_LoadHeader (REP #$20 : INY : LDA [$0D], Y)
|
||||
org $81b618 ; Bank01.asm : 7963 Dungeon_LoadHeader (REP #$20 : INY : LDA [$0D], Y)
|
||||
nop : jsl OverridePaletteHeader
|
||||
|
||||
org $02817e ; Bank02.asm : 414 (LDA $02811E, X)
|
||||
org $82817e ; Bank02.asm : 414 (LDA $02811E, X)
|
||||
jsl FixAnimatedTiles
|
||||
|
||||
org $0aef43 ; UnderworldMap_RecoverGFX
|
||||
org $8aef43 ; UnderworldMap_RecoverGFX
|
||||
jsl FixCloseDungeonMap
|
||||
|
||||
org $028a06 ; Bank02.asm : 1941 Dungeon_ResetTorchBackgroundAndPlayer
|
||||
org $828a06 ; Bank02.asm : 1941 Dungeon_ResetTorchBackgroundAndPlayer
|
||||
JSL FixWallmasterLamp
|
||||
|
||||
org $00d377 ;Bank 00 line 3185
|
||||
org $80d377 ;Bank 00 line 3185
|
||||
DecompDungAnimatedTiles:
|
||||
org $00fda4 ;Bank 00 line 8882
|
||||
org $80fda4 ;Bank 00 line 8882
|
||||
Dungeon_InitStarTileCh:
|
||||
org $00d6ae ;(PC: 56ae)
|
||||
org $80d6ae ;(PC: 56ae)
|
||||
LoadTransAuxGfx:
|
||||
org $00d739 ;
|
||||
org $80d739 ;
|
||||
LoadTransAuxGfx_Alt:
|
||||
org $00df5a ;(PC: 5f5a)
|
||||
org $80df5a ;(PC: 5f5a)
|
||||
PrepTransAuxGfx:
|
||||
org $0ffd65 ;(PC: 07fd65)
|
||||
org $8ffd65 ;(PC: 07fd65)
|
||||
Dungeon_LoadCustomTileAttr:
|
||||
org $01feb0
|
||||
org $81feb0
|
||||
Dungeon_ApproachFixedColor:
|
||||
;org $01fec1
|
||||
;Dungeon_ApproachFixedColor_variable:
|
||||
;org $a0f972 ; Rando version
|
||||
;LoadRoomHook:
|
||||
org $1bee74 ;(PC: 0dee74)
|
||||
org $9bee74 ;(PC: 0dee74)
|
||||
Palette_DungBgMain:
|
||||
org $1bec77
|
||||
org $9bec77
|
||||
Palette_SpriteAux3:
|
||||
org $1becc5
|
||||
org $9becc5
|
||||
Palette_SpriteAux2:
|
||||
org $1bece4
|
||||
org $9bece4
|
||||
Palette_SpriteAux1:
|
||||
|
||||
|
||||
org $0DFA53
|
||||
jsl.l LampCheckOverride
|
||||
org $028046 ; <- 10046 - Bank02.asm : 217 (JSL EnableForceBlank) (Start of Module_LoadFile)
|
||||
jsl.l OnFileLoadOverride
|
||||
org $07A93F ; < 3A93F - Bank07.asm 6548 (LDA $8A : AND.b #$40 - Mirror checks)
|
||||
jsl.l MirrorCheckOverride
|
||||
org $8DFA53
|
||||
jsl LampCheckOverride
|
||||
org $828046 ; <- 10046 - Bank02.asm : 217 (JSL EnableForceBlank) (Start of Module_LoadFile)
|
||||
jsl OnFileLoadOverride
|
||||
org $87A93F ; < 3A93F - Bank07.asm 6548 (LDA $8A : AND.b #$40 - Mirror checks)
|
||||
jsl MirrorCheckOverride
|
||||
|
||||
org $05ef47
|
||||
org $85ef47
|
||||
Sprite_HeartContainer_Override: ;sprite_heart_upgrades.asm : 96-100 (LDA $040C : CMP.b #$1A : BNE .not_in_ganons_tower)
|
||||
jsl GtBossHeartCheckOverride : bcs .not_in_ganons_tower
|
||||
nop : stz $0dd0, X : rts
|
||||
.not_in_ganons_tower
|
||||
|
||||
|
||||
org $07a955 ; <- Bank07.asm : around 6564 (JP is a bit different) (STZ $05FC : STZ $05FD)
|
||||
org $87a955 ; <- Bank07.asm : around 6564 (JP is a bit different) (STZ $05FC : STZ $05FD)
|
||||
jsl BlockEraseFix
|
||||
nop #2
|
||||
|
||||
org $02A0A8
|
||||
org $82A0A8
|
||||
Mirror_SaveRoomData:
|
||||
org $07A95B ; < bank_07.asm ; #_07A95B: JSL Mirror_SaveRoomData
|
||||
org $87A95B ; < bank_07.asm ; #_07A95B: JSL Mirror_SaveRoomData
|
||||
jsl EGFixOnMirror
|
||||
|
||||
org $02b82a
|
||||
org $82b82a
|
||||
jsl FixShopCode
|
||||
|
||||
org $1ddeea ; <- Bank1D.asm : 286 (JSL Sprite_LoadProperties)
|
||||
org $9ddeea ; <- Bank1D.asm : 286 (JSL Sprite_LoadProperties)
|
||||
jsl VitreousKeyReset
|
||||
|
||||
org $1ed024 ; f5024 sprite_guruguru_bar.asm : 27 (LDA $040C : CMP.b #$12 : INY #2
|
||||
org $9ed024 ; f5024 sprite_guruguru_bar.asm : 27 (LDA $040C : CMP.b #$12 : INY #2
|
||||
jsl GuruguruFix : bra .next
|
||||
nop #3
|
||||
.next
|
||||
|
||||
org $028fc9
|
||||
org $828fc9
|
||||
nop #2 : jsl BlindAtticFix
|
||||
|
||||
org $028409
|
||||
org $828409
|
||||
jsl SuctionOverworldFix
|
||||
|
||||
org $0ded04 ; <- rando's hooks.asm line 2192 - 6ED04 - equipment.asm : 1963 (REP #$30)
|
||||
org $8ded04 ; <- 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 $06D192 ; rando's hooks.asm line 457
|
||||
org $86D192 ; 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 $019dbd ; <- Bank01.asm : 4465 of Object_Draw8xN (LDA $9B52, Y : STA $7E2000, X)
|
||||
org $819dbd ; <- Bank01.asm : 4465 of Object_Draw8xN (LDA $9B52, Y : STA $7E2000, X)
|
||||
jsl CutoffEntranceRug : bra .nextTile : nop
|
||||
.nextTile
|
||||
|
||||
;maybe set 02e2 to 0
|
||||
|
||||
org $0799de ; <- Bank07.asm : 4088 (LDA.b #$15 : STA $5D)
|
||||
org $8799de ; <- Bank07.asm : 4088 (LDA.b #$15 : STA $5D)
|
||||
JSL StoreTempBunnyState
|
||||
;
|
||||
org $08c450 ; <- ancilla_receive_item.asm : 146-148 (STY $5D : STZ $02D8)
|
||||
org $88c450 ; <- ancilla_receive_item.asm : 146-148 (STY $5D : STZ $02D8)
|
||||
JSL RetrieveBunnyState : NOP
|
||||
|
||||
org $02d9ce ; <- Bank02.asm : Dungeon_LoadEntrance 10829 (STA $A0 : STA $048E)
|
||||
org $82d9ce ; <- Bank02.asm : Dungeon_LoadEntrance 10829 (STA $A0 : STA $048E)
|
||||
JSL CheckDarkWorldSpawn : NOP
|
||||
|
||||
org $01891e ; <- Bank 01.asm : 991 Dungeon_LoadType2Object (LDA $00 : XBA : AND.w #$00FF)
|
||||
org $81891e ; <- Bank 01.asm : 991 Dungeon_LoadType2Object (LDA $00 : XBA : AND.w #$00FF)
|
||||
JSL RainPrevention : BCC + : RTS : NOP : +
|
||||
|
||||
org $1edabf ; <- sprite_energy_ball.asm : 86-7 Sprite_EnergyBall (LDA.b #$10 : LDX.b #$00)
|
||||
org $9edabf ; <- 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)
|
||||
org $89a681 ; < - similar to talalong.asm : 1157 (JSL Main_ShowTextMessage)
|
||||
JSL BlindsAtticHint : NOP #2
|
||||
org $1cfd69
|
||||
org $9cfd69
|
||||
Main_ShowTextMessage:
|
||||
|
||||
; Conditionally disable UW music changes in Door Rando
|
||||
org $028ADB ; <- Bank02.asm:2088-2095 (LDX.b #$14 : LDA $A0 ...)
|
||||
org $828ADB ; <- Bank02.asm:2088-2095 (LDX.b #$14 : LDA $A0 ...)
|
||||
JSL.l Underworld_DoorDown_Entry : CPX #$FF
|
||||
BEQ + : db $80, $1C ; BRA $028B04
|
||||
NOP #6 : +
|
||||
|
||||
org $02C3F2 ; <- Bank02.asm:10521 Unused call
|
||||
org $82C3F2 ; <- Bank02.asm:10521 Unused call
|
||||
Underworld_DoorDown_Call:
|
||||
org $02C3F3
|
||||
org $82C3F3
|
||||
dw $8AD9 ; address of Bank02.asm:2085
|
||||
|
||||
org $01AA90
|
||||
org $81AA90
|
||||
JSL BigKeyDoorCheck : NOP
|
||||
|
||||
org $01AAA2
|
||||
org $81AAA2
|
||||
RoomDraw_OneSidedShutters_South_onesided_shutter_or_big_key_door:
|
||||
|
||||
;Enable south facing bk graphic
|
||||
org $00CE24
|
||||
org $80CE24
|
||||
dw $2ac8
|
||||
|
||||
org $01b714 ; PC: b714
|
||||
org $81b714 ; PC: b714
|
||||
OpenableDoors:
|
||||
jsl CheckIfDoorsOpen
|
||||
bcs .normal
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
; Blind Boss fight
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
org $1DA081 ; Original Code
|
||||
org $9DA081 ; Original Code
|
||||
JML check_blind_boss_room
|
||||
Check_for_Blind_Fight:
|
||||
|
||||
|
||||
|
||||
org $1DA090
|
||||
org $9DA090
|
||||
Initialize_Blind_Fight:
|
||||
@@ -1,87 +1,87 @@
|
||||
; hooks
|
||||
org $01E6B0
|
||||
org $81E6B0
|
||||
JSL RevealPotItem
|
||||
RTS
|
||||
|
||||
org $029C25
|
||||
org $829C25
|
||||
JSL SetTheSceneFix
|
||||
|
||||
org $09C2BB
|
||||
org $89C2BB
|
||||
JSL ClearSpriteData
|
||||
|
||||
org $09C327
|
||||
org $89C327
|
||||
JSL LoadSpriteData
|
||||
|
||||
org $06F976
|
||||
org $86F976
|
||||
JSL RevealSpriteDrop : NOP
|
||||
|
||||
org $06E3C4
|
||||
org $86E3C4
|
||||
JSL RevealSpriteDrop2 : NOP
|
||||
|
||||
org $06926e ; <- 3126e - sprite_prep.asm : 2664 (LDA $0B9B : STA $0CBA, X)
|
||||
org $86926e ; <- 3126e - sprite_prep.asm : 2664 (LDA $0B9B : STA $0CBA, X)
|
||||
JSL SpriteKeyPrep : NOP #2
|
||||
|
||||
org $06d049 ; <- 35049 sprite_absorbable : 31-32 (JSL Sprite_DrawRippleIfInWater : JSR Sprite_DrawAbsorbable)
|
||||
org $86d049 ; <- 35049 sprite_absorbable : 31-32 (JSL Sprite_DrawRippleIfInWater : JSR Sprite_DrawAbsorbable)
|
||||
JSL SpriteKeyDrawGFX : BRA + : NOP : +
|
||||
|
||||
org $06d03d
|
||||
org $86d03d
|
||||
JSL ShouldSpawnItem : NOP #2
|
||||
|
||||
org $06D19F
|
||||
org $86D19F
|
||||
JSL MarkSRAMForItem : NOP #2
|
||||
|
||||
org $06d180
|
||||
org $86d180
|
||||
JSL BigKeyGet : BCS $07 : NOP #5
|
||||
|
||||
org $06d18d ; <- 3518D - sprite_absorbable.asm : 274 (LDA $7EF36F : INC A : STA $7EF36F)
|
||||
org $86d18d ; <- 3518D - sprite_absorbable.asm : 274 (LDA $7EF36F : INC A : STA $7EF36F)
|
||||
JSL KeyGet
|
||||
|
||||
org $06f9f3 ; bank06.asm : 6732 (JSL Sprite_LoadProperties)
|
||||
org $86f9f3 ; bank06.asm : 6732 (JSL Sprite_LoadProperties)
|
||||
JSL LoadProperties_PreserveCertainProps
|
||||
|
||||
org $008BAA ; NMI hook
|
||||
org $808BAA ; NMI hook
|
||||
JSL TransferPotGFX
|
||||
|
||||
org $06828A
|
||||
org $86828A
|
||||
JSL CheckSprite_Spawn
|
||||
|
||||
org $07B169
|
||||
org $87B169
|
||||
JSL PreventPotSpawn : NOP
|
||||
|
||||
org $07B17D
|
||||
org $87B17D
|
||||
JSL PreventPotSpawn2
|
||||
|
||||
org $068275
|
||||
org $868275
|
||||
JSL SubstitionFlow
|
||||
|
||||
org $00A9DC
|
||||
org $80A9DC
|
||||
dw $1928, $1938, $5928, $5938 ; change weird ugly black diagonal pot to blue-ish pot
|
||||
|
||||
org $018650
|
||||
org $818650
|
||||
dw $B395 ; change tile type to normal pot
|
||||
|
||||
org $01B3D5
|
||||
org $81B3D5
|
||||
JSL CheckIfPotIsSpecial
|
||||
|
||||
|
||||
; refs to other functions
|
||||
org $0681F4
|
||||
org $8681F4
|
||||
Sprite_SpawnSecret_pool_ID:
|
||||
org $068283
|
||||
org $868283
|
||||
Sprite_SpawnSecret_NotRandomBush:
|
||||
org $06828A
|
||||
org $86828A
|
||||
Sprite_SpawnSecret_SpriteSpawnDynamically:
|
||||
org $06d23a
|
||||
org $86d23a
|
||||
Sprite_DrawAbsorbable:
|
||||
org $1eff81
|
||||
org $9eff81
|
||||
Sprite_DrawRippleIfInWater:
|
||||
org $0db818
|
||||
org $8db818
|
||||
Sprite_LoadProperties:
|
||||
org $06D038
|
||||
org $86D038
|
||||
KeyRoomFlagMasks:
|
||||
org $00FDEE
|
||||
org $80FDEE
|
||||
InitializeMirrorHDMA:
|
||||
org $00E3C4
|
||||
org $80E3C4
|
||||
LoadCommonSprites_long:
|
||||
|
||||
; defines
|
||||
|
||||
@@ -1,181 +0,0 @@
|
||||
org $06926e ; <- 3126e - sprite_prep.asm : 2664 (LDA $0B9B : STA $0CBA, X)
|
||||
jsl SpriteKeyPrep : nop #2
|
||||
|
||||
org $06d049 ; <- 35049 sprite_absorbable : 31-32 (JSL Sprite_DrawRippleIfInWater : JSR Sprite_DrawAbsorbable)
|
||||
jsl SpriteKeyDrawGFX : bra + : nop : +
|
||||
|
||||
org $06d180
|
||||
jsl BigKeyGet : bcs $07 : nop #5
|
||||
|
||||
org $06d18d ; <- 3518D - sprite_absorbable.asm : 274 (LDA $7EF36F : INC A : STA $7EF36F)
|
||||
jsl KeyGet
|
||||
|
||||
org $06f9f3 ; bank06.asm : 6732 (JSL Sprite_LoadProperties)
|
||||
jsl LoadProperties_PreserveItemMaybe
|
||||
|
||||
|
||||
|
||||
|
||||
org $06d23a
|
||||
Sprite_DrawAbsorbable:
|
||||
org $1eff81
|
||||
Sprite_DrawRippleIfInWater:
|
||||
org $0db818
|
||||
Sprite_LoadProperties:
|
||||
|
||||
org $288000 ;140000
|
||||
ShuffleKeyDrops:
|
||||
db 0
|
||||
MultiClientFlagsROM: ; 140001 -> stored in SRAM at 7ef33d
|
||||
db 0
|
||||
|
||||
LootTable: ;PC: 140002
|
||||
db $0e, $00, $24 ;; ice jelly key
|
||||
db $13, $00, $24 ;; pokey 2
|
||||
db $16, $00, $24 ;; swamp waterway pot
|
||||
db $21, $00, $24 ;; key rat
|
||||
db $35, $00, $24 ;; swamp trench 2 pot
|
||||
db $36, $00, $24 ;; hookshot pot
|
||||
db $37, $00, $24 ;; trench 1 pot
|
||||
db $38, $00, $24 ;; pot row pot
|
||||
db $39, $00, $24 ;; skull gibdo
|
||||
db $3d, $00, $24 ;; gt minihelma
|
||||
db $3e, $00, $24 ;; ice conveyor
|
||||
db $3f, $00, $24 ;; ice hammer block ??? is this a dungeon secret?
|
||||
db $43, $00, $24 ;; tiles 2 pot
|
||||
db $53, $00, $24 ;; beamos hall pot
|
||||
db $56, $00, $24 ;; skull west lobby pot
|
||||
db $63, $00, $24 ;; desert tiles 1 pot
|
||||
db $71, $00, $24 ;; boomerang guard
|
||||
db $72, $00, $24 ;; hc map guard
|
||||
db $7b, $00, $24 ;; gt star pits pot
|
||||
db $80, $00, $32 ;; a big key (for the current dungeon)
|
||||
db $8b, $00, $24 ;; gt conv cross block
|
||||
db $9b, $00, $24 ;; gt dlb switch pot
|
||||
db $9f, $00, $24 ;; ice many pots
|
||||
db $99, $00, $24 ;; eastern eyegore
|
||||
db $a1, $00, $24 ;; mire fishbone pot
|
||||
db $ab, $00, $24 ;; tt spike switch pot
|
||||
db $b0, $00, $24 ;; tower circle of pots usain
|
||||
db $b3, $00, $24 ;; mire spikes pot
|
||||
db $b6, $00, $24 ;; pokey 1
|
||||
db $ba, $00, $24 ;; eastern dark pot
|
||||
db $bc, $00, $24 ;; tt hallway pot
|
||||
db $c0, $00, $24 ;; tower dark archer
|
||||
db $c1, $00, $24 ;; mire glitchy jelly
|
||||
db $ff, $00, $ff
|
||||
;140068
|
||||
|
||||
KeyTable:
|
||||
db $a0, $a0, $a2, $a3, $a4, $a5, $a6, $a7, $a8, $a9, $aa, $ab, $ac, $ad
|
||||
|
||||
SpriteKeyPrep:
|
||||
{
|
||||
lda $0b9b : sta $0cba, x ; what we wrote over
|
||||
pha
|
||||
lda.l ShuffleKeyDrops : beq +
|
||||
phx
|
||||
ldx #$fd
|
||||
- inx #3 : lda.l LootTable, x : cmp #$ff : beq ++ : cmp $a0 : bne -
|
||||
inx : lda.l LootTable, x : sta !MULTIWORLD_SPRITEITEM_PLAYER_ID
|
||||
inx : lda.l LootTable, x
|
||||
plx : sta $0e80, x
|
||||
cmp #$24 : bne +++
|
||||
lda $a0 : cmp #$80 : bne + : lda #$24
|
||||
+++ jsl PrepDynamicTile : bra +
|
||||
++ plx : lda #$24 : sta $0e80, x
|
||||
+ pla
|
||||
rtl
|
||||
}
|
||||
|
||||
SpriteKeyDrawGFX:
|
||||
{
|
||||
jsl Sprite_DrawRippleIfInWater
|
||||
pha
|
||||
lda.l ShuffleKeyDrops : bne +
|
||||
- pla
|
||||
phk : pea.w .jslrtsreturn-1
|
||||
pea.w $068014 ; an rtl address - 1 in Bank06
|
||||
jml Sprite_DrawAbsorbable
|
||||
.jslrtsreturn
|
||||
rtl
|
||||
+ lda $0e80, x
|
||||
cmp #$24 : bne +
|
||||
lda $a0 : cmp #$80 : bne - : lda #$24
|
||||
+ jsl DrawDynamicTile ; see DrawHeartPieceGFX if problems
|
||||
cmp #$03 : bne +
|
||||
pha : lda $0e60, x : ora.b #$20 : sta $0E60, x : pla
|
||||
+
|
||||
jsl.l Sprite_DrawShadowLong
|
||||
|
||||
pla : rtl
|
||||
}
|
||||
|
||||
KeyGet:
|
||||
{
|
||||
lda CurrentSmallKeys ; what we wrote over
|
||||
pha
|
||||
lda.l ShuffleKeyDrops : bne +
|
||||
- pla : rtl
|
||||
+ ldy $0e80, x
|
||||
lda $a0 : cmp #$87 : bne +
|
||||
jsr ShouldKeyBeCountedForDungeon : bcc -
|
||||
jsl CountChestKeyLong : bra -
|
||||
+ sty $00
|
||||
jsr KeyGetPlayer : sta !MULTIWORLD_ITEM_PLAYER_ID
|
||||
lda !MULTIWORLD_ITEM_PLAYER_ID : bne .receive
|
||||
phx
|
||||
lda $040c : lsr : tax
|
||||
lda $00 : CMP.l KeyTable, x : bne +
|
||||
- JSL.l FullInventoryExternal : jsl CountChestKeyLong : plx : pla : rtl
|
||||
+ cmp #$af : beq - ; universal key
|
||||
cmp #$24 : beq - ; small key for this dungeon
|
||||
plx
|
||||
.receive
|
||||
jsl.l $0791b3 ; Player_HaltDashAttackLong
|
||||
jsl.l Link_ReceiveItem
|
||||
pla : dec : rtl
|
||||
}
|
||||
|
||||
; Input Y - the item type
|
||||
ShouldKeyBeCountedForDungeon:
|
||||
{
|
||||
phx
|
||||
lda $040c : lsr : tax
|
||||
tya : cmp KeyTable, x : bne +
|
||||
- plx : sec : rts
|
||||
+ cmp #$24 : beq -
|
||||
plx : clc : rts
|
||||
}
|
||||
|
||||
BigKeyGet:
|
||||
{
|
||||
lda.l ShuffleKeyDrops : bne +
|
||||
- stz $02e9 : ldy.b #$32 ; what we wrote over
|
||||
phx : jsl Link_ReceiveItem : plx ; what we wrote over
|
||||
clc : rtl
|
||||
+
|
||||
ldy $0e80, x
|
||||
cpy #$32 : beq -
|
||||
+ sec : rtl
|
||||
}
|
||||
|
||||
KeyGetPlayer:
|
||||
{
|
||||
phx
|
||||
ldx #$fd
|
||||
- inx #3 : lda.l LootTable, x : cmp #$ff : beq ++ : cmp $a0 : bne -
|
||||
++ inx : lda.l LootTable, x
|
||||
plx
|
||||
rts
|
||||
}
|
||||
|
||||
LoadProperties_PreserveItemMaybe:
|
||||
{
|
||||
lda.l ShuffleKeyDrops : bne +
|
||||
JML Sprite_LoadProperties
|
||||
+ lda $0e80, x : pha
|
||||
jsl Sprite_LoadProperties
|
||||
pla : sta $0e80, x
|
||||
rtl
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
!MC_FLAG = "$7F5420"
|
||||
|
||||
; tables
|
||||
org $0ABDF6
|
||||
org $8ABDF6
|
||||
WorldMapIcon_posx_vanilla:
|
||||
dw $0F31 ; prize1
|
||||
dw $08D0 ; prize2
|
||||
@@ -24,7 +24,7 @@ dw $FFFF ; reserved - not used
|
||||
dw $FFFF
|
||||
dw $FFFF
|
||||
|
||||
org $0ABE16
|
||||
org $8ABE16
|
||||
WorldMapIcon_posy_vanilla:
|
||||
dw $0620 ; prize1
|
||||
dw $0080 ; prize2
|
||||
@@ -46,7 +46,7 @@ dw $FFFF ; reserved - not used
|
||||
dw $FFFF
|
||||
dw $FFFF
|
||||
|
||||
org $0ABE36
|
||||
org $8ABE36
|
||||
WorldMapIcon_posx_located:
|
||||
dw $FF00 ; prize1
|
||||
dw $FF00 ; prize2
|
||||
@@ -68,7 +68,7 @@ dw $FFFF ; reserved - not used
|
||||
dw $FFFF
|
||||
dw $FFFF
|
||||
|
||||
org $0ABE56
|
||||
org $8ABE56
|
||||
WorldMapIcon_posy_located:
|
||||
dw $FF00 ; prize1
|
||||
dw $FF00 ; prize2
|
||||
@@ -90,7 +90,7 @@ dw $FFFF ; reserved - not used
|
||||
dw $FFFF
|
||||
dw $FFFF
|
||||
|
||||
org $0ABE76
|
||||
org $8ABE76
|
||||
WorldMapIcon_tile:
|
||||
db $38, $62 ; green pendant
|
||||
db $32, $60 ; red pendant
|
||||
@@ -112,30 +112,30 @@ db $00, $00 ; unused red x's
|
||||
db $00, $00
|
||||
db $00, $00
|
||||
|
||||
org $0ABE96
|
||||
org $8ABE96
|
||||
CompassExists:
|
||||
; dw $37FC ; todo: convert to two bytes with masks? so much extra code...
|
||||
; eastern hera desert pod skull trock thieves mire ice swamp gt at escape
|
||||
db $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $00, $00, $00, $00, $00
|
||||
|
||||
; 0 = light world, 1 = dark world
|
||||
org $0ABEA6
|
||||
org $8ABEA6
|
||||
WorldCompassMask:
|
||||
db $00, $00, $00, $01, $01, $01, $01, $01, $01, $01, $01, $00, $00, $00, $00, $00
|
||||
|
||||
; eastern desert hera pod skull trock thieves mire ice swamp gt at escape x1 x2 x3
|
||||
|
||||
; refs
|
||||
org $0AC59B
|
||||
org $8AC59B
|
||||
WorldMapIcon_AdjustCoordinate:
|
||||
org $0AC3B1
|
||||
org $8AC3B1
|
||||
WorldMap_CalculateOAMCoordinates:
|
||||
org $0AC52E
|
||||
org $8AC52E
|
||||
WorldMap_HandleSpriteBlink:
|
||||
org $0ABF70
|
||||
org $8ABF70
|
||||
WorldMap_RedXChars:
|
||||
|
||||
org $0AC02B
|
||||
org $8AC02B
|
||||
DrawPrizesOverride:
|
||||
LDX.b #$FF
|
||||
.loopStart
|
||||
@@ -297,4 +297,4 @@ MC_Masks:
|
||||
; EP TH DP PD SK TR TT MM
|
||||
db $20, $20, $10, $02, $80, $08, $10, $01, $40, $04, $04, $08, $40
|
||||
|
||||
warnpc $0AC3B1 ; above code should not exceed the space of the code segment it is overwriting
|
||||
warnpc $8AC3B1 ; above code should not exceed the space of the code segment it is overwriting
|
||||
Reference in New Issue
Block a user