Author SHA1 Message Date
karafruit 0264a85511 Add shop shield handling, credits counter, softlock protection 2026-06-05 01:07:17 -05:00
karafruit 0f36eca4ab Add more shield logic 2026-05-02 23:22:37 -05:00
karafruit bd722bef33 Fix dig game 2026-02-08 00:33:19 -06:00
karafruit 9208d06f3a Fix bonk torches and smithy 2026-02-07 23:52:47 -06:00
karafruit 2a31b7763b Fix small chest bug 2026-02-07 21:23:01 -06:00
karafruit 779c9a27ce Shield handling for pots and enemy drops and a few more NPCs 2026-02-07 16:51:21 -06:00
karafruit 381868c3ce Heart pieces and containers shielding, fix some GFX (swords) 2026-02-05 22:10:53 -06:00
karafruit f6c0de88fb Make valuable items all look like shields, implement a few NPCs 2026-02-01 23:25:24 -06:00
karafruit f609727647 Start link with home-pikit telling him to bring shields 2026-02-01 21:33:44 -06:00
karafruit 2dcfd8e67a First pass at pikit mode 2026-02-01 00:10:55 -06:00
karafruit ed2746a27b Update map coordinates and fix red crystals showing junk 2026-01-31 13:01:14 -06:00
karafruit f8917c461a Merge remote-tracking branch 'codemann/OWMain' into codemann_OWMain 2026-01-31 08:47:00 -06:00
karafruit 5dd62441a8 Pull in OW Fog and Grid Map (#2)
Reviewed-on: #2
2026-01-31 14:41:47 +00:00
karafruit ab60e3fd35 Remove error beep from doors map navigation 2026-01-31 08:37:20 -06:00
codemann8 bf2bd1974d Fix buffered sword issue when transitioning to water with sword out 2026-01-29 21:26:19 -06:00
codemann8 c438e9fc3c Merge branch 'OWMain' of https://github.com/codemann8/z3randomizer into OWMain 2026-01-29 20:52:54 -06:00
codemann8 17943f9904 Fix Link sprite using vanilla coords on map check in Special OW 2026-01-29 20:52:25 -06:00
codemann8 41c520fe90 Fix Link sprite using vanilla coords on map check in Special OW 2026-01-28 22:50:20 -06:00
codemann8 9fc26e8710 Fixed palette issue with map checks when Link stands in grass/water 2026-01-28 18:40:33 -06:00
karafruit 482381fe53 Add lower-layer headers to doors/stairs in IP tile theme 2026-01-27 21:21:23 -06:00
karafruit 2b3b50fc5c Initialize $72 before loading palette for OW map 2026-01-27 00:19:56 -06:00
karafruit b7c32fdfb1 Bump GK Rom version 2026-01-25 21:48:20 -06:00
karafruit ec1083a2e5 Fix reference to now-removed UWSpritesPointer 2026-01-25 21:31:39 -06:00
karafruit 53d2a7606a Merge remote-tracking branch 'codemann/OWMain' into codemann_OWMain 2026-01-25 21:15:13 -06:00
karafruit 37ee113f9d Merge in dungeon map changes (#1)
known issues:
- in-room stairs in door shuffle draw slightly bugged sometimes
- entrance sprites in non-doors are sometimes drawn on the wrong floor
- in some modes, sanctuary will open HC map instead of sewers/HC2 map

Reviewed-on: #1
Co-authored-by: Kara Alexandra <ardnaxelarak@gmail.com>
Co-committed-by: Kara Alexandra <ardnaxelarak@gmail.com>
2026-01-25 22:43:02 +00:00
codemann8 781431f633 Fixes issue not able to screen transition if bumped by enemy in water 2026-01-19 15:21:03 -06:00
codemann8 e02f98e6c5 Fixed L/R map swap while in special world 2026-01-17 13:58:18 -06:00
codemann8 7898e2149f Fixed issue with Old Man follower infinite pit fall 2026-01-17 00:51:26 -06:00
karafruit 5831117e36 Fix light cone not showing after torches extinguish 2026-01-16 18:28:21 -06:00
codemann8 3c41d7ff39 Change key total display based on seen by player 2026-01-16 15:30:06 -06:00
codemann8 ab0f37b7ba Merge branch 'OWMain' of https://github.com/codemann8/z3randomizer into OWMain 2026-01-16 14:30:04 -06:00
codemann8 343d61a976 Fixing key totals marking MapCountDisplay flag 2026-01-16 14:30:01 -06:00
codemann8 804e72395b Fixing key totals marking MapCountDisplay flag 2026-01-16 14:19:48 -06:00
codemann8 e8e6120a9e Some added labeling 2026-01-13 23:51:42 -06:00
codemann8 b0dfcdcae6 Fixed screen drawing issue on Pyramid screen 2026-01-13 15:29:04 -06:00
codemann8 920212d1b8 Removed sprite pointer label since value can shift via generator 2026-01-13 11:26:28 -06:00
codemann8 b7e123a7cf Removed hardcoded sprite data 2026-01-13 11:25:41 -06:00
codemann8 ce7f35ac7b Fixed screen drawing issue on HC screen 2026-01-13 11:24:37 -06:00
codemann8 a090f95659 Hold L/R during Grid OW map check to see opposite world 2026-01-12 22:35:07 -06:00
Catobat 9cbc202b62 Move dynamically positioned sprites on overworld map to match custom layout 2026-01-11 21:45:42 +01:00
Catobat 2ee7be56fc Overworld map fog 2026-01-11 21:45:42 +01:00
Catobat fe5c936c7c Draw arbitrary layouts on the overworld map 2026-01-11 21:45:42 +01:00
Catobat afa0f95072 Overworld edges are disabled if the destination is set to 0xFF 2026-01-11 21:45:42 +01:00
codemann8 ead6a30aa5 Fixed boss icons not showing on dungeon map check 2026-01-11 01:59:44 -06:00
codemann8 d532ac2f4a Fixed bonk drops duplicate counting and potentially writing bad values 2026-01-11 00:38:24 -06:00
codemann8 71ebc09270 Fix bonk drops updating HUD on collection 2026-01-11 00:06:52 -06:00
codemann8 0fef82981a Fixed bonk drops double counting and potentially writing bad values 2026-01-11 00:06:19 -06:00
codemann8 7d45a5cf66 Merge branch 'OWMain' of https://github.com/codemann8/z3randomizer into OWMain 2026-01-08 19:47:22 -06:00
codemann8 5af2fdc51e Fix psuedoboots ability to open Kings Tomb 2026-01-08 19:47:06 -06:00
codemann8 bff1da4330 Fix psuedoboots ability to open Kings Tomb 2026-01-08 16:16:33 -06:00
codemann8 0dba4601fc Fix issue with zoomed-in map check displaying icons from off-screen 2026-01-05 23:57:19 -06:00
codemann8 e30e5107c6 Implement more accurate map check coordinates 2026-01-05 22:38:53 -06:00
83 changed files with 8279 additions and 569 deletions
+41 -9
View File
@@ -74,6 +74,8 @@ function hexto555(h) = ((((h&$FF)/8)<<10)|(((h>>8&$FF)/8)<<5)|(((h>>16&$FF)/8)<<
!FLAG_OW_MIXED = $04
!FLAG_OW_CROSSED = $02
!FLAG_OW_BONKDROP = $02
!FLAG_OW_CUSTOM_MAP = $02
!FLAG_OW_ADJUST_DYNAMIC_MAP_SPRITE_POSITION = $04
incsrc hooks.asm
incsrc spriteswap.asm
@@ -179,7 +181,7 @@ incsrc toast.asm
incsrc fastcredits.asm
incsrc msu.asm
incsrc menu/overworldmap.asm ; Overwrites some code in bank $8A
incsrc dungeonmap.asm
incsrc bossicons.asm
incsrc hextodec.asm
incsrc multiworld.asm
incsrc textrenderer.asm
@@ -203,13 +205,23 @@ incsrc menu/hudalpha.asm
warnpc $A38000
org $B98000
incsrc crystalswitchbook.asm
incsrc mimicdash.asm
incsrc gloom.asm
incsrc special_weapons.asm
incsrc variable_ganon_vulnerability.asm
incsrc pseudoflute.asm
warnpc $BA8000
incsrc gk/crystalswitchbook.asm
incsrc gk/mimicdash.asm
incsrc gk/gloom.asm
incsrc gk/special_weapons.asm
incsrc gk/variable_ganon_vulnerability.asm
incsrc gk/pseudoflute.asm
incsrc gk/fast_junk.asm
incsrc gk/dungeon_maps.asm
incsrc pikit.asm
print "End of B9: ", pc
warnpc $B9EE00
org $B9EE00
incsrc gk_meta.asm
org $B9F000
incsrc gk/settings.asm
org $A38000
incsrc stats/credits.asm ; Statically mapped
@@ -253,7 +265,7 @@ warnpc $B1A000
org $B1A000
GFX_HUD_Items:
incbin "menu/drsheetdc.2bppc"
incbin "menu/dr_sheet_dc.2bppc"
warnpc $B1A800
org $B1A800
@@ -306,6 +318,26 @@ NewFontInverted:
incbin "data/newfont_inverted.bin"
SmallCharacters:
incbin "data/smallchars.2bpp"
DungeonMapIcons1:
incbin "menu/map_icons_1.3bppc"
DungeonMapIcons2:
incbin "menu/map_icons_2.3bppc"
DungeonMapIcons3:
incbin "menu/map_icons_3.3bppc"
DungeonMapIcons4:
incbin "menu/map_icons_4.3bppc"
DungeonMapIcons5:
incbin "menu/map_icons_5.3bppc"
DungeonMapIcons6:
incbin "menu/map_icons_6.3bppc"
DungeonMapDoorConnectors:
incbin "menu/door_connectors.3bppc"
MapSheetD4:
incbin "menu/map_sheet_d4.3bppc"
DRSheet14:
incbin "menu/dr_sheet_14.3bppc"
org $8CD7DF
incsrc data/playernamecharmap.asm
org $8CE73D
+12 -1
View File
@@ -53,13 +53,24 @@ RTL
GiveBonkItem:
LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID
LDA.w SprSourceItemId, X
PHY : TAY
JSL ShieldCheck
TYA : PLY
BCS +
STZ.w $0DD0, X
PLA : PLA : PLA ; remove the stored return address
JML $85FC9D
+
JSR AbsorbKeyCheck : BCC .notKey
PHY : LDY.b #$24 : JSL AddInventory : PLY ; do inventory processing for a small key
LDA.l CurrentSmallKeys : INC A : STA.l CurrentSmallKeys
LDA.b #$2F : JSL Sound_SetSfx3PanLong
LDA.b #$01 : STA.l UpdateHUDFlag
RTL
.notKey
.notKey
PHY : TAY : JSL Link_ReceiveItem : PLY
RTL
;--------------------------------------------------------------------------------
+13 -13
View File
@@ -28,16 +28,19 @@ AddBonkTremors:
JSL AddDashTremor : JSL Player_ApplyRumbleToSprites ; things we wrote over
RTL
;--------------------------------------------------------------------------------
BonkBreakableWall:
PHX : PHP
SEP #$30 ; set 8-bit accumulator and index registers
ValidDashCheck:
PHP
SEP #$20
LDA.l BootsModifier : CMP.b #$01 : BEQ +
LDA.l BootsEquipment : BNE + ; Check for Boots
PLP : PLX : LDA.w #$0000 : RTL
+
PLP : PLX
LDA.w LinkDashing : AND.w #$00FF ; things we wrote over
RTL
LDA.l BootsEquipment : BEQ .exit
+ LDA.w LinkDashing
.exit
BEQ +
PLP : REP #$02
RTL
+
PLP : SEP #$02
RTL
;--------------------------------------------------------------------------------
BonkRockPile:
LDA.l BootsModifier : CMP.b #$01 : BEQ +
@@ -48,10 +51,7 @@ BonkRockPile:
RTL
;--------------------------------------------------------------------------------
GravestoneHook:
LDA.l BootsModifier : CMP.b #$01 : BEQ +
LDA.l BootsEquipment : BEQ .done ; Check for Boots
+
LDA.w LinkDashing : BEQ .done ; things we wrote over
JSL ValidDashCheck : BEQ .done ; things we wrote over
JML moveGravestone
.done
JML GravestoneHook_continue
+6 -7
View File
@@ -17,15 +17,14 @@ DoDungeonMapBossIcon:
ASL
TAX
; get sprite pointer table
LDA.l $89C298 : STA.b Scrap00
LDA.w #$0089 : STA.b Scrap02
TXY
; get sprite pointer for room
LDA.l UWSpritesPointers,X
LDA.b [Scrap00], Y
STA.b Scrap00 ; pointer in $00
if !FEATURE_FIX_BASEROM
LDA.w #$0089
else
LDA.w #$0028 ; set the bank to 28 for now
endif
STA.b Scrap02
LDA.w #bank(UWSpritesData) : STA.b Scrap02
LDY.w #$0001 ; to skip the "sort"
; get first byte to make sure it isn't an empty room
+12 -73
View File
@@ -238,6 +238,18 @@ FixJingleGlitch:
.exit
RTL
;--------------------------------------------------------------------------------
FixSwimBump:
LDA.b LinkIncapacitatedTimer : BEQ .normal
LDA.b LinkJumping : BNE .normal
INC.b LinkJumping
BRA .not_diving
.normal
LDA.b LinkJumping : BNE .continue ; what we wrote over
.not_diving
PLA : PLA : PEA.w $87964E ; skip ahead, not diving
.continue
RTL
;--------------------------------------------------------------------------------
; Fix spawning with more hearts than capacity when less than 3 heart containers
pushpc
org $09F4AC ; <- module_death.asm:331
@@ -278,76 +290,3 @@ ParadoxCaveGfxFix:
LDX.w #$00C0 : STX.w DAS0L
BRA .uploadLine
;--------------------------------------------------------------------------------
SetItemRiseTimer:
LDA.w ItemReceiptMethod : CMP.b #$01 : BNE .not_from_chest
LDA.b #$38 : STA.w AncillaTimer, X
RTL
.not_from_chest
JSL.l ItemIsJunk
BEQ .default
.junk
LDA.l JunkItemTimer : AND.b #$3F : STA.w AncillaTimer, X
RTL
.default
TYA : STA.w AncillaTimer, X ; What we wrote over
RTL
;--------------------------------------------------------------------------------
ItemIsJunk:
PHX
LDA.l JunkItemTimer : BIT.b #$3F : BEQ .not_junk
BIT.b #$80 : BNE .check
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE .check
LDA.l !MULTIWORLD_RECEIVING_ITEM : BNE .check
BRA .not_junk
.check
LDA.l JunkItemTimer : AND.b #$40
BEQ +
LDA.b #JunkItems_triforce_end-JunkItems_end
+
CLC : ADC.b #JunkItems_end-JunkItems-1
LDA.w AncillaGet, X
TAX
-
CMP.l JunkItems, X : BEQ .junk
DEX : BPL -
.not_junk
PLX
LDA.b #$00
RTL
.junk
PLX
LDA.b #$01
RTL
RTL
JunkItems:
db $27 ; Bomb
db $28 ; 3 bombs
db $31 ; 10 bombs
db $34 ; 1 rupee
db $35 ; 5 rupees
db $36 ; 20 rupees
db $40 ; 100 rupees
db $41 ; 50 rupees
db $42 ; Heart
db $43 ; Arrow
db $44 ; 10 arrows
db $45 ; Small magic
db $46 ; 300 rupees
db $47 ; 20 rupees green
db $59 ; Rupoor
db $D1 ; Apples
db $D2 ; Fairy
db $D3 ; Chicken
db $D4 ; Big Magic
db $D5 ; 5 Arrows
db $D6 ; Good Bee
.end
db $6B ; Power Star
db $6C ; Triforce Piece
.triforce_end
;--------------------------------------------------------------------------------
+16 -3
View File
@@ -78,10 +78,23 @@ JML Dungeon_OpenKeyedObject_nextChest
LDA.l ChestData, X : ASL A : BCC .smallChest
JML Dungeon_OpenKeyedObject_bigChest ;(bank01.asm line #13783)
PHY
LDY.b Scrap0C
JSL ShieldCheck
STY.b Scrap0C
PLY
BCC .couldntFindChest
JML Dungeon_OpenKeyedObject_bigChest ;(bank01.asm line #13783)
.smallChest
JML Dungeon_OpenKeyedObject_smallChest
PHY
LDY.b Scrap0C
JSL ShieldCheck
STY.b Scrap0C
PLY
BCC .couldntFindChest
JML Dungeon_OpenKeyedObject_smallChest
.couldntFindChest
JML Dungeon_OpenKeyedObject_couldntFindChest
JML Dungeon_OpenKeyedObject_couldntFindChest
;--------------------------------------------------------------------------------
+127 -86
View File
@@ -45,10 +45,10 @@ DRHUD_BossIndicator:
LDA.w CompassField : AND.l DungeonMask, x
SEP #$20
BEQ .draw_indicator
LDA.l CompassBossIndicator, x : CMP.b RoomIndex : BNE .draw_indicator
LDY.w #!RedSquare
LDA.l CompassBossIndicator, x : CMP.b RoomIndex : BNE .draw_indicator
LDY.w #!RedSquare
.draw_indicator
STY.w HUDMultiIndicator
STY.w HUDMultiIndicator
BRA DRHUD_DrawCurrentDungeonIndicator
DRHUD_EnemyDropIndicator:
@@ -59,12 +59,20 @@ DRHUD_EnemyDropIndicator:
SEP #$10 : TAX : REP #$10
DRHUD_DrawCurrentDungeonIndicator: ; mX
LDA.l DRMode : BIT.b #$02 : BEQ DRHUD_Finished
LDY.w #!BlankTile
LDA.w CurrentHealth : BEQ .draw_indicator
LDA.l DRMode : BIT.b #$02 : BNE + : JMP DRHUD_Finished : +
LDY.w #!BlankTile
LDA.w CurrentHealth : BEQ .draw_indicator
REP #$20 : LDA.l DungeonReminderTable,X : TAY
SEP #$20
LDA.b GameMode
CMP.b #$0E : BNE .get_indicator
LDA.b GameSubMode
CMP.b #$03 : BNE .get_indicator
LDA.w SubModuleInterface
CMP.b #$06 : BEQ .draw_indicator
.get_indicator
REP #$20 : LDA.l DungeonReminderTable,X : TAY
SEP #$20
.draw_indicator
STY.w HUDCurrentDungeonWorld
@@ -117,101 +125,100 @@ dw $0000, $0000, $0000, $0000, $000a, $000a, $000a, $0014, $000a, $0014, $0000,
DrHudDungeonItemsAdditions:
{
jsl DrawHUDDungeonItems
lda.l DRMode : cmp.b #$02 : beq + : rtl : +
jsl DrawHUDDungeonItems
lda.l DRMode : cmp.b #$02 : beq + : rtl : +
phx : phy : php
rep #$30
phx : phy : php
rep #$30
lda.w #$24f5 : sta.w $1606 : sta.w $1610 : sta.w $161a : sta.w $1624
sta.w $1644 : sta.w $164a : sta.w $1652 : sta.w $1662 : sta.w $1684 : sta.w $16c4
ldx.w #$0000
- sta.w $1704, x : sta.w $170e, x : sta.w $1718, x
inx #2 : cpx.w #$0008 : !BLT -
lda.w #$24f5 : sta.w $1606 : sta.w $1610 : sta.w $161a : sta.w $1624
sta.w $1644 : sta.w $164a : sta.w $1652 : sta.w $1662 : sta.w $1684 : sta.w $16c4
ldx.w #$0000
- sta.w $1704, x : sta.w $170e, x : sta.w $1718, x
inx #2 : cpx.w #$0008 : !BLT -
lda.l HudFlag : and.w #$0020 : beq + : JMP ++ : +
lda.l HUDDungeonItems : and.w #$0007 : bne + : JMP ++ : +
; bk symbols
lda.l HudFlag : and.w #$0020 : beq + : JMP ++ : +
lda.l HUDDungeonItems : and.w #$001F : bne + : JMP ++ : +
; bk symbols
lda.w #$2811 : sta.w $1606 : sta.w $1610 : sta.w $161a : sta.w $1624
; sm symbols
lda.w #$2810 : sta.w $160a : sta.w $1614 : sta.w $161e : sta.w $16e4
; blank out stuff
lda.w #$24f5 : sta.w $1724
; blank out stuff
lda.w #$24f5 : sta.w $1724
ldx.w #$0002
- lda.w #$0000 : !ADD.l RowOffsets,x : !ADD.l ColumnOffsets, x : tay
lda.l DungeonReminderTable, x : sta.w $1644, y : iny #2
lda.w #$24f5 : sta.w $1644, y
lda.l MapField : and.l DungeonMask, x : beq + ; must have map
jsr BkStatus : sta.w $1644, y : bra .smallKey ; big key status
+ lda.l BigKeyField : and.l DungeonMask, x : beq .smallKey
lda.w #$2826 : sta.w $1644, y
.smallKey
+ iny #2
ldx.w #$0002
- lda.w #$0000 : !ADD.l RowOffsets,x : !ADD.l ColumnOffsets, x : tay
JSR BossStatus : STA.w $1644, Y
INY #2
lda.w #$24f5 : sta.w $1644, y
lda.l MapField : and.l DungeonMask, x : beq + ; must have map
jsr BkStatus : sta.w $1644, y : bra .smallKey ; big key status
+ lda.l BigKeyField : and.l DungeonMask, x : beq .smallKey
lda.w #$2826 : sta.w $1644, y
.smallKey
+ iny #2
cpx.w #$001a : bne +
tya : !ADD.w #$003c : tay
+ stx.b Scrap00
txa : lsr : tax
lda.w #$24f5 : sta.w $1644, y
lda.l GenericKeys : and.w #$00FF : bne +
lda.l DungeonKeys, x : and.w #$00FF : beq +
jsr ConvertToDisplay2 : sta.w $1644, y
+ iny #2 : lda.w #$24f5 : sta.w $1644, y
phx : ldx.b Scrap00
LDA.l CompassMode : BIT.w #$0002 : BNE .skip_map_check
LDA.l MapField : AND.l DungeonMask, x : BEQ .key_info_done ; must have map
.skip_map_check
+ stx.b Scrap00
txa : lsr : tax
lda.w #$24f5 : sta.w $1644, y
lda.l GenericKeys : and.w #$00FF : bne +
lda.l DungeonKeys, x : and.w #$00FF : beq +
jsr ConvertToDisplay2 : sta.w $1644, y
+ iny #2 : lda.w #$24f5 : sta.w $1644, y
phx : ldx.b Scrap00
LDA.l MapField : ORA.l MapCountDisplay : AND.l DungeonMask, x : BEQ .key_info_done ; must have map
plx : sep #$30 : lda.l ChestKeys, x : sta.b Scrap02
lda.l GenericKeys : bne +++
lda.b Scrap02 : !SUB.l DungeonCollectedKeys, x : sta.b Scrap02
+++ lda.b Scrap02
rep #$30
jsr ConvertToDisplay2 : sta.w $1644, y ; small key totals
bra .skipStack
lda.l GenericKeys : bne +++
lda.b Scrap02 : !SUB.l DungeonCollectedKeys, x : sta.b Scrap02
+++ lda.b Scrap02
rep #$30
jsr ConvertToDisplay2 : sta.w $1644, y ; small key totals
bra .skipStack
.key_info_done
plx
.skipStack iny #2
cpx.w #$000d : beq +
lda.w #$24f5 : sta.w $1644, y
+
ldx.b Scrap00
+ inx #2 : cpx.w #$001b : bcs ++ : JMP -
++
lda.l HudFlag : and.w #$0020 : bne + : JMP ++ : +
; map symbols
lda.w #$2821 : sta.w $1606 : sta.w $1610 : sta.w $161a
; compass symbols
lda.w #$2c20 : sta.w $160a : sta.w $1614 : sta.w $161e : sta.w $16e4
; blank out a couple thing from old hud
lda.w #$24f5 : sta.w $1624 : sta.w $1724
ldx.w #$0002
- lda.w #$0000 ; start of hud area
!ADD.l RowOffsets, x : !ADD.l ColumnOffsets, x : tay
lda.l DungeonReminderTable, x : sta.w $1644, y
iny #2
lda.w #$24f5 : sta.w $1644, y ; blank out map spot
lda.l MapField : ora.l MapCountDisplay : ora.l MapOverlay
and.l DungeonMask, x : beq + ; must have map
JSR MapIndicatorShort : STA.w $1644, Y
plx
.skipStack iny #2
cpx.w #$000d : beq +
lda.w #$24f5 : sta.w $1644, y
+
ldx.b Scrap00
+ inx #2 : cpx.w #$001b : bcs ++ : JMP -
++
lda.l HudFlag : and.w #$0020 : bne + : JMP ++ : +
; map symbols
lda.w #$2821 : sta.w $1606 : sta.w $1610 : sta.w $161a
; compass symbols
lda.w #$2c20 : sta.w $160a : sta.w $1614 : sta.w $161e : sta.w $16e4
; blank out a couple thing from old hud
lda.w #$24f5 : sta.w $1624 : sta.w $1724
ldx.w #$0002
- lda.w #$0000 ; start of hud area
!ADD.l RowOffsets, x : !ADD.l ColumnOffsets, x : tay
JSR BossStatus : STA.w $1644, Y
INY #2
lda.w #$24f5 : sta.w $1644, y ; blank out map spot
lda.l MapField : ora.l MapCountDisplay : ora.l MapOverlay
and.l DungeonMask, x : beq + ; must have map
JSR MapIndicatorShort : STA.w $1644, Y
+ iny #2
cpx.w #$001a : bne +
cpx.w #$001a : bne +
tya : !ADD.w #$003c : tay
+ lda.l CompassField : ora.l CompassCountDisplay
and.l DungeonMask, x : beq + ; must have compass
phx ; total chest counts
LDA.l CompassTotalsWRAM, x : !SUB.l DungeonLocationsChecked, x
SEP #$30 : JSR HudHexToDec2DigitCopy : REP #$30
lda.b Scrap06 : jsr ConvertToDisplay2 : sta.w $1644, y : iny #2
lda.b Scrap07 : jsr ConvertToDisplay2 : sta.w $1644, y
plx
bra .skipBlanks
phx ; total chest counts
LDA.l CompassTotalsWRAM, x : !SUB.l DungeonLocationsChecked, x
SEP #$30 : JSR HudHexToDec2DigitCopy : REP #$30
lda.b Scrap06 : jsr ConvertToDisplay2 : sta.w $1644, y : iny #2
lda.b Scrap07 : jsr ConvertToDisplay2 : sta.w $1644, y
plx
bra .skipBlanks
+ lda.w #$24f5 : sta.w $1644, y : iny #2 : sta.w $1644, y
.skipBlanks iny #2
cpx.w #$001a : beq +
.skipBlanks iny #2
cpx.w #$001a : beq +
lda.w #$24f5 : sta.w $1644, y ; blank out spot
+ inx #2 : cpx.w #$001b : !BGE ++ : JMP -
++
plp : ply : plx : rtl
+ inx #2 : cpx.w #$001b : !BGE ++ : JMP -
++
plp : ply : plx : rtl
}
MapIndicatorLong:
@@ -251,6 +258,40 @@ BkStatus:
+ lda.w #$24f5 : rts ; black otherwise
+++ lda.w #$2826 : rts ; check mark
BossStatus:
LDA.l HUDDungeonItems : BIT.w #$0010 : BEQ .normal
PHX
LDA.l DungeonMapBossRooms, X
CMP.w #$000F
BEQ .no_boss
ASL A
TAX
LDA.l SaveDataWRAM, X
PLX
BIT.w #$0800
BEQ .boss_alive
.boss_dead
LDA.l HudFlag : BIT.w #$0020 : BNE .skull
; palette 3 - white
LDA.l DungeonReminderTable, X : AND.w #$E3FF : ORA.w #$0C00 : RTS
.skull
LDA.w #$280F : RTS
.no_boss
PLX
; palette 0 - light gray
LDA.l DungeonReminderTable, X : AND.w #$E3FF : RTS
.boss_alive
; palette 4 - gray
LDA.l DungeonReminderTable, X : AND.w #$E3FF : ORA.w #$1000 : RTS
.normal
; default palette 3 - white
LDA.l DungeonReminderTable, X : RTS
ConvertToDisplay:
and.w #$00ff : cmp.w #$000a : !BLT +
!ADD.w #$2519 : rts
+21 -11
View File
@@ -88,6 +88,7 @@ RTL
PrizeReceiveItem:
PHA
LDA.b #$00 : STA.l BossDropTouched
JSL BossPrizeGetPlayer : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLA
CMP.b #$6A : BNE +
@@ -105,7 +106,7 @@ RTL
SetItemPose:
PHA
LDA.w DungeonID : BMI .one_handed
LDA.w RoomItemsTaken : BIT.b #$80 : BNE +
JSL CheckBossDropTouched : BNE +
.one_handed
PLA
JML Link_ReceiveItem_not_cool_pose
@@ -134,7 +135,7 @@ SetCutsceneFlag:
PHX
LDY.b #$01 ; wrote over
LDA.w DungeonID : BMI .no_cutscene
LDA.w RoomItemsTaken : BIT.b #$80 : BNE .dungeon_prize
JSL CheckBossDropTouched : BNE .dungeon_prize
.no_cutscene
SEP #$30
PLX
@@ -155,7 +156,7 @@ AnimatePrizeCutscene:
LDA.w ItemReceiptMethod : CMP.b #$03 : BNE +
JSR CrystalOrPendantBehavior : BCC +
LDA.w DungeonID : BMI +
LDA.w RoomItemsTaken : BIT.b #$80 : BEQ +
JSL CheckBossDropTouched : BEQ +
SEC
RTL
+
@@ -172,13 +173,13 @@ PrizeDropSparkle:
RTL
HandleDropSFX:
LDA.w RoomItemsTaken : BIT.b #$80 : BEQ .no_sound
JSR CrystalOrPendantBehavior : BCC .no_sound
SEC
RTL
.no_sound
CLC
RTL
JSL CheckBossDropTouched : BEQ .no_sound
JSR CrystalOrPendantBehavior : BCC .no_sound
SEC
RTL
.no_sound
CLC
RTL
HandleCrystalsField:
TAX
@@ -192,7 +193,7 @@ RTL
MaybeKeepLootID:
PHA
LDA.w DungeonID : BMI .no_prize
LDA.w RoomItemsTaken : BIT.b #$80 : BNE .prize
JSL CheckBossDropTouched : BNE .prize
.no_prize
STZ.w ItemReceiptID
STZ.w ItemReceiptPose
@@ -216,6 +217,15 @@ CheckSpawnPrize:
SEP #$21
RTL
CheckBossDropTouched:
; Out: z - boss drop not touched
LDA.w RoomItemsTaken
AND.b #$80
BNE .done
LDA.l BossDropTouched
.done
RTL
CheckDungeonCompletion:
LDX.w DungeonID
REP #$20
+1 -5
View File
@@ -1,10 +1,6 @@
LoadUnderworldSprites:
STA.b Scrap00 ; part one of what we replaced
if !FEATURE_FIX_BASEROM
LDA.w #$89
else
LDA.w #UWSpritesData>>16 ; set the bank to 28 for now
endif
LDA.w #UWSpritesData>>16 ; set the bank to 28 for now
STA.b Scrap02
LDA.w $048E
RTL
+10 -1
View File
@@ -23,7 +23,7 @@ JSL SpritePrep_OldManFollower : NOP #2 : db $F0 ; BEQ
org $9DFF18
JSL SpriteDraw_OldManFollower
org $9EE9BC
JSL Follower_CheckMessageCollision
JSL OldMan_WaitForCollision
org $9EE9CC
JSL OldMan_BecomeFollower : NOP #2
@@ -631,6 +631,15 @@ SpriteDraw_OldManFollower:
dw 0, 0 : db $AC, $00, $00, $02
dw 0, 8 : db $AE, $00, $00, $02
OldMan_WaitForCollision:
PHA
LDA.w LinkIFrames : BEQ +
PLA : CLC
RTL
+
PLA
JML Follower_CheckMessageCollision
OldMan_BecomeFollower:
LDA.l FollowerTravelAllowed : CMP.b #$02 : BCC .set_follower_and_despawn
PLA : PLA
+108
View File
@@ -0,0 +1,108 @@
; we want the icons indicating what is left in a room to blink
; but we don't want to redraw to BG1 every few frames
; so we duplicate the left side of BG1 to a lower portion and just toggle vertical scroll
BlinkLoot:
; do not show icons if we're scrolling
LDA.w $0210
BNE .hide
LDA.b FrameCounter
AND.b #$20
BEQ .show
.hide
LDA.b #$01
.show
STZ.b $E6
STA.w $E7
JSL $8AE96B
RTL
StartDoubleWrite:
; what we wrote over
LDA.l DRMode
BEQ .draw
INC.w $020D ; next subsubmode
PLA : PLA : PLA ; pull our jump to here off the stack
PLB
RTL
.draw
REP #$30
STZ.w GFXStripes
STZ.w $021B
RTL
CheckDoubleWrite:
LDA.w $021C
BNE .done
LDA.b #$08
STA.w $021C
REP #$30
JML $8AE20B
.done
; what we wrote over
REP #$10
LDY.w GFXStripes
LDA.b #$FF
JML $8AE2E7
DrawMountain:
LDX.w GFXStripes
PHX
LDY.w #$0000
.next_word
LDA.w $8AEFEF, Y
STA.w GFXStripes+2, X
INX : INX
INY : INY
CPY.w #$002A
BCC .next_word
PLY
LDA.w $021B
BEQ .done
; if second copy of mountain, adjust VRAM addresses
SEP #$20
LDA.w GFXStripes+$02, Y
ORA.w $021C
STA.w GFXStripes+$02, Y
LDA.w GFXStripes+$08, Y
ORA.w $021C
STA.w GFXStripes+$08, Y
LDA.w GFXStripes+$10, Y
ORA.w $021C
STA.w GFXStripes+$10, Y
LDA.w GFXStripes+$20, Y
ORA.w $021C
STA.w GFXStripes+$20, Y
LDA.w GFXStripes+$26, Y
ORA.w $021C
STA.w GFXStripes+$26, Y
REP #$20
.done
RTL
WriteBigEndianAddressX:
ORA.w $021B
XBA
STA.w GFXStripes+2, X
AND.w #$FFF7
RTL
WriteBigEndianAddressY:
ORA.w $021B
XBA
STA.w GFXStripes+2, Y
AND.w #$FFF7
RTL
+651
View File
@@ -0,0 +1,651 @@
; A = room_id
; out A = level of loot
CheckLoot:
PHP
REP #$30
PHB : PHX : PHY
STA.b $CA
LDA.b $06 : PHA
LDA.b $0E : PHA
STZ.b $02 ; best item class found
LDA.l ShowItems_default
AND.w #$00FF
STA.b $0E
LDA.b $CA
AND.w #$00FF
ASL A
TAX
LDA.l SaveDataWRAM, X
AND.w #$000F
BEQ +
LDA.l ShowItems_visited_tile
AND.w #$00FF
CMP.b $0E
BCC +
STA.b $0E
+ LDA.w DungeonID
TAX
LDA.l MapField
AND.l DungeonMask, X
BEQ +
LDA.l ShowItems_have_map
AND.w #$00FF
CMP.b $0E
BCC +
STA.b $0E
+ LDA.l CompassField
AND.l DungeonMask, X
BEQ +
LDA.l ShowItems_have_compass
AND.w #$00FF
CMP.b $0E
BCC +
STA.b $0E
+
LDA.l ItemSources : BIT.w #$0001 : BEQ +
JSR CheckChests
+
LDA.l ItemSources : BIT.w #$0002 : BEQ +
JSR CheckPots
+
LDA.l ItemSources : BIT.w #$0004 : BEQ +
JSR CheckEnemies
+
LDA.l ItemSources : BIT.w #$0008 : BEQ +
JSR CheckBoss
+
LDA.l ItemSources : BIT.w #$0010 : BEQ +
JSR CheckPrize
+
.done
PLA : STA.b $0E
PLA : STA.b $06
PLY : PLX : PLB
PLP
LDA.b $02
RTL
CheckChests:
LDA.b $CA
AND.w #$00FF
STA.b $00
ASL A
TAX
LDA.w #($81<<8)
PHA
PLB : PLB
LDA.w #$0008
STA.b $04
STZ.b $06
LDY.w #$FFFD
.increment_mask
LDA.b $04
ASL A
STA.b $04
.next_chest
INY #3
CPY.w #$01F8
BCS .done
LDA.w RoomData_ChestItems, Y
AND.w #$7FFF
CMP.b $00
BNE .next_chest
LDA.b $06
JSR CheckChestSection
INC.b $06
BCC .increment_mask
LDA.l SaveDataWRAM, X
AND.b $04
BNE .increment_mask ; already got item
LDA.w RoomData_ChestItems+2, Y
AND.w #$00FF
JSR GetLootClass
BRA .increment_mask
.done
RTS
CheckBoss:
; we assume all bosses are in section 1 of split sections
; mainly to simplify hera cage key and GT torch
; which use the same flow
; and bosses are always in their own section anyway
LDA.b $CA
AND.w #$F000
XBA
CMP.w #$0020
BCC +
RTS
+
LDA.b $CA
AND.w #$00FF
STA.b $04
LDX.w #$FFFA
.next_boss
INX #6
LDA.l MiscLocations, X
BPL .check
RTS
.check
CMP.b $04
BNE .next_boss
TXY
CMP.b RoomIndex
BEQ .current_room
ASL A
TAX
LDA.l SaveDataWRAM, X
BRA .continue
.current_room
LDA.w RoomItemsTaken ; if checking our current room, $0403 has fresher flags
ASL #4
.continue
STA.b $04
TYX
LDA.l MiscLocations+2, X ; get bit of room data to check
AND.w #$00FF
ASL A
TAX
LDA.l DungeonMask, X
TYX
BIT.b $04
BNE .next_boss ; continue checking if we already got the item
LDA.l MiscLocations+4, X
STA.b $05
LDA.l MiscLocations+3, X
STA.b $04
LDA.b [$04]
AND.w #$00FF
JSR GetLootClass
BRA .next_boss
CheckPrize:
LDA.b $CA
AND.w #$00FF
STA.b $04
LDX.w #$FFFD
.next_prize
INX #3
LDA.l PrizeLocations, X
BPL .check
RTS
.check
CMP.b $04
BNE .next_prize
TXY
ASL A
TAX
LDA.l SaveDataWRAM, X
TYX
BIT.w #$0800
BNE .next_prize
LDA.l PrizeLocations+2, X ; get which prize to look at
AND.w #$00FF
TAX
LDA.l DungeonPrizeReceiptID, X
TYX
AND.w #$00FF
JSR GetLootClass
BRA .next_prize
CheckPots:
LDA.b $CA
AND.w #$00FF
ASL A
TAX
LDA.l UWPotsPointers, X
STA.b $04
LDA.w #bank(UWPotsData)
STA.b $06
LDY.w #$0000
LDX.w #$FFFF
.next_pot
LDA.b [$04], Y
CMP.w #$FFFF : BEQ .done
INX : INY : INY
BIT.w #$4000 : BNE .multi_item ; marked as multi item
BIT.w #$8000 : BNE .major_item ; marked as major item
LDA.b [$04], Y
AND.w #$00FF
CMP.w #$0008 : BEQ .small_key
LDA.l PotCountMode
BEQ +
JSR CheckJunkPot
+
INY
BRA .next_pot
.small_key
LDA.w #$8000 : STA.b $08
LDA.w #$0024
PHA
PHX
INY
BRA .mask_set
.multi_item
LDA.b [$04], Y
PHX
AND.w #$00FF
ASL A
TAX
LDA.l PotMultiWorldTable, X
PLX
BRA .item_id_set
.major_item
LDA.b [$04], Y
.item_id_set
PHA
PHX
INY
TXA : ASL A
TAX
LDA.l DungeonMask, X : STA.b $08
TXA : LSR A : TAX
.mask_set
TXA
JSR CheckPotSection
BCS +
PLX
PLA
BRA .next_pot
+
LDA.b $CA
AND.w #$00FF
ASL A
TAX
if !FEATURE_FIX_BASEROM
LDA.l SpriteDropData, X
else
LDA.l RoomPotData, X
endif
PLX
AND.b $08
BEQ .not_obtained
PLA
BRA .next_pot
.not_obtained
PLA
AND.w #$00FF
JSR GetLootClass
BRA .next_pot
.done
RTS
CheckJunkPot:
LDA.b [$04], Y
PHA
PHX
TXA : ASL A : TAX
LDA.l DungeonMask, X : STA.b $08
TXA : LSR A
JSR CheckPotSection
BCS +
PLX
PLA
RTS
+
LDA.b $CA
AND.w #$00FF
ASL A
TAX
LDA.l PotCollectionRateTable, X
AND.b $08
BEQ .not_important
if !FEATURE_FIX_BASEROM
LDA.l SpriteDropData, X
else
LDA.l RoomPotData, X
endif
AND.b $08
BNE .not_important
PLX
PLA
AND.w #$00FF
JSR GetPotJunkClass
RTS
.not_important
PLX
PLA
RTS
CheckEnemies:
LDA.b $CA
AND.w #$00FF
ASL A
TAX
; get sprite pointer table
LDA.l $89C298 : STA.b $04
LDA.w #$0089 : STA.b $06
TXY
; get sprite pointer for room
LDA.b [$04], Y
INC A ; skip the layered/unlayered indicator
STA.b $04
LDA.w #bank(UWSpritesData)
STA.b $06
LDY.w #$0000
LDX.w #$FFFF
.next_enemy
LDA.b [$04], Y
AND.w #$00FF
CMP.w #$00FF
BNE +
JMP .done
+
LDA.b [$04], Y
AND.w #$E000
CMP.w #$E000
BEQ .overlord
INY : INY
LDA.b [$04], Y
AND.w #$00FF
CMP.w #$00F8 : BEQ .major ; major item
CMP.w #$00F9 : BEQ .major ; major item in other world
CMP.w #$00E4 : BEQ .vanilla_key
INY
INX
BRA .next_enemy
.overlord
INY : INY : INY
BRA .next_enemy
.vanilla_key
DEY : DEY
LDA.w #$8000 : STA.b $08
LDA.b [$04], Y
INY #3
AND.w #$00FF
CMP.w #$00FD ; big key
BEQ .big_key
CMP.w #$00FE ; small key
BEQ .small_key
; false alarm -- probably hera basement key
INX ; since it's an actual sprite it advances the counter
BRA .next_enemy
.small_key
LDA.w #$0024
PHA : PHX
BRA .mask_set
.big_key
LDA.w #$0032
PHA : PHX
BRA .mask_set
.major
DEY : DEY
LDA.b [$04], Y
AND.w #$00FF
.proceed
INY : INY : INY
PHA
PHX
TXA : ASL A
TAX
LDA.l DungeonMask, X : STA.b $08
TXA : LSR A : TAX
.mask_set
TXA
JSR CheckEnemySection
BCS +
PLX
PLA
JMP .next_enemy
+
LDA.b $CA
AND.w #$00FF
ASL A
TAX
LDA.l SpriteDropData, X
PLX
AND.b $08
BEQ .not_obtained
PLA
JMP .next_enemy
.not_obtained
PLA
AND.w #$00FF
JSR GetLootClass
JMP .next_enemy
.done
RTS
; A = item id
; updates "best loot" value if better
GetLootClass:
PHX
TAX
CMP.w #$0025 : BEQ .compass
AND.w #$00F0
CMP.w #$0080 : BNE .not_compass
.compass
LDA.l AlwaysShowCompass : BNE .check_value
.not_compass
LDA.b $0E
BEQ .done
CMP.w #$0001
BEQ .value_set
.check_value
LDA.l LootTypeMapping, X
AND.w #$00FF
.value_set
CMP.b $02
BCC .done
STA.b $02
.done
PLX
RTS
; A = item id
; updates "best loot" value if better
GetPotJunkClass:
PHX
TAX
LDA.b $0E
BEQ .done
CMP.w #$0001
BEQ .value_set
; hardcode as junk for now
LDA.w #$0002
.value_set
CMP.b $02
BCC .done
STA.b $02
.done
PLX
RTS
macro DefineGetFooSection(type, offset)
Get<type>Section:
PHX
LDA.b $CA
AND.w #$00FF
ASL A
TAX
LDA.l SplitRooms, X
TAX
LDA.l SplitRooms, X
AND.w #$00FF
STA.b $CE
BEQ .found
INX
.check_next_section
PHX
LDA.l SplitRooms+<offset>, X
TAX
-
LDA.l SplitRooms, X
AND.w #$00FF
CMP.w #$00FF
BEQ .not_this_section
CMP.b $CC
BEQ .plx_found
INX
BRA -
.not_this_section
PLX
TXA : CLC : ADC.w #$000D : TAX
DEC.b $CE
BNE .check_next_section
BRA .found
.plx_found
PLX
.found
PLX
LDA.b $CE
RTS
endmacro
macro DefineCheckFooSection(type)
Check<type>Section:
STA.b $CC
LDA.b $CB
AND.w #$00FF
BEQ .yes
JSR Get<type>Section
LDA.b $CB
AND.w #$00FF
LSR A : LSR A : LSR A : LSR A
DEC A
CMP.b $CE
BEQ .yes
.no
CLC
RTS
.yes
SEC
RTS
endmacro
%DefineGetFooSection(Door, 3)
%DefineGetFooSection(Stair, 5)
%DefineGetFooSection(Chest, 7)
%DefineGetFooSection(Pot, 9)
%DefineGetFooSection(Enemy, 11)
%DefineCheckFooSection(Door)
%DefineCheckFooSection(Stair)
%DefineCheckFooSection(Chest)
%DefineCheckFooSection(Pot)
%DefineCheckFooSection(Enemy)
GetIncomingStairSection:
PHX
AND.w #$0300
XBA
ASL A
TAX
LDA.l $8098D8, X
STA.b $CC
LDA.b $CA
AND.w #$00FF
ASL A
TAX
LDA.l SplitRooms, X
TAX
LDA.l SplitRooms, X
AND.w #$00FF
STA.b $CE
BEQ .found
INX
.check_next_section
LDA.l SplitRooms+0, X
AND.w #$00FF
AND.b $CC
BNE .found
TXA : CLC : ADC.w #$000D : TAX
DEC.b $CE
BNE .check_next_section
BRA .found
.found
PLX
LDA.b $CE
RTS
+43
View File
@@ -0,0 +1,43 @@
DoorConnectionTiles:
.vertical
dw $0000, $0000 ; $00
dw $01C0, $0000 ; $01 left -> left
dw $01D0, $01D1 ; $02 left -> middle
dw $81C3, $41C3 ; $03 left -> right
dw $81D0, $81D1 ; $04 middle -> left
dw $01C1, $41C1 ; $05 middle -> middle
dw $C1D1, $C1D0 ; $06 middle -> right
dw $01C3, $C1C3 ; $07 right -> left
dw $41D1, $41D0 ; $08 right -> middle
dw $0000, $01C0 ; $09 right -> right
dw $41C2, $41C1 ; $0A left-middle -> left-middle
dw $81D2, $C1D0 ; $0B left-middle -> left-right
dw $41D3, $81D3 ; $0C left-middle -> middle-right
dw $01D2, $41D0 ; $0D left-right -> left-middle
dw $01C0, $01C0 ; $0E left-right -> left-right
dw $01D0, $41D2 ; $0F left-right -> middle-right
dw $C1D3, $01D3 ; $10 middle-right -> left-middle
dw $81D0, $C1D2 ; $11 middle-right -> left-right
dw $01C1, $01C2 ; $12 middle-right -> middle-right
dw $41C2, $01C2 ; $13 triple -> triple
.horizontal
dw $0300, $0300 ; $00
dw $01C4, $0300 ; $01 top -> top
dw $C1D4, $C1D5 ; $02 top -> middle
dw $81C7, $41C7 ; $03 top -> bottom
dw $81D4, $81D5 ; $04 middle -> top
dw $01C5, $81C5 ; $05 middle -> middle
dw $01D5, $01D4 ; $06 middle -> bottom
dw $C1C7, $01C7 ; $07 bottom -> top
dw $41D5, $41D4 ; $08 bottom -> middle
dw $0300, $01C4 ; $09 bottom -> bottom
dw $41C6, $41C5 ; $0A top-middle -> top-middle
dw $41D6, $01D4 ; $0B top-middle -> top-bottom
dw $41D7, $81D7 ; $0C top-middle -> middle-bottom
dw $01D6, $41D4 ; $0D top-bottom -> top-middle
dw $01C4, $01C4 ; $0E top-bottom -> top-bottom
dw $C1D4, $81D6 ; $0F top-bottom -> middle-bottom
dw $C1D7, $01D7 ; $10 middle-bottom -> top-middle
dw $81D4, $C1D6 ; $11 middle-bottom -> top-bottom
dw $01C5, $01C6 ; $12 middle-bottom -> middle-bottom
dw $81C6, $01C6 ; $13 triple -> triple
+309
View File
@@ -0,0 +1,309 @@
DoorSlotsSprites:
; center
dw $48A8
; north
dw $2090, $20A8, $20C0
dw $2098, $20B8
; west
dw $3080, $4880, $6080
dw $3880, $5880
; south
dw $7090, $70A8, $70C0
dw $7098, $70B8
; east
dw $30D0, $48D0, $60D0
dw $38D0, $58D0
; stairs
dw $B080, $B098, $B0B0
; drop/warp
dw $B0D0
DoorSlotsBG1:
; center
dw $1135
; north
dw $1092, $1095, $1098
dw $1093, $1097
; west
dw $10D0, $1130, $1190
dw $10F0, $1170
; south
dw $11D2, $11D5, $11D8
dw $11D3, $11D7
; east
dw $10DA, $113A, $119A
dw $10FA, $117A
; stairs
dw $12D0, $12D3, $12D6
; drop/warp
dw $12DA
DoorSlotsBG2:
; center
dw $0000
; north
dw $FEBA, $FEC0, $FEC6
dw $FEBC, $FEC4
; west
dw $FF36, $FFF6, $00B6
dw $FF76, $0076
; south
dw $013A, $0140, $0146
dw $013C, $0144
; east
dw $FF4A, $000A, $00CA
dw $FF8A, $008A
; stairs
dw $0336, $033C, $0342
; drop/warp
dw $034A
DoorSlotSides:
db $02, $0C, $16, $20
DoorSlotOffsets:
db $02, $02, $06, $00
; up, left, down, right
NextCursorSlot:
db $80, $81, $82, $83
; top
db $FF, $C1, $00, $04
db $FF, $04, $00, $05
db $FF, $05, $00, $C3
db $FF, $01, $00, $02
db $FF, $02, $00, $03
; left
db $C0, $FF, $09, $00
db $09, $FF, $0A, $00
db $0A, $FF, $C2, $00
db $06, $FF, $07, $00
db $07, $FF, $08, $00
; bottom
db $00, $E1, $85, $0E
db $00, $0E, $85, $0F
db $00, $0F, $85, $E3
db $00, $0B, $85, $0C
db $00, $0C, $85, $0D
; right
db $E0, $00, $13, $FF
db $13, $00, $14, $FF
db $14, $00, $E2, $FF
db $10, $00, $11, $FF
db $11, $00, $12, $FF
; stairs
db $84, $18, $FF, $16
db $84, $15, $FF, $17
db $84, $16, $FF, $18
; drop/warp
db $84, $17, $FF, $15
NextCursorSpecial:
.center
db $02, $04, $05, $01, $03, $FF
db $07, $09, $0A, $06, $08, $FF
db $0C, $0E, $0F, $0B, $0D, $15, $16, $17, $18, $FF
db $11, $13, $14, $10, $12, $FF
db $0C, $0E, $0F, $0B, $0D, $00, $FF
db $17, $16, $15, $18, $FF
.center_offset
db $00, $06, $0C, $16, $1C, $23
.start_index
db $01, $06, $0B, $10, $15
.start_direction
db $03, $02, $03, $02, $03
.end_index
db $03, $08, $0D, $12, $18
.end_direction
db $01, $00, $01, $00, $01
SingleEdgeCurrentRoomConnectors:
.north
dw $01C0, $0300, $01C0, $0300, $01C0, $0300 ; left -> left
dw $01C1, $41C1, $81D0, $81D1, $01C0, $0300 ; left -> middle
dw $41D1, $41D0, $01C1, $41C1, $81D0, $81D1 ; left -> right
dw $01C0, $0300, $01D0, $01D1, $01C1, $41C1 ; middle -> left
dw $01C1, $41C1, $01C1, $41C1, $01C1, $41C1 ; middle -> middle
dw $0300, $01C0, $41D1, $41D0, $01C1, $41C1 ; middle -> right
dw $01D0, $01D1, $01C1, $41C1, $C1D1, $C1D0 ; right -> left
dw $01C1, $41C1, $C1D1, $C1D0, $0300, $01C0 ; right -> middle
dw $0300, $01C0, $0300, $01C0, $0300, $01C0 ; right -> right
.west
dw $01C4, $01C4, $01C4, $0300, $0300, $0300 ; top -> top
dw $01C5, $81D4, $01C4, $C1C5, $81D5, $0300 ; top -> middle
dw $41D5, $01C5, $81D4, $41D4, $C1C5, $81D5 ; top -> bottom
dw $01C4, $C1D4, $01C5, $0300, $C1D5, $C1C5 ; middle -> top
dw $01C5, $01C5, $01C5, $C1C5, $C1C5, $C1C5 ; middle -> middle
dw $0300, $41D5, $01C5, $01C4, $41D4, $C1C5 ; middle -> bottom
dw $C1D4, $01C5, $01D5, $C1D5, $C1C5, $01D4 ; bottom -> top
dw $01C5, $01D5, $0300, $C1C5, $01D4, $01C4 ; bottom -> middle
dw $0300, $0300, $0300, $01C4, $01C4, $01C4 ; bottom -> bottom
.south
dw $01C0, $0300, $01C0, $0300, $01C0, $0300 ; left -> left
dw $01C0, $0300, $01D0, $01D1, $01C1, $41C1 ; left -> middle
dw $01D0, $01D1, $01C1, $41C1, $C1D1, $C1D0 ; left -> right
dw $01C1, $41C1, $81D0, $81D1, $01C0, $0300 ; middle -> left
dw $01C1, $41C1, $01C1, $41C1, $01C1, $41C1 ; middle -> middle
dw $01C1, $41C1, $C1D1, $C1D0, $0300, $01C0 ; middle -> right
dw $41D1, $41D0, $01C1, $41C1, $81D0, $81D1 ; right -> left
dw $0300, $01C0, $41D1, $41D0, $01C1, $41C1 ; right -> middle
dw $0300, $01C0, $0300, $01C0, $0300, $01C0 ; right -> right
.east
dw $01C4, $01C4, $01C4, $0300, $0300, $0300 ; top -> top
dw $01C4, $C1D4, $01C5, $0300, $C1D5, $81C5 ; top -> middle
dw $C1D4, $01C5, $01D5, $C1D5, $81C5, $01D4 ; top -> bottom
dw $01C5, $81D4, $01C4, $81C5, $81D5, $0300 ; middle -> top
dw $01C5, $01C5, $01C5, $81C5, $81C5, $81C5 ; middle -> middle
dw $01C5, $01D5, $0300, $81C5, $01D4, $01C4 ; middle -> bottom
dw $41D5, $01C5, $81D4, $41D4, $81C5, $81D5 ; bottom -> top
dw $0300, $41D5, $01C5, $01C4, $41D4, $81C5 ; bottom -> middle
dw $0300, $0300, $0300, $01C4, $01C4, $01C4 ; bottom -> bottom
QuadrantMasks:
; north
dw $0008, $000C, $0004
; west
dw $0008, $000A, $0002
; south
dw $0002, $0003, $0001
; east
dw $0004, $0005, $0001
EntranceQuadrantMasks:
dw $0002
dw $0003
dw $0001
DropdownQuadrantMasks:
dw $0008
dw $000C
dw $0004
MultiConnectorMapping:
.two
db $02, $00
.three
db $02, $01, $00
MultiConnectorTiles:
.north
..two
dw $41C7, $81C7, $C1C7, $01C7
..three
dw $41C7, $01C4, $81F7, $C1F7, $01C4, $01C7
.west
..two
dw $81C7, $41C7, $C1C7, $01C7
..three
dw $81C7, $01C0, $41E7, $C1E7, $01C0, $01C7
.south
..two
dw $C1C7, $01C7, $41C7, $81C7
..three
dw $C1C7, $01C4, $01F7, $41F7, $01C4, $81C7
.east
..two
dw $C1C7, $01C7, $81C7, $41C7
..three
dw $C1C7, $01C0, $01E7, $81E7, $01C0, $41C7
.direction_index
db $00, $14, $28, $3C
.start_offset
..two
dw $FF7E, $FFBC, $00BE, $FFC6
..three
dw $FF7C, $FF7C, $00BC, $FF86
.increment
db $02, $40
EdgePositions:
.north
db $01, $00 ; HC Basement
db $02 ; Desert West Wing
db $00, $01, $02 ; Desert Lobby
db $00 ; Desert East Wing
db $01, $02 ; TT
db $00, $01 ; different TT
.west
db $02 ; TT Attic
db $02, $02 ; Desert North Hall
db $00, $02 ; HC Basement
db $00 ; Desert East Wing
db $02, $00 ; TT Triple
db $02 ; TT Big Key Chest
.south
db $01, $00 ; HC Basement
db $02 ; Desert West Wing
db $00, $01, $02 ; Desert Lobby
db $00 ; Desert East Wing
db $01, $02 ; TT
db $00, $01 ; different TT
.east
db $02 ; TT Attic
db $02, $02 ; Desert North Hall
db $02, $00 ; HC Basement
db $00 ; Desert East Wing
db $02, $00 ; TT Triple
db $02 ; TT Big Key Chest
EdgeConnectionIndices:
; North
dw $0182, $0000
dw $0082, $0003
dw $0283, $0006
dw $0084, $0009
dw $0184, $000C
dw $0284, $000F
dw $0085, $0012
dw $01DB, $0015
dw $02DB, $0018
dw $00DC, $001B
dw $01DC, $001E
; South
dw $0772, $0021
dw $0672, $0024
dw $0873, $0027
dw $0674, $002A
dw $0774, $002D
dw $0874, $0030
dw $0675, $0033
dw $07CB, $0036
dw $08CB, $0039
dw $06CC, $003C
dw $07CC, $003F
; West
dw $0565, $0042
dw $0574, $0045
dw $0575, $0048
dw $0582, $004B
dw $0382, $004E
dw $0385, $0051
dw $05CC, $0054
dw $03CC, $0057
dw $05DC, $005A
; East
dw $0B64, $005D
dw $0B73, $0060
dw $0B74, $0063
dw $0981, $0066
dw $0B81, $0069
dw $0984, $006C
dw $0BCB, $006F
dw $09CB, $0072
dw $0BDB, $0075
dw $FFFF
InRoomConnectionIndices:
dw $020B, $0000
dw $081B, $0002
dw $023F, $0004
dw $081F, $0006
dw $007E, $0008
dw $065E, $000A
dw $0296, $000C
dw $083D, $000E
dw $FFFF
+26
View File
@@ -0,0 +1,26 @@
dw $200C
dw $100E
dw $2012
dw $1023
dw $1024
dw $2028
dw $204A
dw $4056
dw $4057
dw $4058
dw $4059
dw $1060
dw $2061
dw $4062
dw $4063
dw $2077
dw $4083
dw $2084
dw $1085
dw $4098
dw $20C9
dw $40D5
dw $10D6
dw $20DB
dw $40E0
dw $FFFF
+38
View File
@@ -0,0 +1,38 @@
FallTable:
dw $1007, $1017 ; Moldorm Arena
dw $1017, $1027 ; Below Moldorm drop to Big Chest
dw $101E, $103E ; IP first drop
dw $1027, $1031 ; ToH Big Chest drop
dw $1031, $1077 ; Second Floor ToH
dw $1039, $1029 ; Mothula drop
dw $103A, $100A ; Pod front drop
dw $103D, $1096 ; GT Torches drop
dw $104D, $10A6 ; Moldorm 2 drop
dw $1054, $1034 ; Left side Swamp
dw $105E, $107E ; IP drop to tall icy room
dw $107E, $109E ; Freezors drop (to big chest)
dw $208C, $101C ; Ice Armos drop
dw $1097, $10D1 ; Mire Cutscene
dw $109E, $10BE ; IP Big Chest tile (push blocks)
dw $10CE, $10DE ; Kholdstare drop
; db $65, $AC ; TT Attic
; db $77, $A7 ; ToH drop to fairy room (Herapot)
; db $A9, $89 ; EP drop to fairy room
; db $BE, $4F ; IP drop to fairy room
dw $FFFF
WarpTable:
dw $2009, $104B ; PoD Basement (start)
dw $100A, $1009 ; PoD Stalfos Basement
dw $100B, $206A ; PoD Turtle Room to Boss
dw $104B, $2009 ; PoD Basement (mimics)
dw $207B, $209D ; GT post-compass island hardhat
dw $207D, $109B ; GT warp maze
dw $109D, $307B ; GT compass room
dw $109B, $207D ; GT warp maze
dw $10B1, $20B2 ; South of Fishbone warp
dw $10D1, $10B1 ; Mire Big Key Chest warp
; db $89, $A9 ; EP Fairy Room
; db $A7, $17 ; ToH Fairy Room
; db $4F, $BE ; IP Fairy Room
dw $FFFF
+276
View File
@@ -0,0 +1,276 @@
!TIER_UNKNOWN = $01
!TIER_JUNK = $02
!TIER_LOW_KEY = $03
!TIER_HEALTH = $05
!TIER_MINOR = $06
!TIER_MAP = $07
!TIER_COMPASS = $08
!TIER_SM_KEY = $09
!TIER_BIG_KEY = $0A
!TIER_MAJOR = $0B
!TIER_PENDANT = $0C
!TIER_CRYSTAL = $0D
!TIER_TFP = $0E
!TIER_TFORCE = $0F
db !TIER_MAJOR ; 00 - Fighter Sword and Shield
db !TIER_MAJOR ; 01 - Master Sword
db !TIER_MAJOR ; 02 - Tempered Sword
db !TIER_MAJOR ; 03 - Butter Sword
db !TIER_JUNK ; 04 - Fighter Shield
db !TIER_MINOR ; 05 - Fire Shield
db !TIER_MINOR ; 06 - Mirror Shield
db !TIER_MAJOR ; 07 - Fire Rod
db !TIER_MAJOR ; 08 - Ice Rod
db !TIER_MAJOR ; 09 - Hammer
db !TIER_MAJOR ; 0A - Hookshot
db !TIER_MAJOR ; 0B - Bow
db !TIER_MINOR ; 0C - Boomerang
db !TIER_MINOR ; 0D - Powder
db !TIER_JUNK ; 0E - Bottle Refill (bee)
db !TIER_MAJOR ; 0F - Bombos
db !TIER_MAJOR ; 10 - Ether
db !TIER_MAJOR ; 11 - Quake
db !TIER_MAJOR ; 12 - Lamp
db !TIER_MINOR ; 13 - Shovel
db !TIER_MAJOR ; 14 - Flute
db !TIER_MAJOR ; 15 - Somaria
db !TIER_MINOR ; 16 - Bottle
db !TIER_HEALTH ; 17 - Heartpiece
db !TIER_MINOR ; 18 - Byrna
db !TIER_MINOR ; 19 - Cape
db !TIER_MAJOR ; 1A - Mirror
db !TIER_MAJOR ; 1B - Glove
db !TIER_MAJOR ; 1C - Mitts
db !TIER_MAJOR ; 1D - Book
db !TIER_MAJOR ; 1E - Flippers
db !TIER_MAJOR ; 1F - Pearl
db !TIER_CRYSTAL ; 20 - Crystal
db !TIER_MINOR ; 21 - Net
db !TIER_MINOR ; 22 - Blue Mail
db !TIER_MINOR ; 23 - Red Mail
db !TIER_LOW_KEY ; 24 - Small Key
db !TIER_COMPASS ; 25 - Compass
db !TIER_HEALTH ; 26 - Heart Container from 4/4
db !TIER_JUNK ; 27 - Bomb
db !TIER_JUNK ; 28 - 3 bombs
db !TIER_MINOR ; 29 - Mushroom
db !TIER_MINOR ; 2A - Red boomerang
db !TIER_MINOR ; 2B - Full bottle (red)
db !TIER_MINOR ; 2C - Full bottle (green)
db !TIER_MINOR ; 2D - Full bottle (blue)
db !TIER_HEALTH ; 2E - Potion refill (red)
db !TIER_HEALTH ; 2F - Potion refill (green)
db !TIER_HEALTH ; 30 - Potion refill (blue)
db !TIER_JUNK ; 31 - 10 bombs
db !TIER_BIG_KEY ; 32 - Big key
db !TIER_MAP ; 33 - Map
db !TIER_JUNK ; 34 - 1 rupee
db !TIER_JUNK ; 35 - 5 rupees
db !TIER_JUNK ; 36 - 20 rupees
db !TIER_PENDANT ; 37 - Green pendant
db !TIER_PENDANT ; 38 - Blue pendant
db !TIER_PENDANT ; 39 - Red pendant
db !TIER_MAJOR ; 3A - Tossed bow
db !TIER_MAJOR ; 3B - Silvers
db !TIER_MINOR ; 3C - Full bottle (bee)
db !TIER_MINOR ; 3D - Full bottle (fairy)
db !TIER_HEALTH ; 3E - Boss heart
db !TIER_HEALTH ; 3F - Sanc heart
db !TIER_JUNK ; 40 - 100 rupees
db !TIER_JUNK ; 41 - 50 rupees
db !TIER_JUNK ; 42 - Heart
db !TIER_JUNK ; 43 - Arrow
db !TIER_JUNK ; 44 - 10 arrows
db !TIER_JUNK ; 45 - Small magic
db !TIER_JUNK ; 46 - 300 rupees
db !TIER_JUNK ; 47 - 20 rupees green
db !TIER_MINOR ; 48 - Full bottle (good bee)
db !TIER_MAJOR ; 49 - Tossed fighter sword
db !TIER_MAJOR ; 4A - Active Flute
db !TIER_MAJOR ; 4B - Boots
db !TIER_MINOR ; 4C - Bomb capacity (50)
db !TIER_MINOR ; 4D - Arrow capacity (70)
db !TIER_MINOR ; 4E - 1/2 magic
db !TIER_MINOR ; 4F - 1/4 magic
db !TIER_MAJOR ; 50 - Safe master sword
db !TIER_MINOR ; 51 - Bomb capacity (+5)
db !TIER_MINOR ; 52 - Bomb capacity (+10)
db !TIER_MINOR ; 53 - Arrow capacity (+5)
db !TIER_MINOR ; 54 - Arrow capacity (+10)
db !TIER_JUNK ; 55 - Programmable item 1
db !TIER_JUNK ; 56 - Programmable item 2
db !TIER_JUNK ; 57 - Programmable item 3
db !TIER_MAJOR ; 58 - Upgrade-only silver arrows
db !TIER_JUNK ; 59 - Rupoor
db !TIER_JUNK ; 5A - Nothing
db !TIER_JUNK ; 5B - Red clock
db !TIER_JUNK ; 5C - Blue clock
db !TIER_JUNK ; 5D - Green clock
db !TIER_MAJOR ; 5E - Progressive sword
db !TIER_MINOR ; 5F - Progressive shield
db !TIER_MINOR ; 60 - Progressive armor
db !TIER_MAJOR ; 61 - Progressive glove
db !TIER_JUNK ; 62 - RNG pool item (single)
db !TIER_JUNK ; 63 - RNG pool item (multi)
db !TIER_MAJOR ; 64 - Progressive bow
db !TIER_MAJOR ; 65 - Progressive bow
db !TIER_JUNK ; 66 -
db !TIER_JUNK ; 67 -
db !TIER_JUNK ; 68 -
db !TIER_JUNK ; 69 -
db !TIER_TFORCE ; 6A - Triforce
db !TIER_TFP ; 6B - Power star
db !TIER_TFP ; 6C - Triforce Piece
db !TIER_JUNK ; 6D - Server request item
db !TIER_JUNK ; 6E - Server request item (dungeon drop)
db !TIER_JUNK ; 6F -
db !TIER_MAP ; 70 - Map of Light World
db !TIER_MAP ; 71 - Map of Dark World
db !TIER_MAP ; 72 - Map of Ganon's Tower
db !TIER_MAP ; 73 - Map of Turtle Rock
db !TIER_MAP ; 74 - Map of Thieves' Town
db !TIER_MAP ; 75 - Map of Tower of Hera
db !TIER_MAP ; 76 - Map of Ice Palace
db !TIER_MAP ; 77 - Map of Skull Woods
db !TIER_MAP ; 78 - Map of Misery Mire
db !TIER_MAP ; 79 - Map of Dark Palace
db !TIER_MAP ; 7A - Map of Swamp Palace
db !TIER_MAP ; 7B - Map of Agahnim's Tower
db !TIER_MAP ; 7C - Map of Desert Palace
db !TIER_MAP ; 7D - Map of Eastern Palace
db !TIER_MAP ; 7E - Map of Hyrule Castle
db !TIER_MAP ; 7F - Map of Sewers
db !TIER_COMPASS ; 80 - Compass of Light World
db !TIER_COMPASS ; 81 - Compass of Dark World
db !TIER_COMPASS ; 82 - Compass of Ganon's Tower
db !TIER_COMPASS ; 83 - Compass of Turtle Rock
db !TIER_COMPASS ; 84 - Compass of Thieves' Town
db !TIER_COMPASS ; 85 - Compass of Tower of Hera
db !TIER_COMPASS ; 86 - Compass of Ice Palace
db !TIER_COMPASS ; 87 - Compass of Skull Woods
db !TIER_COMPASS ; 88 - Compass of Misery Mire
db !TIER_COMPASS ; 89 - Compass of Dark Palace
db !TIER_COMPASS ; 8A - Compass of Swamp Palace
db !TIER_COMPASS ; 8B - Compass of Agahnim's Tower
db !TIER_COMPASS ; 8C - Compass of Desert Palace
db !TIER_COMPASS ; 8D - Compass of Eastern Palace
db !TIER_COMPASS ; 8E - Compass of Hyrule Castle
db !TIER_COMPASS ; 8F - Compass of Sewers
db !TIER_BIG_KEY ; 90 - Skull key
db !TIER_BIG_KEY ; 91 - Reserved
db !TIER_BIG_KEY ; 92 - Big key of Ganon's Tower
db !TIER_BIG_KEY ; 93 - Big key of Turtle Rock
db !TIER_BIG_KEY ; 94 - Big key of Thieves' Town
db !TIER_BIG_KEY ; 95 - Big key of Tower of Hera
db !TIER_BIG_KEY ; 96 - Big key of Ice Palace
db !TIER_BIG_KEY ; 97 - Big key of Skull Woods
db !TIER_BIG_KEY ; 98 - Big key of Misery Mire
db !TIER_BIG_KEY ; 99 - Big key of Dark Palace
db !TIER_BIG_KEY ; 9A - Big key of Swamp Palace
db !TIER_BIG_KEY ; 9B - Big key of Agahnim's Tower
db !TIER_BIG_KEY ; 9C - Big key of Desert Palace
db !TIER_BIG_KEY ; 9D - Big key of Eastern Palace
db !TIER_BIG_KEY ; 9E - Big key of Hyrule Castle
db !TIER_BIG_KEY ; 9F - Big key of Sewers
db !TIER_SM_KEY ; A0 - Small key of Sewers
db !TIER_SM_KEY ; A1 - Small key of Hyrule Castle
db !TIER_SM_KEY ; A2 - Small key of Eastern Palace
db !TIER_SM_KEY ; A3 - Small key of Desert Palace
db !TIER_SM_KEY ; A4 - Small key of Agahnim's Tower
db !TIER_SM_KEY ; A5 - Small key of Swamp Palace
db !TIER_SM_KEY ; A6 - Small key of Dark Palace
db !TIER_SM_KEY ; A7 - Small key of Misery Mire
db !TIER_SM_KEY ; A8 - Small key of Skull Woods
db !TIER_SM_KEY ; A9 - Small key of Ice Palace
db !TIER_SM_KEY ; AA - Small key of Tower of Hera
db !TIER_SM_KEY ; AB - Small key of Thieves' Town
db !TIER_SM_KEY ; AC - Small key of Turtle Rock
db !TIER_SM_KEY ; AD - Small key of Ganon's Tower
db !TIER_JUNK ; AE - Reserved
db !TIER_LOW_KEY ; AF - Generic small key
db !TIER_CRYSTAL ; B0 - Crystal 6
db !TIER_CRYSTAL ; B1 - Crystal 1
db !TIER_CRYSTAL ; B2 - Crystal 5
db !TIER_CRYSTAL ; B3 - Crystal 7
db !TIER_CRYSTAL ; B4 - Crystal 2
db !TIER_CRYSTAL ; B5 - Crystal 4
db !TIER_CRYSTAL ; B6 - Crystal 3
db !TIER_JUNK ; B7 - Reserved
db !TIER_JUNK ; B8 -
db !TIER_JUNK ; B9 -
db !TIER_JUNK ; BA -
db !TIER_JUNK ; BB -
db !TIER_JUNK ; BC -
db !TIER_JUNK ; BD -
db !TIER_JUNK ; BE -
db !TIER_JUNK ; BF -
db !TIER_JUNK ; C0 -
db !TIER_JUNK ; C1 -
db !TIER_JUNK ; C2 -
db !TIER_JUNK ; C3 -
db !TIER_JUNK ; C4 -
db !TIER_JUNK ; C5 -
db !TIER_JUNK ; C6 -
db !TIER_JUNK ; C7 -
db !TIER_JUNK ; C8 -
db !TIER_JUNK ; C9 -
db !TIER_JUNK ; CA -
db !TIER_JUNK ; CB -
db !TIER_JUNK ; CC -
db !TIER_JUNK ; CD -
db !TIER_JUNK ; CE -
db !TIER_JUNK ; CF -
db !TIER_JUNK ; D0 - Bee trap
db !TIER_JUNK ; D1 - Apples
db !TIER_JUNK ; D2 - Fairy
db !TIER_JUNK ; D3 - Chicken
db !TIER_JUNK ; D4 - Big Magic
db !TIER_JUNK ; D5 - 5 Arrows
db !TIER_JUNK ; D6 - Good Bee
db !TIER_JUNK ; D7 -
db !TIER_JUNK ; D8 -
db !TIER_JUNK ; D9 -
db !TIER_JUNK ; DA -
db !TIER_JUNK ; DB -
db !TIER_JUNK ; DC -
db !TIER_JUNK ; DD -
db !TIER_JUNK ; DE -
db !TIER_JUNK ; DF -
db !TIER_JUNK ; E0 -
db !TIER_JUNK ; E1 -
db !TIER_JUNK ; E2 -
db !TIER_JUNK ; E3 -
db !TIER_JUNK ; E4 -
db !TIER_JUNK ; E5 -
db !TIER_JUNK ; E6 -
db !TIER_JUNK ; E7 -
db !TIER_JUNK ; E8 -
db !TIER_JUNK ; E9 -
db !TIER_JUNK ; EA -
db !TIER_JUNK ; EB -
db !TIER_JUNK ; EC -
db !TIER_JUNK ; ED -
db !TIER_JUNK ; EE -
db !TIER_JUNK ; EF -
db !TIER_JUNK ; F0 -
db !TIER_JUNK ; F1 -
db !TIER_JUNK ; F2 -
db !TIER_JUNK ; F3 -
db !TIER_JUNK ; F4 -
db !TIER_JUNK ; F5 -
db !TIER_JUNK ; F6 -
db !TIER_JUNK ; F7 -
db !TIER_JUNK ; F8 -
db !TIER_JUNK ; F9 -
db !TIER_JUNK ; FA -
db !TIER_JUNK ; FB -
db !TIER_JUNK ; FC -
db !TIER_JUNK ; FD -
db !TIER_JUNK ; FE - Server request (async)
db !TIER_JUNK ; FF -
+261
View File
@@ -0,0 +1,261 @@
db $00 ; 00 - Fighter Sword and Shield
db $00 ; 01 - Master Sword
db $00 ; 02 - Tempered Sword
db $00 ; 03 - Butter Sword
db $00 ; 04 - Fighter Shield
db $00 ; 05 - Fire Shield
db $00 ; 06 - Mirror Shield
db $00 ; 07 - Fire Rod
db $00 ; 08 - Ice Rod
db $00 ; 09 - Hammer
db $00 ; 0A - Hookshot
db $00 ; 0B - Bow
db $00 ; 0C - Boomerang
db $00 ; 0D - Powder
db $00 ; 0E - Bottle Refill (bee)
db $00 ; 0F - Bombos
db $00 ; 10 - Ether
db $00 ; 11 - Quake
db $00 ; 12 - Lamp
db $00 ; 13 - Shovel
db $00 ; 14 - Flute
db $00 ; 15 - Somaria
db $00 ; 16 - Bottle
db $00 ; 17 - Heartpiece
db $00 ; 18 - Byrna
db $00 ; 19 - Cape
db $00 ; 1A - Mirror
db $00 ; 1B - Glove
db $00 ; 1C - Mitts
db $00 ; 1D - Book
db $00 ; 1E - Flippers
db $00 ; 1F - Pearl
db $00 ; 20 - Crystal
db $00 ; 21 - Net
db $00 ; 22 - Blue Mail
db $00 ; 23 - Red Mail
db $00 ; 24 - Small Key
db $00 ; 25 - Compass
db $00 ; 26 - Heart Container from 4/4
db $01 ; 27 - Bomb
db $01 ; 28 - 3 bombs
db $00 ; 29 - Mushroom
db $00 ; 2A - Red boomerang
db $00 ; 2B - Full bottle (red)
db $00 ; 2C - Full bottle (green)
db $00 ; 2D - Full bottle (blue)
db $00 ; 2E - Potion refill (red)
db $00 ; 2F - Potion refill (green)
db $00 ; 30 - Potion refill (blue)
db $01 ; 31 - 10 bombs
db $00 ; 32 - Big key
db $00 ; 33 - Map
db $01 ; 34 - 1 rupee
db $01 ; 35 - 5 rupees
db $01 ; 36 - 20 rupees
db $00 ; 37 - Green pendant
db $00 ; 38 - Blue pendant
db $00 ; 39 - Red pendant
db $00 ; 3A - Tossed bow
db $00 ; 3B - Silvers
db $00 ; 3C - Full bottle (bee)
db $00 ; 3D - Full bottle (fairy)
db $00 ; 3E - Boss heart
db $00 ; 3F - Sanc heart
db $01 ; 40 - 100 rupees
db $01 ; 41 - 50 rupees
db $01 ; 42 - Heart
db $01 ; 43 - Arrow
db $01 ; 44 - 10 arrows
db $01 ; 45 - Small magic
db $01 ; 46 - 300 rupees
db $01 ; 47 - 20 rupees green
db $00 ; 48 - Full bottle (good bee)
db $00 ; 49 - Tossed fighter sword
db $00 ; 4A - Active Flute
db $00 ; 4B - Boots
db $00 ; 4C - Bomb capacity (50)
db $00 ; 4D - Arrow capacity (70)
db $00 ; 4E - 1/2 magic
db $00 ; 4F - 1/4 magic
db $00 ; 50 - Safe master sword
db $00 ; 51 - Bomb capacity (+5)
db $00 ; 52 - Bomb capacity (+10)
db $00 ; 53 - Arrow capacity (+5)
db $00 ; 54 - Arrow capacity (+10)
db $00 ; 55 - Programmable item 1
db $00 ; 56 - Programmable item 2
db $00 ; 57 - Programmable item 3
db $00 ; 58 - Upgrade-only silver arrows
db $01 ; 59 - Rupoor
db $01 ; 5A - Nothing
db $00 ; 5B - Red clock
db $00 ; 5C - Blue clock
db $00 ; 5D - Green clock
db $00 ; 5E - Progressive sword
db $00 ; 5F - Progressive shield
db $00 ; 60 - Progressive armor
db $00 ; 61 - Progressive glove
db $00 ; 62 - RNG pool item (single)
db $00 ; 63 - RNG pool item (multi)
db $00 ; 64 - Progressive bow
db $00 ; 65 - Progressive bow
db $00 ; 66 -
db $00 ; 67 -
db $00 ; 68 -
db $00 ; 69 -
db $00 ; 6A - Triforce
db $01 ; 6B - Power star
db $01 ; 6C - Triforce Piece
db $00 ; 6D - Server request item
db $00 ; 6E - Server request item (dungeon drop)
db $00 ; 6F -
db $00 ; 70 - Map of Light World
db $00 ; 71 - Map of Dark World
db $00 ; 72 - Map of Ganon's Tower
db $00 ; 73 - Map of Turtle Rock
db $00 ; 74 - Map of Thieves' Town
db $00 ; 75 - Map of Tower of Hera
db $00 ; 76 - Map of Ice Palace
db $00 ; 77 - Map of Skull Woods
db $00 ; 78 - Map of Misery Mire
db $00 ; 79 - Map of Dark Palace
db $00 ; 7A - Map of Swamp Palace
db $00 ; 7B - Map of Agahnim's Tower
db $00 ; 7C - Map of Desert Palace
db $00 ; 7D - Map of Eastern Palace
db $00 ; 7E - Map of Hyrule Castle
db $00 ; 7F - Map of Sewers
db $00 ; 80 - Compass of Light World
db $00 ; 81 - Compass of Dark World
db $00 ; 82 - Compass of Ganon's Tower
db $00 ; 83 - Compass of Turtle Rock
db $00 ; 84 - Compass of Thieves' Town
db $00 ; 85 - Compass of Tower of Hera
db $00 ; 86 - Compass of Ice Palace
db $00 ; 87 - Compass of Skull Woods
db $00 ; 88 - Compass of Misery Mire
db $00 ; 89 - Compass of Dark Palace
db $00 ; 8A - Compass of Swamp Palace
db $00 ; 8B - Compass of Agahnim's Tower
db $00 ; 8C - Compass of Desert Palace
db $00 ; 8D - Compass of Eastern Palace
db $00 ; 8E - Compass of Hyrule Castle
db $00 ; 8F - Compass of Sewers
db $00 ; 90 - Skull key
db $00 ; 91 - Reserved
db $00 ; 92 - Big key of Ganon's Tower
db $00 ; 93 - Big key of Turtle Rock
db $00 ; 94 - Big key of Thieves' Town
db $00 ; 95 - Big key of Tower of Hera
db $00 ; 96 - Big key of Ice Palace
db $00 ; 97 - Big key of Skull Woods
db $00 ; 98 - Big key of Misery Mire
db $00 ; 99 - Big key of Dark Palace
db $00 ; 9A - Big key of Swamp Palace
db $00 ; 9B - Big key of Agahnim's Tower
db $00 ; 9C - Big key of Desert Palace
db $00 ; 9D - Big key of Eastern Palace
db $00 ; 9E - Big key of Hyrule Castle
db $00 ; 9F - Big key of Sewers
db $00 ; A0 - Small key of Sewers
db $00 ; A1 - Small key of Hyrule Castle
db $00 ; A2 - Small key of Eastern Palace
db $00 ; A3 - Small key of Desert Palace
db $00 ; A4 - Small key of Agahnim's Tower
db $00 ; A5 - Small key of Swamp Palace
db $00 ; A6 - Small key of Dark Palace
db $00 ; A7 - Small key of Misery Mire
db $00 ; A8 - Small key of Skull Woods
db $00 ; A9 - Small key of Ice Palace
db $00 ; AA - Small key of Tower of Hera
db $00 ; AB - Small key of Thieves' Town
db $00 ; AC - Small key of Turtle Rock
db $00 ; AD - Small key of Ganon's Tower
db $00 ; AE - Reserved
db $00 ; AF - Generic small key
db $00 ; B0 - Crystal 6
db $00 ; B1 - Crystal 1
db $00 ; B2 - Crystal 5
db $00 ; B3 - Crystal 7
db $00 ; B4 - Crystal 2
db $00 ; B5 - Crystal 4
db $00 ; B6 - Crystal 3
db $00 ; B7 - Reserved
db $00 ; B8 -
db $00 ; B9 -
db $00 ; BA -
db $00 ; BB -
db $00 ; BC -
db $00 ; BD -
db $00 ; BE -
db $00 ; BF -
db $00 ; C0 -
db $00 ; C1 -
db $00 ; C2 -
db $00 ; C3 -
db $00 ; C4 -
db $00 ; C5 -
db $00 ; C6 -
db $00 ; C7 -
db $00 ; C8 -
db $00 ; C9 -
db $00 ; CA -
db $00 ; CB -
db $00 ; CC -
db $00 ; CD -
db $00 ; CE -
db $00 ; CF -
db $01 ; D0 - Bee trap
db $01 ; D1 - Apples
db $01 ; D2 - Fairy
db $01 ; D3 - Chicken
db $01 ; D4 - Big Magic
db $01 ; D5 - 5 Arrows
db $01 ; D6 - Good Bee
db $00 ; D7 -
db $00 ; D8 -
db $00 ; D9 -
db $00 ; DA -
db $00 ; DB -
db $00 ; DC -
db $00 ; DD -
db $00 ; DE -
db $00 ; DF -
db $00 ; E0 -
db $00 ; E1 -
db $00 ; E2 -
db $00 ; E3 -
db $00 ; E4 -
db $00 ; E5 -
db $00 ; E6 -
db $00 ; E7 -
db $00 ; E8 -
db $00 ; E9 -
db $00 ; EA -
db $00 ; EB -
db $00 ; EC -
db $00 ; ED -
db $00 ; EE -
db $00 ; EF -
db $00 ; F0 -
db $00 ; F1 -
db $00 ; F2 -
db $00 ; F3 -
db $00 ; F4 -
db $00 ; F5 -
db $00 ; F6 -
db $00 ; F7 -
db $00 ; F8 -
db $00 ; F9 -
db $00 ; FA -
db $00 ; FB -
db $00 ; FC -
db $00 ; FD -
db $00 ; FE - Server request (async)
db $00 ; FF -
+87
View File
@@ -0,0 +1,87 @@
SpiralPropsIndex:
db $00, $04, $07, $00, $01, $00, $00, $0D, $00, $10, $04, $00, $15, $00, $0A, $00
db $00, $07, $00, $00, $00, $01, $07, $1C, $00, $00, $21, $00, $26, $07, $0A, $00
db $00, $00, $00, $00, $00, $00, $29, $30, $01, $00, $00, $00, $00, $00, $00, $00
db $00, $35, $00, $00, $3A, $00, $00, $00, $01, $00, $04, $00, $00, $00, $00, $3D
db $40, $07, $07, $00, $00, $01, $00, $00, $00, $00, $43, $00, $07, $07, $07, $00
db $00, $00, $00, $01, $48, $00, $00, $00, $00, $00, $00, $00, $07, $07, $00, $4B
db $00, $00, $00, $01, $50, $00, $07, $00, $00, $00, $53, $01, $01, $00, $58, $00
; 0 1 2 3 4 5 6 7 8 9 a b c d e f
db $5B, $01, $04, $00, $00, $00, $60, $67, $00, $00, $00, $00, $00, $00, $00, $6E
db $01, $00, $00, $00, $00, $00, $00, $71, $00, $00, $00, $00, $76, $00, $04, $00
db $00, $07, $00, $04, $00, $00, $00, $01, $7D, $0A, $00, $00, $00, $00, $04, $00
db $01, $00, $04, $00, $00, $01, $07, $00, $00, $00, $00, $0A, $00, $00, $07, $00
db $80, $00, $00, $00, $00, $01, $01, $00, $00, $00, $00, $00, $01, $00, $07, $00
db $85, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
db $8A, $92, $8F, $00, $00, $00, $00, $00, $00, $00, $0A, $00, $00, $00, $00, $00
db $04
SpiralProps:
db $00 ;null row
db $01, $00, $00 ; ($01) Single Top-Left Staircase
db $01, $00, $01 ; ($04) Single Top-Middle Staircase
db $01, $00, $02 ; ($07) Single Top-Right Staircase
db $01, $00, $05 ; ($0A) Single Staircase at Top of Bottom Left Quadrant
db $01, $00, $04 ; ($0D) Moldorm
db $02, $01, $00, $00, $02 ; ($10) Pod Basement
db $03, $01, $0A, $02, $01, $00, $0B ; ($15) GT Entrance
db $02, $01, $03, $00, $04 ; ($1C) Hera Below Moldorm
db $02, $00, $01, $01, $0B ; ($21) PoD Bridge
db $01, $00, $08 ; ($26) GT Ice Armos
db $03, $00, $01, $01, $0B, $02, $09 ; ($29) Swamp Statue
db $02, $01, $03, $00, $04 ; ($30) Hera Big Chest
db $02, $00, $04, $02, $09 ; ($35) Hera Startiles (middle value unused)
db $01, $00, $08 ; ($3A) West Swamp
db $01, $00, $05 ; ($3D) Ice Hamlift
db $01, $00, $07 ; ($40) Aga Guards
db $02, $01, $00, $00, $02 ; ($43) Pod Entrance
db $01, $00, $08 ; ($48) Swamp Attic
db $02, $03, $0C, $04, $06 ; ($4B) Ice U (1st three values unused)
db $01, $00, $05 ; ($50) TT Attic Left
db $02, $00, $01, $01, $0B ; ($53) Pod Rupees
db $01, $00, $04 ; ($58) Ice Gators
db $02, $01, $0A, $02, $01 ; ($5B) HC Tiny (first value placeholder)
db $03, $00, $01, $01, $0B, $02, $09 ; ($60) Swamp Sunken
db $03, $01, $00, $03, $08, $02, $09 ; ($67) Hera Entrance (first value unused)
db $01, $00, $08 ; ($6E) Ice Hookshot
db $02, $01, $00, $03, $08 ; ($71) Hera Basement (first and third values unused)
db $03, $01, $00, $00, $02, $03, $08 ; ($76) GT Circle (third value unused)
db $01, $00, $07 ; ($7D) Mire Entrance
db $02, $00, $02, $02, $09 ; ($80) Tower Usains (2nd value unused)
db $02, $00, $02, $02, $09 ; ($85) Tower Dark2 (2nd value unused)
db $02, $00, $02, $02, $09 ; ($8A) Tower Dark1 (2nd value unused)
db $01, $00, $09 ; ($8F) Mire2
db $01, $00, $0A ; ($92) Mire south of Torch Room
SpiralLabelOffsets:
db 1, -9
db 5, -9
db 9, -9
db -6, -1
db 15, -1
db 1, -1
db 5, -1
db 9, -1
db -6, 7
db 15, 7
db -3, -9
db 13, -9
db -3, -1
db 13, -1
SpiralLabelQuadrantMasks:
dw $0008
dw $000C
dw $0004
dw $0008
dw $0004
dw $0002
dw $0003
dw $0001
dw $0002
dw $0001
dw $0008
dw $0004
dw $0002
dw $0001
+571
View File
@@ -0,0 +1,571 @@
IncomingDoorMap:
; north
db $06, $07, $08
; west
db $09, $0A, $0B
; south
db $00, $01, $02
; east
db $03, $04, $05
macro d(label)
dw <label>-SplitRooms
endmacro
macro sq(byte)
db <byte>
endmacro
SplitRooms:
; 0/8 1/9 2/A 3/B 4/C 5/D 6/E 7/F
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
%d(.no) : %d(.09) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.14) : %d(.no) : %d(.no) : %d(.no)
%d(.no) : %d(.no) : %d(.1a) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
%d(.no) : %d(.no) : %d(.2a) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.35) : %d(.36) : %d(.37)
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.57)
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
%d(.no) : %d(.no) : %d(.6a) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.74) : %d(.75) : %d(.no) : %d(.no)
%d(.no) : %d(.no) : %d(.no) : %d(.7b) : %d(.7c) : %d(.7d) : %d(.no) : %d(.no)
; 0/8 1/9 2/A 3/B 4/C 5/D 6/E 7/F
%d(.no) : %d(.no) : %d(.82) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.87)
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.8c) : %d(.no) : %d(.no) : %d(.no)
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.9d) : %d(.no) : %d(.no)
%d(.no) : %d(.no) : %d(.a2) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
%d(.no) : %d(.a9) : %d(.aa) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
%d(.no) : %d(.no) : %d(.b2) : %d(.no) : %d(.no) : %d(.no) : %d(.b6) : %d(.no)
%d(.no) : %d(.b9) : %d(.no) : %d(.no) : %d(.bc) : %d(.no) : %d(.no) : %d(.no)
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.c7)
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
%d(.no) : %d(.d1) : %d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.d6) : %d(.no)
%d(.no) : %d(.no) : %d(.no) : %d(.db) : %d(.no) : %d(.no) : %d(.no) : %d(.no)
%d(.no)
.no
db $00
.no_items
db $FF
.09
db $01
%sq($04)
%d(..areas) : %d(.no_items) : %d(..stairs)
%d(.no_items) : %d(.no_items) : %d(..enemies)
..areas
db $03, $80, $FF, $00, $80
db $FF
..stairs
db $01
db $FF
..enemies
db $02
db $FF
.14
db $02
%sq($00)
%d(..areas3) : %d(..doors3) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(.no_items)
%sq($00)
%d(..areas2) : %d(..doors2) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(.no_items)
..areas3
db $03, $C0, $FF, $00, $50
db $03, $00, $28, $30, $50
db $03, $30, $50, $D0, $FF
db $FF
..doors3
db $03, $06, $09
db $FF
..areas2
db $03, $B0, $D0, $D0, $FF
db $03, $30, $50, $00, $28
db $FF
..doors2
db $00, $08
db $FF
.1a ; PoD Big Chest (2) // Falling bridge and such (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(..chests) : %d(.no_items) : %d(.no_items)
..areas
db $03, $00, $2C, $70, $98
db $FF
..doors
db $04
db $FF
..chests
db $00
db $FF
.2a ; PoD Arena Right-Side Chest (2) // Arena (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(..chests) : %d(.no_items) : %d(.no_items)
..areas
db $03, $D8, $FF, $A8, $C8
db $FF
..doors
db $0B
db $FF
..chests
db $00
db $FF
.35 ; Swamp BK Chest (2) // Swamp second trench (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(..chests) : %d(..pots) : %d(.no_items)
..areas
db $03, $00, $70, $00, $80
db $FF
..doors
db $03
db $FF
..chests
db $00
db $FF
..pots
db $01, $02, $03, $04, $05
db $FF
.36 ; Swamp Big Lobby (1) // Tiny Top-Right Blocked Corner (2)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(..pots) : %d(.no_items)
..areas
db $03, $D4, $FF, $00, $48
db $FF
..doors
db $09
db $FF
..pots
db $00, $01
db $FF
.37 ; Swamp Second Chest (2) // Swamp first trench (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(..chests) : %d(.no_items) : %d(..enemies)
..areas
db $03, $90, $FF, $00, $80
db $FF
..doors
db $09
db $FF
..chests
db $00
db $FF
..enemies
db $02, $03
db $FF
.57 ; SW pot cage (2) // middle section (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(..chests) : %d(..pots) : %d(..enemies)
..areas
db $03, $80, $FF, $80, $FF
db $FF
..doors
db $08, $0B
db $FF
..chests
db $01
db $FF
..pots
db $02, $03, $04, $05
db $FF
..enemies
db $08, $09, $0A, $0B
db $FF
.6a ; pre-helmasaur-king (2) // PoD rupee basement (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(..enemies)
..areas
db $03, $B4, $C4, $00, $B4
db $03, $A8, $D0, $B0, $D0
db $FF
..doors
db $02
db $FF
..enemies
db $00, $01, $04, $05
db $FF
.74 ; desert north -- trapped area (2) // everything else (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(..enemies)
..areas
db $03, $4C, $C4, $CC, $FF
db $FF
..doors
db $07
db $FF
..enemies
db $06, $07
db $FF
.75 ; desert cannonball (2) // desert northeast + trap room (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items) : %d(..chests) : %d(.no_items) : %d(..enemies)
..areas
db $03, $80, $FF, $00, $FF
db $FF
..doors
db $08
db $FF
..chests
db $00
db $FF
..enemies
db $06, $07
db $FF
.7b ; GT post-compass (3) // island hardhat (2) // DMs room (1)
db $02
%sq($00)
%d(..areas3) : %d(..doors3) : %d(.no_items)
%d(.no_items) : %d(..pots3) : %d(..enemies3)
%sq($00)
%d(..areas2) : %d(..doors2) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(..enemies2)
..areas3
db $03, $00, $FF, $00, $80
db $FF
..doors3
db $09
db $FF
..pots3
db $00, $01, $02, $03, $04
db $FF
..enemies3
db $00, $01
db $FF
..areas2
db $03, $80, $FF, $80, $FF
db $FF
..doors2
db $0B
db $FF
..enemies2
db $06, $07
db $FF
.7c ; GT falling bridge // rando room
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(..pots) : %d(..enemies)
..areas
db $03, $00, $80, $00, $FF
db $FF
..doors
db $03, $05
db $FF
..pots
db $00, $01, $02, $03
db $FF
..enemies
db $01, $02, $03, $04
db $FF
.7d ; GT warp maze (section next to rando room)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(..chests) : %d(..pots) : %d(..enemies)
..areas
db $03, $00, $FF, $00, $80
db $03, $00, $80, $80, $FF
db $03, $CA, $DA, $9A, $A6
db $FF
..doors
db $05
db $FF
..chests
db $00
db $FF
..pots
db $00, $01, $02, $03
db $FF
..enemies
db $00, $01, $02, $03, $09
db $FF
.82 ; HC Basement (1) + catwalk (2)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(.no_items)
..areas
db $03, $00, $20, $00, $50
db $FF
..doors
db $00, $03
db $FF
.87 ; Hera basement: cage (0) // torches (1)
db $01
%sq($08)
%d(..areas) : %d(.no_items) : %d(..stairs)
%d(..chests) : %d(..pots) : %d(..enemies)
..areas
db $03, $00, $FF, $00, $80
db $03, $80, $FF, $80, $FF
db $FF
..stairs
db $00
db $FF
..chests
db $00
db $FF
..pots
db $00, $01, $02, $03, $04, $05, $06, $07
db $FF
..enemies
db $00, $01, $02, $05, $06, $09, $0C
db $FF
.8c
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(..chests) : %d(..pots) : %d(..enemies)
..areas
db $03, $80, $FF, $80, $FF
db $FF
..doors
db $08
db $FF
..chests
db $03
db $FF
..pots
db $02, $03, $04, $05, $06
db $FF
..enemies
db $06, $07, $09
db $FF
.9d
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(..enemies)
..areas
db $03, $00, $FF, $80, $FF
db $FF
..doors
db $05
db $FF
..enemies
db $06, $07, $08
db $FF
.a2 ; Mire abyss -- EW bridge (2), stairs to basement + hookable chest (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(.no_items)
..areas
db $01, $00, $FF, $70, $84
db $FF
..doors
db $04, $0A
db $FF
.a9
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items) : %d(.no_items) : %d(..pots) : %d(.no_items)
..areas
db $03, $00, $40, $70, $FF
db $03, $00, $FF, $A0, $FF
db $03, $C0, $FF, $70, $FF
db $FF
..doors
db $04, $07, $0A
db $FF
..pots
db $04, $05, $06, $07
db $FF
.aa
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items) : %d(.no_items) : %d(.no_items) : %d(.no_items)
..areas
db $02, $00, $80, $00, $FF
db $01, $34, $D4, $B8, $FF
db $FF
..doors
db $03, $06
db $FF
.b2
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items) : %d(.no_items) : %d(..pots) : %d(..enemies)
..areas
db $02, $00, $FF, $00, $80
db $03, $60, $A0, $00, $40
db $FF
..doors
db $01, $09
db $FF
..pots
db $00, $01, $02, $03, $04, $05, $06
db $FF
..enemies
db $00, $01, $02, $03, $04
db $FF
.b6
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(..pots) : %d(..enemies)
..areas
db $03, $80, $FF, $00, $FF
db $FF
..doors
db $08
db $FF
..pots
db $00
db $FF
..enemies
db $04
db $FF
.b9
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items) : %d(.no_items) : %d(.no_items) : %d(.no_items)
..areas
db $01, $00, $20, $28, $60
db $01, $E0, $FF, $28, $60
db $01, $00, $FF, $58, $60
db $FF
..doors
db $03, $09
db $FF
.bc
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items) : %d(.no_items) : %d(..pots) : %d(.no_items)
..areas
db $03, $2C, $4C, $CA, $FF
db $FF
..doors
db $06
db $FF
..pots
db $0C, $0D
db $FF
.c7 ; TR Torch Maze (1) // Tiny Bottom-Left Blocked Corner (2)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(..pots) : %d(.no_items)
..areas
db $03, $00, $1C, $A8, $FF
db $FF
..doors
db $05
db $FF
..pots
db $02, $03
db $FF
.d1
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(..pots) : %d(..enemies)
..areas
db $03, $80, $FF, $00, $A8
db $FF
..doors
db $02
db $FF
..pots
db $02, $03, $04, $05
db $FF
..enemies
db $00, $01, $07
db $FF
.d6
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(..chests) : %d(.no_items) : %d(..enemies)
..areas
db $03, $00, $80, $00, $FF
db $FF
..doors
db $00
db $FF
..chests
db $00
db $FF
..enemies
db $00, $01, $02
db $FF
.db
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(..chests) : %d(.no_items) : %d(.no_items)
..areas
db $02, $B0, $FF, $90, $C0
db $FF
..doors
db $0B
db $FF
..chests
db $01
db $FF
+258
View File
@@ -0,0 +1,258 @@
dw $FFFF, $83A5, $FFFF, $FFFF ; 00
dw $C388, $8388, $FFFF, $FFFF ; 01
dw $4348, $034A, $4342, $0342 ; 02
dw $FFFF, $FFFF, $438F, $FFFF ; 03 - Houlihan
dw $039A, $038F, $4365, $C39B ; 04
dw $FFFF, $FFFF, $FFFF, $FFFF ; 05 - unused
dw $FFFF, $FFFF, $438F, $FFFF ; 06 - Arrghus
dw $0100, $0101, $4111, $0111 ; 07 - Moldorm
dw $FFFF, $FFFF, $43B2, $03B2 ; 08 - useless fairy entrance
dw $C3A6, $837B, $FFFF, $FFFF ; 09
dw $C398, $835F, $FFFF, $FFFF ; 0A
dw $039B, $439C, $839B, $0381 ; 0B
dw $C371, $8371, $4354, $0354 ; 0C
dw $FFFF, $FFFF, $438F, $FFFF ; 0D - Aga 2
dw $FFFF, $FFFF, $8399, $439B ; 0E
dw $FFFF, $FFFF, $FFFF, $FFFF ; 0F - unused and should never be used, treated as non-id
dw $C340, $8340, $4350, $0340 ; 10
dw $83B7, $C3AC, $03B7, $438A ; 11
dw $C354, $8354, $4354, $0354 ; 12
dw $FFFF, $83B7, $FFFF, $03B7 ; 13
dw $012E, $012F, $013E, $013F ; 14
dw $C374, $8340, $4341, $0340 ; 15
dw $0108, $0109, $436B, $036B ; 16
dw $4104, $0104, $4114, $0114 ; 17
dw $C3B5, $FFFF, $43B4, $FFFF ; 18 - useless fairy drop
dw $FFFF, $8369, $FFFF, $035A ; 19
dw $03E7, $03E8, $03F7, $0361 ; 1A
dw $039B, $439C, $4361, $FFFF ; 1B
dw $038F, $038F, $037E, $C39B ; 1C
dw $C3B2, $83A7, $FFFF, $FFFF ; 1D
dw $FFFF, $4391, $0122, $0123 ; 1E
dw $FFFF, $FFFF, $4360, $C399 ; 1F
dw $FFFF, $FFFF, $438F, $FFFF ; 20
dw $4348, $0363, $C348, $8368 ; 21
dw $FFFF, $FFFF, $4368, $0348 ; 22
dw $FFFF, $FFFF, $FFFF, $039B ; 23
dw $4365, $0365, $0132, $0133 ; 24
dw $FFFF, $FFFF, $FFFF, $FFFF ; 25 - unused
dw $039B, $03E4, $4363, $0382 ; 26
dw $4104, $0104, $4114, $0114 ; 27
dw $C3A5, $FFFF, $4358, $0348 ; 28
dw $FFFF, $FFFF, $FFFF, $0396 ; 29 - Mothula
dw $C350, $8352, $4350, $03F8 ; 2A
dw $C36A, $FFFF, $03F9, $C38D ; 2B
dw $C340, $8340, $4350, $0350 ; 2C - hookshot cave back
dw $FFFF, $FFFF, $FFFF, $FFFF ; 2D - unused
dw $FFFF, $838F, $FFFF, $FFFF ; 2E
dw $C3B4, $FFFF, $436E, $03B2 ; 2F - Kakariko well
dw $C361, $FFFF, $839A, $FFFF ; 30 - inset stairs if possible
dw $0124, $0125, $0134, $0135 ; 31
dw $43C4, $03C4, $43D4, $03D4 ; 32
dw $FFFF, $FFFF, $438F, $FFFF ; 33
dw $0129, $012A, $0139, $013A ; 34
dw $C38D, $039B, $43B1, $037D ; 35
dw $0118, $0119, $0128, $4128 ; 36
dw $439B, $838D, $437D, $03B1 ; 37
dw $C3AC, $FFFF, $43B7, $FFFF ; 38
dw $FFFF, $FFFF, $039B, $0381 ; 39
dw $03C2, $03C3, $43D3, $03D3 ; 3A - make bespoke if feasible
dw $C3A5, $FFFF, $43B5, $FFFF ; 3B - inset stairs if feasible
dw $C340, $8350, $4340, $0350 ; 3C - hookshot cave front
dw $039B, $439B, $0361, $838E ; 3D
dw $FFFF, $438F, $43B2, $0373 ; 3E
dw $FFFF, $FFFF, $0130, $C399 ; 3F
dw $C3A5, $FFFF, $4372, $C399 ; 40 - inset stairs if feasible
dw $03C5, $03C6, $03D5, $03D6 ; 41
dw $03E9, $03EA, $FFFF, $FFFF ; 42
dw $C3B2, $03B2, $FFFF, $0361 ; 43
dw $038D, $839F, $838D, $039F ; 44
dw $C3AB, $83B4, $4364, $43B7 ; 45
dw $C375, $8375, $4373, $0373 ; 46
dw $FFFF, $FFFF, $FFFF, $FFFF ; 47 - unused
dw $FFFF, $FFFF, $FFFF, $FFFF ; 48 - unused
dw $839B, $8372, $039B, $0372 ; 49
dw $03E2, $03E3, $0386, $4386 ; 4A
dw $C361, $4391, $4373, $0373 ; 4B
dw $FFFF, $83A5, $FFFF, $03B7 ; 4C
dw $0102, $0103, $0112, $0113 ; 4D
dw $839B, $439C, $FFFF, $FFFF ; 4E
dw $FFFF, $8396, $838D, $FFFF ; 4F
dw $FFFF, $83B7, $FFFF, $03B5 ; 50
dw $C354, $8354, $4384, $0384 ; 51
dw $C3B7, $FFFF, $4359, $0348 ; 52
dw $039A, $83B5, $839B, $43B7 ; 53
dw $C390, $8390, $4380, $0340 ; 54
dw $C340, $8340, $4350, $0340 ; 55 - secret passage
dw $038F, $83B4, $4365, $039F ; 56
dw $039B, $438D, $0365, $039B ; 57
dw $C372, $439B, $0383, $0365 ; 58 - split
dw $838A, $8372, $03D1, $0372 ; 59
dw $FFFF, $FFFF, $FFFF, $038F ; 5A - Helmasaur King
dw $FFFF, $83B7, $FFFF, $03B5 ; 5B
dw $C3B1, $83AA, $FFFF, $838F ; 5C
dw $039B, $C399, $0361, $FFFF ; 5D
dw $FFFF, $0110, $839C, $0123 ; 5E
dw $FFFF, $FFFF, $43BB, $FFFF ; 5F
dw $FFFF, $8379, $FFFF, $036A ; 60
dw $C387, $8385, $4356, $0356 ; 61
dw $C346, $8354, $4352, $0340 ; 62
dw $039A, $FFFF, $0361, $FFFF ; 63
dw $FFFF, $FFFF, $8399, $0367 ; 64
dw $FFFF, $FFFF, $0367, $0381 ; 65
dw $038F, $039A, $0362, $83B2 ; 66
dw $83B4, $83B5, $03B7, $039F ; 67
dw $C340, $8350, $4341, $0340 ; 68
dw $FFFF, $FFFF, $FFFF, $FFFF ; 69 - unused
dw $FFFF, $03E1, $FFFF, $03F1 ; 6A
dw $039A, $0361, $839B, $C39B ; 6B
dw $039A, $FFFF, $839B, $0360 ; 6C - Lanmolas 2
dw $0361, $FFFF, $C39B, $FFFF ; 6D
dw $FFFF, $838E, $FFFF, $FFFF ; 6E
dw $FFFF, $FFFF, $FFFF, $FFFF ; 6F - unused
dw $43BA, $FFFF, $FFFF, $FFFF ; 70
dw $039A, $FFFF, $4365, $438D ; 71
dw $437A, $037A, $03C1, $0342 ; 72 - slight cheating I guess...
dw $038F, $038F, $839B, $0366 ; 73
dw $43B2, $03B2, $43A8, $03A8 ; 74
dw $038F, $83B4, $0365, $03B5 ; 75
dw $010D, $010E, $011D, $011E ; 76
dw $0126, $0127, $4137, $0137 ; 77
dw $FFFF, $FFFF, $FFFF, $FFFF ; 78 - unused
dw $FFFF, $FFFF, $FFFF, $FFFF ; 79 - unused
dw $FFFF, $FFFF, $FFFF, $FFFF ; 7A - unused
dw $0106, $0107, $438F, $4381 ; 7B
dw $C3B7, $83B4, $43B7, $03B7 ; 7C
dw $43B2, $835E, $034C, $0391 ; 7D
dw $FFFF, $83B7, $4393, $438A ; 7E
dw $439B, $FFFF, $838E, $FFFF ; 7F
dw $C3A7, $83B0, $FFFF, $FFFF ; 80
dw $C350, $8341, $4340, $0341 ; 81
dw $C39D, $8354, $4341, $0340 ; 82
dw $038F, $83B5, $4365, $43B7 ; 83
dw $C344, $8345, $4354, $0354 ; 84
dw $C38B, $C39B, $03B7, $439B ; 85
dw $FFFF, $FFFF, $FFFF, $FFFF ; 86 - unused
dw $0136, $0117, $4394, $838F ; 87
dw $FFFF, $FFFF, $FFFF, $FFFF ; 88 - unused
dw $C3B0, $83B0, $FFFF, $FFFF ; 89
dw $FFFF, $FFFF, $FFFF, $FFFF ; 8A - unused
dw $838A, $0360, $038A, $438D ; 8B
dw $83BE, $83BF, $03BD, $0391 ; 8C
dw $0360, $C38A, $038D, $438A ; 8D
dw $FFFF, $838E, $FFFF, $FFFF ; 8E
dw $FFFF, $FFFF, $FFFF, $FFFF ; 8F - unused
dw $FFFF, $FFFF, $438F, $FFFF ; 90
dw $FFFF, $83A5, $FFFF, $03B7 ; 91
dw $03D2, $C3B7, $0364, $039F ; 92
dw $C36C, $836C, $C39B, $838F ; 93
dw $FFFF, $FFFF, $FFFF, $FFFF ; 94 - unused
dw $FFFF, $83B7, $FFFF, $03B5 ; 95
dw $010F, $FFFF, $011F, $C39C ; 96
dw $039A, $83B4, $839B, $036F ; 97
dw $FFFF, $FFFF, $43B2, $0397 ; 98
dw $FFFF, $038F, $434A, $0363 ; 99
dw $FFFF, $FFFF, $FFFF, $FFFF ; 9A - unused
dw $839B, $0381, $435E, $0378 ; 9B
dw $C350, $8350, $4341, $0341 ; 9C
dw $0116, $83B2, $43B1, $035E ; 9D
dw $FFFF, $439A, $838D, $03B9 ; 9E
dw $FFFF, $FFFF, $439B, $FFFF ; 9F
dw $839B, $C39C, $FFFF, $FFFF ; A0
dw $C3B0, $835D, $FFFF, $036A ; A1
dw $03EE, $03EF, $03FE, $03FF ; A2
dw $C35A, $FFFF, $436A, $FFFF ; A3
dw $FFFF, $FFFF, $438F, $FFFF ; A4
dw $039A, $0361, $C3B2, $83B2 ; A5
dw $C340, $8370, $4340, $0340 ; A6
dw $C396, $FFFF, $FFFF, $FFFF ; A7 - ToH fairy basement room
dw $039B, $03E5, $839B, $03F5 ; A8
dw $C357, $8357, $4356, $0356 ; A9
dw $03E6, $439B, $03F6, $C39B ; AA
dw $FFFF, $FFFF, $439A, $FFFF ; AB
dw $FFFF, $FFFF, $FFFF, $038F ; AC - Blind
dw $FFFF, $FFFF, $FFFF, $FFFF ; AD - unused
dw $FFFF, $8399, $FFFF, $FFFF ; AE
dw $C39B, $FFFF, $FFFF, $FFFF ; AF
dw $039B, $C399, $839B, $C399 ; B0
dw $0391, $83B5, $434C, $438A ; B1
dw $C35C, $83A2, $039B, $0366 ; B2
dw $0365, $FFFF, $0365, $FFFF ; B3
dw $03FA, $83FD, $03EC, $03ED ; B4
dw $03EB, $83FD, $83FA, $03FD ; B5
dw $039A, $038F, $0361, $0361 ; B6
dw $C3B4, $FFFF, $43B5, $FFFF ; B7
dw $FFFF, $838A, $FFFF, $03B4 ; B8
dw $43F3, $03F3, $4354, $0354 ; B9
dw $0364, $438D, $FFFF, $FFFF ; BA
dw $838A, $8364, $4372, $0364 ; BB
dw $83BE, $C38A, $03D0, $438A ; BC
dw $FFFF, $FFFF, $FFFF, $FFFF ; BD - unused
dw $FFFF, $439A, $FFFF, $C365 ; BE
dw $FFFF, $FFFF, $438D, $FFFF ; BF
dw $C372, $C399, $4372, $C399 ; C0
dw $039B, $0364, $4365, $8364 ; C1
dw $C351, $8353, $4341, $0353 ; C2
dw $03E0, $C369, $03F0, $4369 ; C3 - show layers
dw $43C0, $03C0, $4340, $0341 ; C4
dw $C3B5, $FFFF, $438A, $FFFF ; C5
dw $03FA, $03FB, $83FA, $83FB ; C6
dw $43FB, $83FD, $03FC, $03FD ; C7
dw $FFFF, $FFFF, $FFFF, $038F ; C8 - Armos Knights
dw $03F2, $43F2, $0386, $4386 ; C9
dw $FFFF, $FFFF, $FFFF, $FFFF ; CA - unused
dw $C340, $8343, $4354, $0347 ; CB
dw $C353, $8350, $4347, $0354 ; CC
dw $FFFF, $FFFF, $FFFF, $FFFF ; CD - unused
dw $FFFF, $8391, $FFFF, $FFFF ; CE - Kholdstare drop
dw $FFFF, $FFFF, $FFFF, $FFFF ; CF - unused
dw $C372, $C399, $4372, $C399 ; D0
dw $C38E, $838F, $4381, $C38D ; D1
dw $FFFF, $83B5, $FFFF, $0395 ; D2
dw $FFFF, $FFFF, $FFFF, $FFFF ; D3 - unused
dw $FFFF, $FFFF, $FFFF, $FFFF ; D4 - unused
dw $C3B5, $FFFF, $43B5, $FFFF ; D5
dw $C3B5, $010A, $43B4, $011A ; D6
dw $FFFF, $FFFF, $FFFF, $FFFF ; D7 - unused
dw $FFFF, $8361, $FFFF, $839B ; D8
dw $FFFF, $FFFF, $4360, $0360 ; D9
dw $FFFF, $FFFF, $439C, $FFFF ; DA
dw $C354, $8346, $4354, $037F ; DB
dw $C346, $8354, $4343, $0340 ; DC
dw $FFFF, $FFFF, $FFFF, $FFFF ; DD - unused
dw $FFFF, $8396, $FFFF, $FFFF ; DE - Kholdstare
dw $FFFF, $FFFF, $43A0, $0354 ; DF - paradox top
dw $039B, $C399, $0361, $FFFF ; E0
; no more dungeon
dw $C340, $8340, $4350, $0340 ; E1 - lost woods thieves hideout
dw $C340, $8340, $4340, $0350 ; E2 - lumberjack cave
dw $FFFF, $83B4, $43B2, $036E ; E3 - magic bat
dw $C340, $8342, $4350, $0342 ; E4 - old man's house front
dw $C342, $8340, $4356, $0354 ; E5 - old man's house back
dw $C340, $8341, $4350, $0340 ; E6 - death mountain descent left
dw $C341, $8340, $4340, $0350 ; E7 - death mountain descent right
dw $C370, $8370, $4380, $0350 ; E8 - superbunny top
dw $FFFF, $FFFF, $FFFF, $FFFF ; E9 - unused
dw $C3A5, $FFFF, $43B5, $FFFF ; EA - spectacle top
dw $FFFF, $83A6, $FFFF, $03B5 ; EB - bumper top
dw $FFFF, $FFFF, $FFFF, $FFFF ; EC - unused
dw $C370, $8370, $4340, $0350 ; ED - fairy ascension top
dw $C340, $8390, $4340, $0350 ; EE - spiral top
dw $FFFF, $8340, $43A0, $0354 ; EF - paradox top
dw $C340, $8342, $4350, $0342 ; F0 - old man rescue left
dw $C342, $8342, $4340, $0350 ; F1 - old man rescue right
dw $FFFF, $FFFF, $FFFF, $03B2 ; F2 - Sahasrahla's Kakariko house left
dw $FFFF, $FFFF, $43B2, $FFFF ; F3 - Sahasrahla's Kakariko house right
dw $FFFF, $FFFF, $FFFF, $03B2 ; F4 - quarreling brothers left
dw $FFFF, $FFFF, $43B2, $FFFF ; F5 - quarreling brothers right
dw $FFFF, $FFFF, $FFFF, $FFFF ; F6 - unused
dw $FFFF, $FFFF, $FFFF, $FFFF ; F7 - unused
dw $C370, $8370, $43A0, $0354 ; F8 - superbunny bottom
dw $C340, $8341, $4350, $0340 ; F9 - spectacle left
dw $C374, $8340, $4350, $0340 ; FA - spectacle bottom
dw $FFFF, $83A5, $4348, $0358 ; FB - bumper bottom
dw $FFFF, $FFFF, $FFFF, $FFFF ; FC - unused
dw $C370, $8370, $4354, $0354 ; FD - fairy ascension bottom
dw $FFFF, $FFFF, $43B4, $03B5 ; FE - spiral bottom
dw $C3B4, $83B4, $436E, $036D ; FF - paradox bottom
File diff suppressed because it is too large Load Diff
+163
View File
@@ -0,0 +1,163 @@
RedrawLoot:
JSL DrawLoot
; what we wrote over
SEP #$20
STZ.w $0210
RTL
FirstDrawLoot:
LDA.b #$FF
STA.w $0215
LDA.b #$80
STA.w $0216
STA.w $0218
LDA.l DRMode
BEQ +
LDA.w DungeonID
ASL A
TAX
LDA.l DungeonMapData.floor, X
STA.b $A4
+
; what we wrote over
LDA.b #$08
STA.b $17
DrawLoot:
LDA.b $07
STA.w $021B
LDA.l DRMode
BNE .skip
REP #$30
PHX : PHY
STZ.b $0E
LDX.w DungeonID
LDA.l DungeonMapRoomPointers, X
STA.b $72
SEP #$20
LDA.l DungeonMapFloorCountData, X
AND.b #$0F
CLC : ADC.w DungeonMapCurrentFloor
PHA
JSR DrawSingleFloorLoot
INC.b $0F
LDA.b #$80
STA.b $0E
PLA : DEC A
JSR DrawSingleFloorLoot
LDX.w GFXStripes
LDA.b #$FF
STA.w GFXStripes+$02, X
LDA.b #$01
STA.b NMISTRIPES
PLY : PLX
.skip
LDA.b #$00
RTL
DrawSingleFloorLoot:
REP #$20
AND.w #$00FF
ASL A
TAX
LDA.l DungeonMapFloorToDataOffset, X
CLC : ADC.w #$0018 ; get to end of floor
TAY
SEP #$20
LDA.b #$04
STA.b $06
LDA.b #$04
STA.b $07
.next_row
REP #$20
LDA.w GFXStripes
TAX
CLC : ADC.w #$0030
STA.w GFXStripes
SEP #$20
LDA.b $07
CLC : ADC.b $07
REP #$20
AND.w #$00FF
ASL #5
CLC : ADC.w #$1092
ADC.b $0E
XBA
STA.w GFXStripes+$02, X
CLC : ADC.w #$2000
STA.w GFXStripes+$1A, X
LDA.w #$1300
STA.w GFXStripes+$04, X
STA.w GFXStripes+$1C, X
TXA
CLC : ADC.w #$0016
TAX
.next_room
REP #$20
LDA.b ($72), Y ; get room id
PHY
AND.w #$00FF
CMP.w #$000F ; $0F = empty room
BNE .valid_room
LDA.w #$0000
BRA +
.valid_room
JSL CheckLoot
+
ASL A : ASL A : ASL A
TXY
TAX
LDA.l LootTypeIcons+0, X
STA.w GFXStripes+$00, Y
LDA.l LootTypeIcons+2, X
STA.w GFXStripes+$02, Y
LDA.l LootTypeIcons+4, X
STA.w GFXStripes+$18, Y
LDA.l LootTypeIcons+6, X
STA.w GFXStripes+$1A, Y
TYX
PLY
DEY : DEX #4
SEP #$20
DEC.b $06
BPL .next_room
DEC.b $07
BMI .done
LDA.b #$00
XBA
LDA.b #$04
STA.b $06
JMP .next_row
.done
RTS
+275
View File
@@ -0,0 +1,275 @@
DrawNonexistentRoom:
REP #$20
LDA.w #$0F00
STA.l $7F0000, X
STA.l $7F0002, X
STA.l $7F0040, X
STA.l $7F0042, X
JML $8AE7F2
GetVisibilityProps:
PHX
ASL A : ASL A
TAX
LDA.b $0C
AND.l .visibility_props, X
ORA.l .visibility_props+2, X
STA.b $0C
PLX
RTS
.visibility_props:
dw $0000, $0F00
dw $C000, $174F
dw $C000, $174F
dw $0000, $1400
dw $0000, $1000
dw $0000, $0C00
dw $0000, $0800
; A = room shape
; $0C = visibility props
GetQuadrantTile:
PHA
LDA.b $0C
AND.w #$03FF
BNE .square
PLA
ORA.b $0C
RTS
.square
PLA
LDA.b $0C
RTS
NormalDrawDungeonMapRoom:
JSL DrawDungeonMapRoom
JML $8AE7F2
; $CA has room_id
; $0E has quadrant flags
; X has address to draw at
DrawDungeonMapRoom:
REP #$20
PHB : PHK : PLB ; need to keep this in same bank as data, or else specify bank
LDA.b $0A : PHA
JSR GetSpecificRoomVisibility
LDA.b $CA
AND.w #$00FF
ASL A : ASL A : ASL A
TAY
macro DrawQuadrant(quadrant, writeOffset)
.draw_quadrant_<quadrant>:
LDA.w #(3-<quadrant>)<<14
STA.b $0C
LDA.b $0E
BIT.w #1<<(3-<quadrant>)
BNE ..visited
LDA.b $0A
BRA ..continue
..visited
LDA.b $0B
..continue
AND.w #$00FF
JSR GetVisibilityProps
LDA.w SupertileRoomShapes+(2*<quadrant>), Y
CMP.w #$FFFF : BNE ..get_quadrant
LDA.b $0A
AND.w #$00FF
CMP.w #$0001
BNE ..empty
..full_square
LDA.b $0C
BRA ..write
..get_quadrant
JSR GetQuadrantTile
BRA ..write
..empty
LDA.w #$0F00
..write
STA.l $7F0000+<writeOffset>, X
endmacro
%DrawQuadrant(0, $00)
%DrawQuadrant(1, $02)
%DrawQuadrant(2, $40)
%DrawQuadrant(3, $42)
.done
PLA : STA.b $0A
PLB
RTL
DrawEntrances:
REP #$30
PHX : PHY
LDA.b $06 : PHA
LDX.w DungeonID
LDA.l DungeonMapRoomPointers, X
STA.b $72
SEP #$20
LDA.l DungeonMapFloorCountData, X
AND.b #$0F
CLC : ADC.w DungeonMapCurrentFloor
REP #$20
AND.w #$00FF
STZ.b $02
PHA
JSR DrawSingleFloorEntrances
INC.b $02
INC.b $02
PLA
DEC A
JSR DrawSingleFloorEntrances
.done
REP #$20
PLA : STA.b $06
PLY : PLX
SEP #$30
RTL
DrawSingleFloorEntrances:
ASL A
TAX
LDA.l DungeonMapFloorToDataOffset, X
TAY
STZ.b $06
.next_room
REP #$20
LDA.b ($72), Y ; get room id
AND.w #$00FF
CMP.w #$000F ; $0F = empty room
BEQ +
JSR DrawSingleRoomEntrances
+
INY
SEP #$20
INC.b $06
LDA.b $06
CMP.b #$05
BCC .next_room
STZ.b $06
- INC.b $07
LDA.b $07
CMP.b #$05
BCC .next_room
.done
REP #$20
RTS
macro DrawSingleEntrance(offset)
LDY.b $00
LDA.b #$00
STA.w OAMBufferAux, Y ; high x-bit and size bit
TYA
ASL #2
TAY
LDA.b $06
CPX.b #$02
BNE ?+
ASL A
?+
CLC : ADC.b $06
ASL #3
CLC : ADC.b #$90+<offset>
STA.w OAMBuffer+0, Y
PHX
LDA.b $07
CPX.b #$02
BNE ?+
ASL A
?+
CLC : ADC.b $07
ASL #3
LDX.b $02
CLC : ADC.l DungeonMapRoomMarkerYBase, X
PLX
CLC : ADC.b #$08
CLC : ADC.w $0213
SEC : SBC.b $E8
STA.w OAMBuffer+1, Y
LDA.b #$33
STA.w OAMBuffer+2, Y
LDA.b #$23
STA.w OAMBuffer+3, Y
INC.b $00
endmacro
DrawSingleRoomEntrances:
STA.b $0E
PHY
SEP #$10
LDX.b #$FE
.next_entry
INX : INX
LDA.l SupertileEntrances, X
BPL +
JMP .done
+
AND.w #$0FFF
CMP.b $0E
BNE .next_entry
SEP #$20
LDA.l SupertileEntrances+1, X
TYX
PHA : PHA
BIT.b #$40
BEQ +
%DrawSingleEntrance(0)
+
PLA
BIT.b #$20
BEQ +
%DrawSingleEntrance(4)
+
PLA
BIT.b #$10
BEQ +
%DrawSingleEntrance(8)
+
.done
REP #$30
PLY
RTS
+214
View File
@@ -0,0 +1,214 @@
; move aga boss icon to correct room
org $8AEE75
db $08
; use AA1 = $1C for map stuff
org $80E193
skip 4
db $61, $62, $63, $D6
org $8AE11D
LDA.b #$1C
org $8AE12B
LDA.b #$20
; dungeon map sheets
org $80DDD3 ; slot $8F
db $61, $56, $57, $62
; always use $8F in dungeon map
org $8AE122
NOP #4
LDA.b #$8F
; unused chest data
org $81E9A5
dw $000F ; freezor room, second chest (only one chest in supertile)
org $81EA6E
dw $000F ; mire spike room, second chest (only one chest in supertile)
org $81EAF8
dw $000F ; GT button/switch/bladetrap room (no chest in supertile)
; Dungeon Map Palettes 2-5 left half
org $9BE544
dw $0000, $71E7, $7FFF, $3B5F, $0000, $0000, $7EB5, $1CE7
org $9BE564
dw $0000, $5565, $7FFF, $331C, $0000, $0000, $7E27, $0C63
org $9BE584
dw $0000, $4100, $7FFF, $2656, $4100, $0000, $4100, $4100
org $9BE5A4
dw $0000, $34E0, $7FFF, $34E0, $34E0, $0000, $34E0, $34E0
; move BG1 to main screen in dungeon map screen
org $8AE130
LDA.b #$17 : STA.b $1C
LDA.b #$00 : STA.b $1D
; make skull icon blink opposite our loot icons
org $8AEE2B
AND.b #$10
NOP #2
db $F0 ; BEQ to replace BCS
;================================================================================
; Overhaul of Dungeon Map Screen
;--------------------------------------------------------------------------------
org $8AE64D
PLX
JML NormalDrawDungeonMapRoom
org $8AE606
PLX
JML DrawNonexistentRoom
org $8AE152
JSL LoadLastHUDPalette
org $808BD3
JSL LoadStripes
BRA + : NOP #9 : +
org $8AEAE8 ; vanilla checks number of sprites drawn instead of... counting...
LDA.b $0E
CMP.b #$02
;================================================================================
; Swapping Dungeon in Dungeon Map Screen (L/R)
;--------------------------------------------------------------------------------
org $8AE9A7
JSL CheckSwitchMap
BRA + : NOP #3 : +
org $8AEF06
DEC.b $13
BNE +
JML DungeonMapSwitch_Submodule
+ RTL
warnpc $8AEF29
org $8AEADA
JML SkipMapSprites
org $8AE9C7
JSL RestoreDungeonMapFloorIndex
NOP
org $98BC86
JSL CacheCurrentDungeon
org $8AEFC5
JSL RestoreCurrentDungeon
NOP
org $8AE1EC
PLB
JML DrawDungeonLabel
org $8AE83E
JSL StartCurrentRoomSearch
BRA + : NOP #6 : +
org $8AE86C
JML FindCurrentRoom
padbyte $EA
pad $8AE891
org $8AEBF8
LDA.w $0217
SEC : SBC.b $0F
BMI +
CMP.b #$18
BCS +
skip 7
+
org $8AEB9A
db -8, 8, -8, 8
db -8, -8, 8, 8
;================================================================================
; Show indicators of what is left in each room
;--------------------------------------------------------------------------------
org $8AEABA
JSL RedrawLoot
NOP
org $8AE42B
JSL FirstDrawLoot
;================================================================================
; Blink indicators of what is left in each room
;--------------------------------------------------------------------------------
org $8AE964
JSL BlinkLoot
org $8AE235
JSL WriteBigEndianAddressX
org $8AE290
JSL WriteBigEndianAddressY
org $8AE350
JSL WriteBigEndianAddressY
org $8AE206
JSL StartDoubleWrite
NOP
org $8AE2E0
JML CheckDoubleWrite
NOP
org $8AE21C
JSL DrawMountain
BRA + : NOP #9 : +
;================================================================================
; Draw Wacky Door Rando Layouts
;--------------------------------------------------------------------------------
org $8AE3D7
LDA.l DRMode
BEQ +
JSL DrawWackyDoorRandoStuff
JMP.w $8AE422
NOP
+
warnpc $8AE3EB
org $8AE439
dw $0F19, $4F19, $8F19, $CF19
org $8AE449
dw $0F1A, $8F1A
org $8AE451
dw $0F1B, $4F1B
org $8AE473
NOP #2
org $8AE4A4
NOP #2
org $8AE4DC
NOP #2
org $8AE4F9
dw $0F1E, $0F1F, $0F20, $0F21
dw $0F22, $0F23, $0F24, $0F25
org $8AE539
LDA.w #$0F1C
org $8AE573
LDA.w #$0F1D
org $8AE555
NOP #2
org $8AE576
NOP #2
+42
View File
@@ -0,0 +1,42 @@
pushpc
incsrc dungeon_map_hooks.asm
macro WriteGFXSheetPointer(sheet, location)
pushpc
org $80CFC0+<sheet>
db <location>>>16
org $80D09F+<sheet>
db <location>>>8
org $80D17E+<sheet>
db <location>>>0
pullpc
endmacro
%WriteGFXSheetPointer($C9, DungeonMapIcons1)
%WriteGFXSheetPointer($CA, DungeonMapIcons2)
%WriteGFXSheetPointer($D5, DungeonMapIcons3)
%WriteGFXSheetPointer($D4, MapSheetD4)
%WriteGFXSheetPointer($D6, DungeonMapDoorConnectors)
%WriteGFXSheetPointer($61, DungeonMapIcons4)
%WriteGFXSheetPointer($62, DungeonMapIcons5)
%WriteGFXSheetPointer($63, DungeonMapIcons6)
%WriteGFXSheetPointer($14, DRSheet14)
pullpc
incsrc doors_dungeon_map.asm
incsrc draw_rooms.asm
incsrc map_bg3.asm
incsrc dungeon_switch.asm
incsrc draw_loot.asm
incsrc check_loot.asm
incsrc blink_loot.asm
incsrc data/doors_display.asm
incsrc data/spiral_stairs.asm
incsrc data/fall_warps.asm
incsrc data/split_room.asm
incsrc data/doors_connections.asm
+381
View File
@@ -0,0 +1,381 @@
CheckSwitchMap:
LDA.l DRMode
BEQ .not_fancy_door_map
; fancy door map
SEP #$20
LDA.b $F6
BIT.b #$30
BNE .change_dungeon
BIT.b #$80
BNE .select_new_room
LDA.b $F4
BIT.b #$80
BNE .select_new_room
BIT.b #$20
BNE .next_entrance
BIT.b #$40
BNE .current_room
AND.b #$0F
BEQ .doors_done
BIT.b #$08 : BEQ + : LDA.b #$00 : BRA .doors_move_cursor : +
BIT.b #$04 : BEQ + : LDA.b #$02 : BRA .doors_move_cursor : +
BIT.b #$02 : BEQ + : LDA.b #$01 : BRA .doors_move_cursor : +
LDA.b #$03
.doors_move_cursor
STA.b $00
JSL MoveDoorsMapCursor
BRA .doors_done
.select_new_room
JSL DoorsMapSelectCursor
BRA .doors_done
.next_entrance
JSL DoorsMapNextEntrance
BRA .doors_done
.change_dungeon
JSL DoorsMapChangeDungeon
BRA .doors_done
.current_room
LDA.l CachedDungeonID
CMP.w DungeonID
BNE .doors_done
JSL DoorsMapCurrentRoom
BRA .doors_done
.doors_done
REP #$20
LDA.w #$0002 ; ignore input! nothing to see here!
RTL
.not_fancy_door_map
SEP #$20
LDA.b $F6
AND.b #$30
BNE +
; what we wrote over
REP #$20
LDA.w DungeonMapFloorCountData, X
AND.w #$000F
CLC : ADC.b $00
RTL
+ PHA
TXA
ASL A
TAX
PLA
BIT.b #$20
BNE +
INX
+ LDA.l DungeonMapData.prev, X
STA.w DungeonID
LDA.b #$04
STA.w SubModuleInterface
REP #$20
LDA.w #$0000
RTL
DungeonMapSwitch_Submodule:
JSL $80893D
JSL $80833F
LDA.b #$09
STA.b $14
STA.w $0710
LDA.b #$01
STA.w SubModuleInterface
STA.w $020D
STZ.w $0213
STZ.w $021B
STZ.w $021C
STZ.b $06
STZ.b $07
LDA.w DungeonID
CMP.l CachedDungeonID
BEQ .current_dungeon
ASL A
TAX
LDA.l DungeonMapData.floor, X
STA.b CurrentFloor
BRA .continue
.current_dungeon
LDA.l CachedCurrentFloor
STA.b CurrentFloor
.continue
REP #$20
STZ.b $E0
STZ.b $E2
STZ.b $E4
STZ.b $E6
STZ.b $E8
STZ.b $EA
JML $98BCA1
SkipMapSprites:
STZ.b $00
LDA.b $02 : PHA
LDA.b $03 : PHA
LDA.b $04 : PHA
LDA.l DRMode
BNE +
LDA.w SubModuleInterface
CMP.b #$04
BEQ +
JSL DrawEntrances
+
PLA : STA.b $04
PLA : STA.b $03
PLA : STA.b $02
STZ.b $0E
STZ.b $0F
LDA.w SubModuleInterface
CMP.b #$04
BNE +
JML $8AEAFC
+
LDA.l DRMode
BEQ +
JSL DrawDoorsMapSprites
JML $8AEAFC
+
LDA.l CachedDungeonID
CMP.w DungeonID
BEQ +
JML $8AEAF3
+ JML $8AEADE
CacheCurrentDungeon:
STA.l $7EC206
SEP #$20
LDA.w DungeonID
STA.l CachedDungeonID
LDA.b CurrentFloor
STA.l CachedCurrentFloor
REP #$20
RTL
RestoreCurrentDungeon:
LDA.b #$F3
STA.w $012C ; what we wrote over
LDA.l CachedDungeonID
STA.w DungeonID
LDA.l CachedCurrentFloor
STA.b CurrentFloor
RTL
RestoreDungeonMapFloorIndex:
STZ.w $020F ; first part we wrote over
LDA.w $021B
STA.b $07
STZ.b $06
LDA.b $0A ; the rest of what we wrote over
AND.b #$08
RTL
DrawDungeonLabel:
LDY.b #$00
LDA.w DungeonID
ASL A
TAX
LDA.b NMISTRIPES
BEQ +
LDY.b #$20
+
; Dungeon Label
REP #$20
LDA.w #$E660
STA.w GFXStripes+$02, Y
LDA.w #$0300
STA.w GFXStripes+$04, Y
LDA.l DungeonLabels+0, X
STA.w GFXStripes+$06, Y
LDA.l DungeonLabels+2, X
STA.w GFXStripes+$08, Y
TYA
CLC : ADC.w #$0008
TAY
; L/R switch indicators
LDA.w #$E310
STA.w GFXStripes+$02, Y
LDA.w #$E910
STA.w GFXStripes+$0A, Y
LDA.w #$E318
STA.w GFXStripes+$12, Y
LDA.w #$E918
STA.w GFXStripes+$1A, Y
LDA.w #$0300
STA.w GFXStripes+$04, Y
STA.w GFXStripes+$0C, Y
STA.w GFXStripes+$14, Y
STA.w GFXStripes+$1C, Y
LDA.w #$49AF
STA.w GFXStripes+$06, Y
STA.w GFXStripes+$16, Y
LDA.w #$099E
STA.w GFXStripes+$08, Y
STA.w GFXStripes+$18, Y
LDA.w #$099F
STA.w GFXStripes+$0E, Y
STA.w GFXStripes+$1E, Y
LDA.w #$09AF
STA.w GFXStripes+$10, Y
STA.w GFXStripes+$20, Y
TYA
CLC : ADC.w #$0020
TAY
LDA.l DRMode
BNE .doors
JMP .skip_doors
.doors
; Select for Next Entrance indicator
LDA.w #$E311
STA.w GFXStripes+$02, Y
LDA.w #$E319
STA.w GFXStripes+$16, Y
LDA.w #$0F00
STA.w GFXStripes+$04, Y
STA.w GFXStripes+$18, Y
LDA.w #$09B8
LDX.b #$07
-
STA.w GFXStripes+$06, Y
STA.w GFXStripes+$1A, Y
INC A
INY : INY
DEX
BPL -
TYA
CLC : ADC.w #$0018
TAY
LDA.l CachedDungeonID
AND.w #$00FF
CMP.w DungeonID
BNE .skip_doors
; Y for Current Location indicator
LDA.w #$A411
STA.w GFXStripes+$02, Y
LDA.w #$A419
STA.w GFXStripes+$12, Y
LDA.w #$0B00
STA.w GFXStripes+$04, Y
STA.w GFXStripes+$14, Y
LDA.w #$09A9
LDX.b #$05
-
STA.w GFXStripes+$06, Y
STA.w GFXStripes+$16, Y
INC A
INY : INY
DEX
BPL -
TYA
CLC : ADC.w #$0014
TAY
.skip_doors
SEP #$20
LDA.b #$FF
STA.w GFXStripes+$02, Y
LDA.b #$01
STA.b NMISTRIPES
INC.w $020D ; what we wrote over
RTL
StartCurrentRoomSearch:
LDA.w DungeonMapFloorCountData, X
LSR A : LSR A : LSR A : LSR A
STA.b $00
LDA.w DungeonMapFloorCountData, X
AND.b #$0F
CLC : ADC.b $00
ASL A
TAY
RTL
FindCurrentRoom:
LDA.w DungeonMapFloorToDataOffset, Y
STA.b $0C
LDY.w #$0000
SEP #$20
.next_room_check
CPY.b $0C
BCS .not_found
LDA.b ($04), Y
INY
CMP.b $0E
BEQ .found
LDA.b $00
CMP.b #$40
BCS .next_row
CLC : ADC.b #$10
STA.b $00
BRA .next_room_check
.next_row
STZ.b $00
LDA.b $02
CMP.b #$40
BCS .next_floor
CLC : ADC.b #$10
STA.b $02
BRA .next_room_check
.next_floor
STZ.b $02
BRA .next_room_check
.found
JML $8AE891
.not_found
JML $8AE8CD
+67
View File
@@ -0,0 +1,67 @@
;--------------------------------------------------------------------------------
SetItemRiseTimer:
LDA.w ItemReceiptMethod : CMP.b #$01 : BNE .not_from_chest
LDA.b #$38 : STA.w AncillaTimer, X
RTL
.not_from_chest
JSL ItemIsJunk
BEQ .default
.junk
LDA.l JunkItemTimer : AND.b #$3F : STA.w AncillaTimer, X
RTL
.default
TYA : STA.w AncillaTimer, X ; What we wrote over
RTL
;--------------------------------------------------------------------------------
ItemIsJunk:
PHX
LDA.l JunkItemTimer : BIT.b #$3F : BEQ .not_junk
BIT.b #$80 : BNE .check
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE .check
LDA.l !MULTIWORLD_RECEIVING_ITEM : BNE .check
BRA .not_junk
.check
LDA.w AncillaGet, X
TAX
LDA.l JunkTable, X
PLX
CMP.b #$00
RTL
.not_junk
PLX
LDA.b #$00
RTL
;--------------------------------------------------------------------------------
; A = item id being collected
ItemGetAlternateSFX:
PEA.w $C567 ; SNES to RTS to in bank 08
LDA.w AncillaGet, X : CMP.b #$4A : BNE +
; collecting pre-activated flute
LDA.b #$13 : JML Ancilla_SFX2_Near
+
JSL ItemIsJunk : BEQ .normal
LDA.b #$3B : JML Ancilla_SFX3_Near
.normal
LDA.b #$0F : JML Ancilla_SFX3_Near
;--------------------------------------------------------------------------------
; A = item id being collected
ItemGetOverworldAlternateSFX:
CPY.b #$4A : BNE +
; pre-activated flute
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$13 : STA.w SFX2
RTL
+
JSL ItemIsJunk : BEQ .normal
.junk
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$3B : STA.w SFX3
RTL
.normal
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$0F : STA.w SFX3
RTL
;--------------------------------------------------------------------------------
View File
+213
View File
@@ -0,0 +1,213 @@
LoadStripes:
CPY.b #$09
BEQ .dungeon_map
.not_dungeon_map
LDA.w $80937A, Y
STA.b $00
LDA.w $809383,Y
STA.b $01
LDA.w $80938C,Y
STA.b $02
RTL
.dungeon_map
LDA.l DRMode
BNE .6x6
.5x5
LDA.b #BG3DungeonMap5x5Stripes>>0
STA.b $00
LDA.b #BG3DungeonMap5x5Stripes>>8
STA.b $01
LDA.b #BG3DungeonMap5x5Stripes>>16
STA.b $02
RTL
.6x6
LDA.b #BG3DungeonMap6x6Stripes>>0
STA.b $00
LDA.b #BG3DungeonMap6x6Stripes>>8
STA.b $01
LDA.b #BG3DungeonMap6x6Stripes>>16
STA.b $02
RTL
LoadLastHUDPalette:
; what we wrote over
JSL $9BEE52
REP #$20
LDA.l MapHUDPalette
STA.l PaletteBuffer+$3A
LDA.l MapHUDPalette+2
STA.l PaletteBuffer+$3C
LDA.l MapHUDPalette+4
STA.l PaletteBuffer+$3E
SEP #$20
RTL
BG3DungeonMap5x5Stripes:
; vanilla stuff
dw $4260, $0100, $2100
dw $4360, $0E40, $2101
dw $4B60, $0100, $6100
dw $6260, $2EC0, $2110
dw $6B60, $2EC0, $6110
dw $6263, $0100, $A100
dw $6363, $0E40, $A101
dw $6B63, $0100, $E100
dw $8460, $0B00, $2102, $2103, $2104, $2105, $2106, $2107
dw $A460, $0B00, $2112, $2113, $2114, $2115, $2116, $2117
dw $5D60, $0100, $6100
dw $7D60, $2EC0, $6110
dw $7D63, $0100, $E100
dw $0060, $7E40, $2111
dw $8063, $3E41, $2111
dw $0060, $3EC0, $2111
dw $0160, $3EC0, $2111
dw $0C60, $3EC0, $2111
dw $0D60, $3EC0, $2111
dw $1E60, $3EC0, $2111
dw $1F60, $3EC0, $2111
; left edge of map border, from vanilla
dw $4E60, $0100, $2100
dw $4F60, $1A40, $2101
dw $6E60, $2EC0, $2110
dw $6E63, $0100, $A100
dw $6F63, $1A40, $A101
; horizontal borders
dw $7260, $1240, $1D11
dw $D261, $1240, $1D11
dw $F261, $1240, $1D11
dw $5263, $1240, $1D11
; vertical borders
dw $7160, $2EC0, $1D11
dw $7C60, $2EC0, $1D11
macro TopOfSquares(start)
; silly Big Endian
db <start>>>8, <start>, $00, $13
dw $5D4C, $1D4C, $5D4C, $1D4C, $5D4C, $1D4C, $5D4C, $1D4C, $5D4C, $1D4C
endmacro
macro BottomOfSquares(start)
; silly Big Endian
db <start>>>8, <start>, $00, $13
dw $DD4C, $9D4C, $DD4C, $9D4C, $DD4C, $9D4C, $DD4C, $9D4C, $DD4C, $9D4C
endmacro
macro FullRow(start)
%TopOfSquares(<start>)
%BottomOfSquares(<start>+$20)
endmacro
; top grid
%FullRow($6092)
%FullRow($60D2)
%FullRow($6112)
%FullRow($6152)
%FullRow($6192)
%FullRow($6212)
%FullRow($6252)
%FullRow($6292)
%FullRow($62D2)
%FullRow($6312)
db $FF
BG3DungeonMap6x6Stripes:
; vanilla
dw $4260, $0100, $2100
dw $4360, $0E40, $2101
dw $4B60, $0100, $6100
dw $8460, $0B00, $2102, $2103, $2104, $2105, $2106, $2107
dw $A460, $0B00, $2112, $2113, $2114, $2115, $2116, $2117
dw $0060, $7E40, $2111
dw $8063, $3E41, $2111
dw $0060, $3EC0, $2111
dw $0160, $3EC0, $2111
dw $0C60, $3EC0, $2111
dw $0D60, $3EC0, $2111
dw $1E60, $3EC0, $2111
dw $1F60, $3EC0, $2111
; left side border
dw $6260, $1AC0, $2110
dw $6B60, $1AC0, $6110
dw $2262, $0100, $A100
dw $2362, $0E40, $A101
dw $2B62, $0100, $E100
; right side top area border
dw $4E60, $0100, $2100
dw $4F60, $1A40, $2101
dw $5D60, $0100, $6100
dw $6E60, $1AC0, $2110
dw $7D60, $1AC0, $6110
dw $2E62, $0100, $A100
dw $2F62, $1A40, $A101
dw $3D62, $0100, $E100
; right side bottom area border
dw $8E62, $0100, $2100
dw $8F62, $1A40, $2101
dw $9D62, $0100, $6100
dw $AE62, $06C0, $2110
dw $BD62, $06C0, $6110
dw $2E63, $0100, $A100
dw $2F63, $1A40, $A101
dw $3D63, $0100, $E100
; blank below left side
dw $4262, $4440, $2111
dw $6262, $4440, $2111
dw $8262, $1240, $2111
dw $A262, $1240, $2111
dw $C262, $1240, $2111
dw $E262, $1240, $2111
dw $0263, $1240, $2111
dw $2263, $1240, $2111
dw $4263, $4440, $2111
dw $6263, $4440, $2111
; map area inside top area
dw $6F60, $1A40, $1D11
dw $8F60, $1A40, $1D11
dw $AF60, $1A40, $1D11
dw $CF60, $1A40, $1D11
dw $EF60, $1A40, $1D11
dw $0F61, $1A40, $1D11
dw $2F61, $1A40, $1D11
dw $4F61, $1A40, $1D11
dw $6F61, $1A40, $1D11
dw $8F61, $1A40, $1D11
dw $AF61, $1A40, $1D11
dw $CF61, $1A40, $1D11
dw $EF61, $1A40, $1D11
dw $0F62, $1A40, $1D11
; center square
dw $3561, $0300
dw $5D4C, $1D4C
dw $5561, $0300
dw $DD4C, $9D4C
; map area inside bottom area
dw $AF62, $1A40, $1D11
dw $CF62, $1B00
dw $1D11, $5D4C, $1D4C, $1D11, $5D4C, $1D4C, $1D11, $5D4C, $1D4C, $1D11, $1D11, $5D4C, $1D4C, $1D11
dw $EF62, $1B00
dw $1D11, $DD4C, $9D4C, $1D11, $DD4C, $9D4C, $1D11, $DD4C, $9D4C, $1D11, $1D11, $DD4C, $9D4C, $1D11
dw $0F63, $1A40, $1D11
db $FF
View File
+3 -1
View File
@@ -115,7 +115,9 @@ RTL
CheckTransitionOverworld:
STA.b $8A
STA.w $040A ; what we wrote over
JML MaybeMarkFluteSpotVisited
JSL MaybeMarkFluteSpotVisited
LDA.b $8A
RTL
CheckFlute:
LDA.l FluteBitfield
+208
View File
@@ -0,0 +1,208 @@
org $B9F000
SupertileRoomShapes:
incsrc data/supertile_shapes.asm
warnpc $B9F800
padbyte $FF
pad $B9F800
org $B9F800
DungeonMapData:
db $02, $04, $00, $00 ; Sewers
db $1A, $00, $00, $00 ; Hyrule Castle
db $00, $06, $00, $00 ; Eastern Palace
db $04, $14, $00, $00 ; Desert Palace
db $14, $0C, $01, $00 ; Castle Tower
db $0C, $10, $00, $00 ; Swamp Palace
db $08, $0A, $00, $00 ; Palace of Darkness
db $12, $18, $00, $00 ; Misery Mire
db $0A, $16, $FF, $00 ; Skull Woods
db $16, $0E, $00, $00 ; Ice Palace
db $06, $08, $01, $00 ; Tower of Hera
db $10, $12, $00, $00 ; Thieves Town
db $0E, $1A, $00, $00 ; Turtle Rock
db $18, $02, $01, $00 ; Ganon's Tower
db $1A, $02, $00, $00 ; Extra
db $1A, $02, $00, $00 ; Extra
struct DungeonMapData DungeonMapData
.prev: skip 1
.next: skip 1
.floor: skip 1
.unused: skip 1
endstruct
warnpc $B9F840
org $B9F840
DoorConnectionPointers:
skip $20
warnpc $B9F860
org $B9F860
CustomMapPointers:
skip $20
warnpc $B9F880
org $B9F880
LootTypeIcons:
dw $0B00, $0B00, $0B00, $0B00 ; 00 - nothing
dw $2DCB, $6DCB, $ADCB, $EDCB ; 01 - unknown - dot
dw $29EB, $69EB, $29FB, $69FB ; 02 - junk - pot
dw $29CA, $69CA, $29DA, $29DB ; 03 - small key
dw $29E9, $69E9, $29F9, $69F9 ; 04 - triforce piece
dw $29DD, $69DD, $A9DD, $E9DD ; 05 - safety - plus
dw $29EC, $69EC, $29FC, $69FC ; 06 - less important item - small chest
dw $29CE, $29CF, $29DE, $29DF ; 07 - map
dw $29E8, $69E8, $29F8, $69F8 ; 08 - compass
dw $29CA, $69CA, $29DA, $29DB ; 09 - small key
dw $29C8, $69C8, $29D8, $29D9 ; 0A - big key
dw $29ED, $69ED, $29FD, $69FD ; 0B - important inventory item - big chest
dw $29CC, $29CD, $29DC, $69DC ; 0C - pendant
dw $2DC9, $69C9, $A9C9, $EDC9 ; 0D - crystal
dw $29E9, $69E9, $29F9, $69F9 ; 0E - triforce piece
dw $29EA, $69EA, $29FA, $69FA ; 0F - triforce
warnpc $B9F900
org $B9F900
LootTypeMapping:
incsrc data/item_mapping.asm
warnpc $B9FA00
org $B9FA00
; Room ID mappings to bit to check for presence and address of item drop
MiscLocations:
dw $00C8 : db $04 : dl HeartContainer_ArmosKnights
dw $0033 : db $04 : dl HeartContainer_Lanmolas
dw $0007 : db $04 : dl HeartContainer_Moldorm
dw $005A : db $04 : dl HeartContainer_HelmasaurKing
dw $0006 : db $04 : dl HeartContainer_Arrghus
dw $0029 : db $04 : dl HeartContainer_Mothula
dw $00AC : db $04 : dl HeartContainer_Blind
dw $00DE : db $04 : dl HeartContainer_Kholdstare
dw $0090 : db $04 : dl HeartContainer_Vitreous
dw $00A4 : db $04 : dl HeartContainer_Trinexx
dw $0073 : db $05 : dl BonkKey_Desert ; torch
dw $008C : db $05 : dl BonkKey_GTower ; torch
dw $0087 : db $05 : dl StandingKey_Hera
dw $FFFF : db $FF : dl $FFFFFF ; Placeholders
dw $FFFF : db $FF : dl $FFFFFF
dw $FFFF : db $FF : dl $FFFFFF ; Aga 1? ($0020)
dw $FFFF : db $FF : dl $FFFFFF ; Ice Armos? ($001C)
dw $FFFF : db $FF : dl $FFFFFF ; Lanmolas 2? ($0033)
dw $FFFF : db $FF : dl $FFFFFF ; Moldorm 2? ($004D)
dw $FFFF : db $FF : dl $FFFFFF ; Aga 2? ($000D)
dw $FFFF
warnpc $B9FA9A
org $B9FA9A
MapHUDPalette:
dw $0000, $3ED8, $2E54
warnpc $B9FAA0
org $B9FAA0
PrizeLocations:
dw $00C8 : db $02 ; Armos Knights
dw $0033 : db $03 ; Lanmolas
dw $0006 : db $05 ; Arrghus
dw $005A : db $06 ; Helmasaur King
dw $0090 : db $07 ; Vitreous
dw $0029 : db $08 ; Mothula
dw $00DE : db $09 ; Kholdstare
dw $0007 : db $0A ; Moldorm
dw $00AC : db $0B ; Blind
dw $00A4 : db $0C ; Trinexx
dw $FFFF
warnpc $B9FAC0
org $B9FAC0
SupertileEntrances:
incsrc data/entrance_tiles.asm
warnpc $B9FB00
padbyte $FF
pad $B9FB00
; $B9FB00
DungeonLabels:
dw $2550, $2579 ; Sewers
dw $2564, $255F ; Hyrule Castle
dw $2561, $256C ; Eastern Palace
dw $2560, $256C ; Desert Palace
dw $255D, $2570 ; Agahnim's Tower
dw $256F, $256C ; Swamp Palace
dw $256C, $2560 ; Palace of Darkness
dw $2569, $2569 ; Misery Mire
dw $256F, $2573 ; Skull Woods
dw $2565, $256C ; Ice Palace
dw $2570, $2564 ; Tower of Hera
dw $2570, $2570 ; Thieves' Town
dw $2570, $256E ; Turtle Rock
dw $2563, $2570 ; Ganon's Tower
dw $25A4, $25A4 ; Reserved
dw $25A4, $25A4 ; Reserved
; $B9FB40
warnpc $B9FE00
org $B9FE00
JunkTable:
incsrc data/junk_items.asm
warnpc $B9FF00
org $B9FF00
; $00 - do not show anything
; $01 - show presence of supertile as dark square
; $02 - show presence of quadrants as dark squares
; $03 - show outline of shape with walls but no interior details (palette 5)
; $04 - show dark with stairs but no hole/internal walls (palette 4)
; $05 - show mostly lit with stairs and holes/internal walls (palette 3)
; $06 - show fully lit with stairs and holes/internal walls (palette 2)
ShowRooms:
.default
db $02
.have_map
db $05
.have_compass
db $03
.visited_tile
db $04
.reserved
skip 3
.dark_room_cap
db $01
warnpc $B9FF08
org $B9FF08
; $00 - do not show anything
; $01 - show presence of unobtained items
; $02 - show category of item
ShowItems:
.default
db $00
.have_map
db $00
.have_compass
db $02
.visited_tile
db $01
.reserved
skip 4
warnpc $B9FF10
org $B9FF10
; ---P bepc
; P - dungeon prizes
; b - bosses (and torches in GT and desert, plus hera basement standing item)
; e - enemy drops
; p - pots
; c - chests
ItemSources:
db $09
; $B9FF11
AlwaysShowCompass:
db $01
+25
View File
@@ -0,0 +1,25 @@
org $B9EE00
;================================================================================
warnpc $B9EEE0
org $B9EEE0
;--------------------------------------------------------------------------------
B9Source:
; $01 = GK Baserom
; $FF = GK Adjuster Patch
db $01
;--------------------------------------------------------------------------------
GKRomVersion:
; $01 = Dungeon Maps
; .., $01 = Dark rooms don't show on map from visition
; .., $02 = OW Fog and Grid modes
db $01, $02, $00
;--------------------------------------------------------------------------------
;================================================================================
warnpc $B9EEF0
org $B9EEF0
GKRandomizerVersion:
padbyte $00
pad $B9EF00
;--------------------------------------------------------------------------------
+1 -1
View File
@@ -70,7 +70,7 @@ GetAgahnimLightning:
;1 = Forbid
AllowJoypadInput:
LDA.l PermitSQFromBosses : BEQ .fullCheck
LDA.w RoomItemsTaken : AND.b #$80 : BEQ .fullCheck
JSL CheckBossDropTouched : BEQ .fullCheck
LDA.w MedallionFlag : ORA.w CutsceneFlag ; we have heart container, do short check
RTL
.fullCheck
+52 -21
View File
@@ -40,14 +40,14 @@ RTL
dw .crystals
dw .pendant_bosses
dw .crystal_bosses
dw .bosses
dw .prize_bosses
dw .agahnim_defeated
dw .agahnim2_defeated
dw .goal_item
dw .collection_rate
dw .custom_goal
dw .bingo
dw .success
dw .all_bosses
dw .success
dw .success
dw .success
@@ -70,19 +70,24 @@ RTL
CMP.b #$07 : RTS
.pendant_bosses
PHP
LDA.b #$02
LDA.b #$20
JSR CheckForBossesDefeated : PLP : BCC +
CMP.b #$03 : RTS
.crystal_bosses
PHP
LDA.b #$01
LDA.b #$10
JSR CheckForBossesDefeated : PLP : BCC +
CMP.b #$07 : RTS
.bosses
.all_bosses
PHP
LDA.b #$30
JSR CheckForBossesDefeated : PLP : BCC +
CMP.b #$10 : RTS
.prize_bosses
PHP
LDA.b #$00
JSR CheckForBossesDefeated : PLP : BCC +
CMP.b #$10 : RTS
CMP.b #$0A : RTS
+ CMP.b [Scrap00], Y : INY : RTS
.agahnim_defeated
LDA.l ProgressIndicator : CMP.b #$03 : RTS
@@ -346,7 +351,7 @@ CheckTowerOpen:
;---------------------------------------------------------------------------------------------------
CheckAgaForPed:
REP #$20
; seems light_speed option to force blue balls is unused for now
; seems light_speed option to force blue balls is unused for now
BRA .vanilla
.light_speed
@@ -368,12 +373,38 @@ CheckAgaForPed:
RTL
;---------------------------------------------------------------------------------------------------
BossPrizeFlags:
; $00 = all prize bosses
db $00
db $01, $01, $01, $01, $01, $01, $01 ; crystals
db $01, $01, $01 ; pendants
db $00, $00, $00, $00, $00 ; padding
; $10 = all crystal bosses
db $00
db $01, $01, $01, $01, $01, $01, $01 ; crystals
db $00, $00, $00 ; pendants
db $00, $00, $00, $00, $00 ; padding
; $20 = all pendant bosses
db $00
db $00, $00, $00, $00, $00, $00, $00 ; crystals
db $01, $01, $01 ; pendants
db $00, $00, $00, $00, $00 ; padding
; $30 = all bosses
db $01 ; agas
db $01, $01, $01, $01, $01, $01, $01 ; crystals
db $01, $01, $01 ; pendants
db $00, $00, $00, $00, $00 ; padding
CheckForBossesDefeated:
PHB : PHX : PHY
STA.b Scrap04 ; 0 = check all, 1 = check crystals, 2 = check pendants
; $00 = check prize bosses
; $10 = check crystal bosses
; $20 = check pendant bosses
; $30 = check all bosses
STA.b Scrap04
LDA.b #CrystalPendantFlags_3>>16
LDA.b #bank(CrystalPendantFlags_3)
PHA : PLB
STZ.b Scrap03 ; count of number of bosses killed
@@ -381,22 +412,22 @@ CheckForBossesDefeated:
REP #$30
LDY.w #10
LDY.w #11
.next_check
LDA.w CrystalPendantFlags_3+2,Y : AND.w #$00FF : BEQ .skip
CMP.w #$0008 ; C set = pendant, C clear = crystal
LDA.b Scrap04 : BEQ .proceed
PHP : ROR : BCC +
PLP : BCS .skip : BRA .proceed
+ PLP : BCC .skip
SEP #$30
LDA.w CrystalPendantFlags_3+2, Y
CLC : ADC.b Scrap04
TAX
LDA.l BossPrizeFlags, X
REP #$30
BEQ .skip
.proceed
TYA : ASL : TAX
TYA : ASL A : TAX
LDA.l DungeonMapBossRooms+4,X
ASL : TAX
LDA.l RoomDataWRAM.l,X
LDA.l DungeonMapBossRooms+4, X
ASL A : TAX
LDA.l RoomDataWRAM.l, X
AND.w #$0800 : BEQ .skip
INC.b Scrap03
+9 -2
View File
@@ -2,13 +2,20 @@
; Randomize Half Magic Bat
;--------------------------------------------------------------------------------
GetMagicBatItem:
JSL ItemSet_MagicBat
%GetPossiblyEncryptedItem(MagicBatItem, SpriteItemValues)
CMP.b #$FF : BEQ .normalLogic
TAY
PHA : LDA.l MagicBatItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
PHA
JSL ShieldCheck
BCC .have_shield
LDA.l MagicBatItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
JSL ItemSet_MagicBat
PLA
STZ.b ItemReceiptMethod ; 0 = Receiving item from an NPC or message
JML Link_ReceiveItem
.have_shield
PLA
RTL
.normalLogic
LDA.l HalfMagic
STA.l MagicConsumption
+26 -5
View File
@@ -5,8 +5,17 @@ HeartPieceGet:
PHX : PHY
LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
LDY.w SprSourceItemId, X
JSL HeartGet
BCC +
JSL MaybeMarkDigSpotCollected
.skipLoad
+
PLY : PLX
RTL
;--------------------------------------------------------------------------------
HeartGet:
JSL ShieldCheck
BCC .skip
LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID
CPY.b #$26 : BNE .not_heart ; don't add a 1/4 heart if it's not a heart piece
CMP.b #$00 : BNE .not_heart
@@ -16,15 +25,27 @@ HeartPieceGet:
STZ.w ItemReceiptMethod ; 0 = Receiving item from an NPC or message
JSL Link_ReceiveItem
JSL MaybeUnlockTabletAnimation
PLY : PLX
RTL
SEC
RTL
.skip
JSL MaybeFreeLinkFromTablet
CLC
RTL
;--------------------------------------------------------------------------------
HeartContainerGet:
PHX : PHY
JSL IncrementBossSword
LDY.w SprSourceItemId, X
BRA HeartPieceGet_skipLoad
JSL HeartGet
PLY : PLX
BCC +
LDA.w RoomItemsTaken
ORA.b #$80
STA.w RoomItemsTaken
+
LDA.b #$01
STA.l BossDropTouched
RTL
;--------------------------------------------------------------------------------
DrawHeartPieceGFX:
PHP
+80 -10
View File
@@ -120,7 +120,7 @@ JSL AddBonkTremors : NOP #4
; Bonk Breakable Walls
;--------------------------------------------------------------------------------
org $81CF8E ; CF8E <- Bank01.asm : 11641 (LDA $0372 : AND.w #$00FF)
JSL BonkBreakableWall : NOP #2
JSL ValidDashCheck : NOP #2
;--------------------------------------------------------------------------------
;================================================================================
@@ -139,6 +139,11 @@ GravestoneHook_continue:
org $87C106
moveGravestone:
;--------------------------------------------------------------------------------
org $899A30
JSL ValidDashCheck : NOP #2
org $899A3A
JSL ValidDashCheck : NOP #2
;--------------------------------------------------------------------------------
;================================================================================
; Jump Down Ledge
@@ -840,10 +845,10 @@ JSL LoadModifiedIceFloorValue_a01 : NOP
org $83FC16 ; <- 1FC16 ($A8, $B8, $3D, $D0, $B8, $3D)
db $B1, $C6, $F9, $C9, $C6, $F9 ; data insert - 2 chests, fat fairy room
; unused item receipts
; unused item receipts - moved to pyramid fairy
org $81E97E
dw $0116 : db $08
dw $0116 : db $25
dw $0116 : db $5E
dw $0116 : db $64
;--------------------------------------------------------------------------------
org $86B489 ; <- 33489 - sprite_smithy_bros.asm : 473 (LDA $7EF359 : CMP.b #$03 : BCS .tempered_sword_or_better)
JML GetSmithSword : NOP #4
@@ -1048,8 +1053,12 @@ Overworld_Entrance_BRANCH_EPSILON: ; go here to lock doors
org $81C50D : JSL CheckDungeonWorld
org $81C517 : JSL CheckDungeonCompletion
org $81C523 : JSL CheckDungeonCompletion
org $81C710 : JSL CheckSpawnPrize
BCS RoomTag_GetHeartForPrize_spawn_prize : BRA RoomTag_GetHeartForPrize_delete_tag
org $81C709 : JSL CheckBossDropTouched : NOP
org $81C710
JSL CheckSpawnPrize
BCS RoomTag_GetHeartForPrize_spawn_prize
BRA RoomTag_GetHeartForPrize_delete_tag
warnpc $81C731
org $81C742 : JSL SpawnDungeonPrize : PLA : RTS
org $8799EA : JML SetItemPose
org $88C415 : JSL PendantMusicCheck
@@ -1061,6 +1070,7 @@ org $88C622 : BCC ItemReceipt_Animate_continue
org $88C6BA : JSL CheckPoseItemCoordinates
org $88C6C3 : JSL PrepPrizeVRAMHigh
org $88C6F4 : JSL PrepPrizeVRAMLow
org $88CAC4 : JSL CheckBossDropTouched : NOP
org $88CAD6 : JSL HandleDropSFX : NOP #2
org $88CADC : BCC Ancilla29_MilestoneItemReceipt_skip_crystal_sfx
org $88CAE9 : JSL PrepPrizeTile
@@ -1512,8 +1522,9 @@ JSL DrawHeartPiecesMenu : BRA DrawEquipment_in_a_dungeon
;================================================================================
; 300 Rupee NPC
;--------------------------------------------------------------------------------
org $9EF060 ; <- F7060 - sprite_shopkeeper.asm:242 (INC $0D80, X)
JSL Set300RupeeNPCItem : NOP
org $9EF058 ; <- F7060 - sprite_shopkeeper.asm:242 (INC $0D80, X)
JSL Set300RupeeNPCItem
BCS + : RTS : NOP #6 : +
;================================================================================
; Tree Kid Fix
@@ -2000,7 +2011,7 @@ org $85EE53 ; <- 2EE53 - mushroom.asm : 22
JSL ItemCheck_Mushroom : NOP #2
;--------------------------------------------------------------------------------
org $85EE8C ; <- 2EE8C - mushroom.asm : 69
JSL ItemSet_Mushroom : NOP
JSL ItemSet_Mushroom : NOP #5
;--------------------------------------------------------------------------------
org $85F53E ; <- 2F53E - sprite_potion_shop.asm : 40
JSL ItemCheck_Powder : CMP.b #$20
@@ -2014,8 +2025,15 @@ JSL ItemCheck_MagicBat : BEQ + : RTS : NOP : +
;================================================================================
org $86BD6C ; <- 33D6C - sprite_middle_aged_man.asm:143 (JSL Link_ReceiveItem)
JSL Multiworld_MiddleAgedMan_ReactToSecretKeepingResponse
BRA + : NOP #8 : +
;--------------------------------------------------------------------------------
org $86BE70 ; <- 33E72 - bank_06.asm:11877
BRA + : NOP #10 : +
org $86BE81 ; <- 33E81 - sprite_hobo.asm:150 (JSL Link_ReceiveItem)
JSL Multiworld_Hobo_GrantBottle
BRA + : NOP #8 : +
;--------------------------------------------------------------------------------
org $8589B4 ; <- 289B4 ; sprite_master_sword.asm:183 (JSL Link_ReceiveItem)
JSL Multiworld_MasterSword_GrantToPlayer
;================================================================================
@@ -2028,7 +2046,10 @@ org $85EF79 ; <- 2EF79 - sprite_heart_upgrades.asm:128 (JSL Sprite_PrepAndDrawSi
JSL DrawHeartContainerGFX
;--------------------------------------------------------------------------------
org $85EFCE ; <- 2EFCE - sprite_heart_upgrades.asm:176 (JSL Link_ReceiveItem)
JSL HeartContainerGet
JSL HeartContainerGet ; this also handles setting the boss-killed flag if appropriate
PLX
RTS
warnpc $85EFDC
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
org $8799B1 ; 399B1 - Bank07.asm:4063 (CPY.b #$3E : BNE .notHeartContainer)
@@ -2054,10 +2075,13 @@ JSL HeartPieceSpawnDelayFix
;--------------------------------------------------------------------------------
org $85F08A ; <- 2F08A - sprite_heart_upgrades.asm : 324 - (LDA $7EF36B : INC A : AND.b #$03 : STA $7EF36B : BNE .got_4_piecese) item determination
JSL HeartPieceGet
PHP
JSL DynamicDrawCleanup
PLP : BCC +
JSL IsMedallion
BCS + : BRA Sprite_EB_HeartPiece_handle_flags : + ; Don't change OW flags if we're
STZ.w SpriteAITable, X : RTS ; getting a tablet item
warnpc $85F0C0
;--------------------------------------------------------------------------------
org $86C0B0 ; <- 340B0 - sprite prep
JSL HeartPieceSpritePrep
@@ -2102,6 +2126,11 @@ JSL FlipperScrollWarp
;--------------------------------------------------------------------------------
;org $878F51 ; <- 38F51 - Bank07.asm:2444 (JSR $AE54 ; $3AE54 IN ROM)
;JSL OnEnterWater : NOP
;--------------------------------------------------------------------------------
; Fixes getting bumped while swimming, unable to screen transition
org $879632
LinkState_Swimming:
JSL FixSwimBump
;================================================================================
; Floodgate Softlock Fix
;--------------------------------------------------------------------------------
@@ -2818,3 +2847,44 @@ org $8DFB63 ; bank_0D.asm@18092 (LDA.l $7EF33F, X : AND.w #$00FF)
JSL CheckFluteInHUD
NOP #3
;--------------------------------------------------------------------------------
;================================================================================
; Pikit Nonsense
;--------------------------------------------------------------------------------
org $81EC39
JSL SmallChest_ShieldCheck
BCC Dungeon_OpenKeyedObject_couldntFindChest+1
org $81EC17
JSL BigChest_ShieldCheck
BCC Dungeon_OpenKeyedObject_couldntFindChest
NOP #2
org $9E8D6F
JML PikitSteal
org $9E8CF2
JSL PikitDigest
NOP #2
org $879A52
JSL LinkSnoring
org $879AAD
JSL LinkAwaken
org $879A31
JSL TuckLink
NOP #2
org $80F950
NOP #2
org $81EEB3
JSL MaybeFlagVoOChestGamePrize
BCS ContinueVoOCheck
PLB : RTL
org $81EEC7
ContinueVoOCheck:
+5 -4
View File
@@ -114,14 +114,15 @@ StartingGenericKeys: skip 1 ; PC 0x18338B
InitInventoryTracking: skip 2 ; PC 0x18338C \ Need to set bits here for silver arrows,
InitBowTracking: skip 2 ; PC 0x18338E / boomerangs, powder/mushroom, etc
InitItemLimitCounts: skip 16 ; PC 0x183390
skip 34 ;
skip 32 ;
InitPikitItem: dw $0004 ;
InitFluteBitfield: db $00 ;
InitSpecialWeaponLevel: db $00 ;
InitItemOnB: db $00 ;
InitProgressIndicator: db $02 ; PC 0x1833C5 - Set to $80 for instant post-aga with standard
InitProgressFlags: db $14 ; PC 0x1833C6 - Set to $00 for standard
InitProgressIndicator: db $00 ; PC 0x1833C5 - Set to $80 for instant post-aga with standard
InitProgressFlags: db $04 ; PC 0x1833C6 - Set to $00 for standard
InitMapIcons: skip 1 ; PC 0x1833C7
InitStartingEntrance: db $01 ; PC 0x1833C8 - Set to $00 for standard
InitStartingEntrance: db $00 ; PC 0x1833C8 - Set to $00 for standard
InitNpcFlagsVanilla: skip 1 ; PC 0x1833C9
InitCurrentWorld: skip 1 ; PC 0x1833CA
skip 1 ; PC 0x1833CB
+21 -46
View File
@@ -648,16 +648,23 @@ RTL
CollectPowder:
LDY.w SprSourceItemId, X ; Retrieve stored item type
BNE +
; if for any reason the item value is 0 reload it, just in case
%GetPossiblyEncryptedItem(WitchItem, SpriteItemValues) : TAY
+ PHA
LDA.l WitchItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
LDA.b #$01 : STA.l ShopEnableCount
; if for any reason the item value is 0 reload it, just in case
%GetPossiblyEncryptedItem(WitchItem, SpriteItemValues) : TAY
+
PHA
JSL ShieldCheck
BCC .skip
LDA.l WitchItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
LDA.b #$01 : STA.l ShopEnableCount
PLA
STZ.w ItemReceiptMethod ; item from NPC
JSL Link_ReceiveItem
PHA : LDA.b #$00 : STA.l ShopEnableCount : STA.l PowderFlag : PLA
PHA : LDA.b #$00 : STA.l ShopEnableCount : STA.l PowderFlag
JSL ItemSet_Powder
.skip
PLA
RTL
;--------------------------------------------------------------------------------
@@ -792,45 +799,13 @@ RTL
}
;--------------------------------------------------------------------------------
MaybePlaySelectSFX:
LDA.w DungeonID : BMI .not_dungeon
.play
LDA.b #$20 : STA.w SFX3 ; menu select sound
RTL
.not_dungeon
LDA.l HUDDungeonItems : BIT.b #$13 : BEQ .dont_play
BIT.b #$0C : BEQ .dont_play
BRA .play
.dont_play
RTL
;--------------------------------------------------------------------------------
; A = item id being collected
ItemGetAlternateSFX:
PEA.w $C567 ; SNES to RTS to in bank 08
LDA.w AncillaGet, X : CMP.b #$4A : BNE +
; collecting pre-activated flute
LDA.b #$13 : JML Ancilla_SFX2_Near
+ ; not pre-activated flute
JSL.l ItemIsJunk : BEQ .normal
.junk
LDA.b #$3B : JML Ancilla_SFX3_Near ; what we wrote over
.normal
LDA.b #$0F : JML Ancilla_SFX3_Near ; what we wrote over
; A = item id being collected
ItemGetOverworldAlternateSFX:
CPY.b #$4A : BNE +
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$13 : STA.w SFX2
LDA.w DungeonID : BMI .not_dungeon
.play
LDA.b #$20 : STA.w SFX3 ; menu select sound
RTL
+ ; normal itemget sfx
JSL.l ItemIsJunk : BEQ .normal
.junk
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$3B : STA.w SFX3
.not_dungeon
LDA.l HUDDungeonItems : BIT.b #$13 : BEQ .dont_play
BIT.b #$0C : BEQ .dont_play
BRA .play
.dont_play
RTL
.normal
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$0F : STA.w SFX3 ; what we wrote over
RTL
;--------------------------------------------------------------------------------
+93 -93
View File
@@ -416,40 +416,40 @@ macro SpriteProps(id, chest_width, standing_width, chest_pal, standing_pal, addr
pullpc
endmacro
%SpriteProps($00, 0, 2, $05, $02, PalettesVanilla_blue_ice+$0E) ; 00 - Fighter sword & Shield
%SpriteProps($01, 0, 2, $05, $05, PalettesCustom_master_sword) ; 01 - Master sword
%SpriteProps($02, 0, 2, $05, $01, PalettesCustom_tempered_sword) ; 02 - Tempered sword
%SpriteProps($03, 0, 2, $05, $04, PalettesCustom_golden_sword) ; 03 - Golden sword
%SpriteProps($00, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 00 - Fighter sword & Shield
%SpriteProps($01, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 01 - Master sword
%SpriteProps($02, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 02 - Tempered sword
%SpriteProps($03, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 03 - Golden sword
%SpriteProps($04, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 04 - Fighter shield
%SpriteProps($05, 2, 2, $05, $80, PalettesCustom_red_shield) ; 05 - Fire shield
%SpriteProps($06, 2, 2, $05, $80, PalettesCustom_mirror_shield) ; 06 - Mirror shield
%SpriteProps($07, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 07 - Fire rod
%SpriteProps($08, 0, 0, $02, $02, PalettesVanilla_blue_ice+$0E) ; 08 - Ice rod
%SpriteProps($09, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 09 - Hammer
%SpriteProps($0A, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 0A - Hookshot
%SpriteProps($0B, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 0B - Bow
%SpriteProps($0C, 0, 0, $02, $02, PalettesVanilla_blue_ice+$0E) ; 0C - Blue Boomerang
%SpriteProps($0D, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 0D - Powder
%SpriteProps($07, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 07 - Fire rod
%SpriteProps($08, 0, 0, $02, $80, PalettesCustom_fighter_shield) ; 08 - Ice rod
%SpriteProps($09, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 09 - Hammer
%SpriteProps($0A, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 0A - Hookshot
%SpriteProps($0B, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 0B - Bow
%SpriteProps($0C, 0, 0, $02, $80, PalettesCustom_fighter_shield) ; 0C - Blue Boomerang
%SpriteProps($0D, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 0D - Powder
%SpriteProps($0E, 2, 0, $02, $03, PalettesVanilla_blue_ice+$0E) ; 0E - Bottle refill (bee)
%SpriteProps($0F, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 0F - Bombos
%SpriteProps($10, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 10 - Ether
%SpriteProps($11, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 11 - Quake
%SpriteProps($12, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 12 - Lamp
%SpriteProps($13, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 13 - Shovel
%SpriteProps($14, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 14 - Flute
%SpriteProps($15, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 15 - Somaria
%SpriteProps($16, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 16 - Bottle
%SpriteProps($0F, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 0F - Bombos
%SpriteProps($10, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 10 - Ether
%SpriteProps($11, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 11 - Quake
%SpriteProps($12, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 12 - Lamp
%SpriteProps($13, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 13 - Shovel
%SpriteProps($14, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 14 - Flute
%SpriteProps($15, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 15 - Somaria
%SpriteProps($16, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 16 - Bottle
%SpriteProps($17, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 17 - Heart piece
%SpriteProps($18, 0, 0, $02, $02, PalettesVanilla_blue_ice+$0E) ; 18 - Byrna
%SpriteProps($19, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 19 - Cape
%SpriteProps($1A, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 1A - Mirror
%SpriteProps($1B, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 1B - Glove
%SpriteProps($1C, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 1C - Mitts
%SpriteProps($1D, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 1D - Book
%SpriteProps($1E, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 1E - Flippers
%SpriteProps($1F, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 1F - Pearl
%SpriteProps($18, 0, 0, $02, $80, PalettesCustom_fighter_shield) ; 18 - Byrna
%SpriteProps($19, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 19 - Cape
%SpriteProps($1A, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 1A - Mirror
%SpriteProps($1B, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 1B - Glove
%SpriteProps($1C, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 1C - Mitts
%SpriteProps($1D, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 1D - Book
%SpriteProps($1E, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 1E - Flippers
%SpriteProps($1F, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 1F - Pearl
%SpriteProps($20, 2, 2, $86, $86, PalettesCustom_crystal) ; 20 - Crystal
%SpriteProps($21, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 21 - Net
%SpriteProps($21, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 21 - Net
%SpriteProps($22, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 22 - Blue mail
%SpriteProps($23, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 23 - Red mail
%SpriteProps($24, 0, 0, $02, $04, PalettesVanilla_blue_ice+$0E) ; 24 - Small key
@@ -457,11 +457,11 @@ endmacro
%SpriteProps($26, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 26 - Heart container from 4/4
%SpriteProps($27, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 27 - Bomb
%SpriteProps($28, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 28 - 3 bombs
%SpriteProps($29, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 29 - Mushroom
%SpriteProps($2A, 0, 0, $01, $01, PalettesVanilla_red_melon+$0E) ; 2A - Red boomerang
%SpriteProps($2B, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 2B - Full bottle (red)
%SpriteProps($2C, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 2C - Full bottle (green)
%SpriteProps($2D, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 2D - Full bottle (blue)
%SpriteProps($29, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 29 - Mushroom
%SpriteProps($2A, 0, 0, $01, $80, PalettesCustom_fighter_shield) ; 2A - Red boomerang
%SpriteProps($2B, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 2B - Full bottle (red)
%SpriteProps($2C, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 2C - Full bottle (green)
%SpriteProps($2D, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 2D - Full bottle (blue)
%SpriteProps($2E, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 2E - Potion refill (red)
%SpriteProps($2F, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 2F - Potion refill (green)
%SpriteProps($30, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 30 - Potion refill (blue)
@@ -474,10 +474,10 @@ endmacro
%SpriteProps($37, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 37 - Green pendant
%SpriteProps($38, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 38 - Red pendant
%SpriteProps($39, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 39 - Blue pendant
%SpriteProps($3A, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 3A - Bow And Arrows
%SpriteProps($3B, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 3B - Silver Bow
%SpriteProps($3C, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 3C - Full bottle (bee)
%SpriteProps($3D, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 3D - Full bottle (fairy)
%SpriteProps($3A, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 3A - Bow And Arrows
%SpriteProps($3B, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 3B - Silver Bow
%SpriteProps($3C, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 3C - Full bottle (bee)
%SpriteProps($3D, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 3D - Full bottle (fairy)
%SpriteProps($3E, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 3E - Boss heart
%SpriteProps($3F, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 3F - Sanc heart
%SpriteProps($40, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 40 - 100 rupees
@@ -488,23 +488,23 @@ endmacro
%SpriteProps($45, 0, 0, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 45 - Small magic
%SpriteProps($46, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 46 - 300 rupees
%SpriteProps($47, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 47 - 20 rupees green
%SpriteProps($48, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 48 - Full bottle (good bee)
%SpriteProps($49, 0, 2, $05, $02, PalettesCustom_fighter_shield) ; 49 - Tossed fighter sword
%SpriteProps($4A, 2, 2, $02, $02, PalettesVanilla_blue_ice+$0E) ; 4A - Active Flute
%SpriteProps($4B, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 4B - Boots
%SpriteProps($48, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 48 - Full bottle (good bee)
%SpriteProps($49, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 49 - Tossed fighter sword
%SpriteProps($4A, 2, 0, $02, $80, PalettesCustom_fighter_shield) ; 4A - Active Flute
%SpriteProps($4B, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 4B - Boots
%SpriteProps($4C, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 4C - Bomb capacity (50)
%SpriteProps($4D, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 4D - Arrow capacity (70)
%SpriteProps($4E, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 4E - 1/2 magic
%SpriteProps($4F, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 4F - 1/4 magic
%SpriteProps($50, 0, 2, $05, $02, PalettesCustom_master_sword) ; 50 - Safe master sword
%SpriteProps($4E, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 4E - 1/2 magic
%SpriteProps($4F, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 4F - 1/4 magic
%SpriteProps($50, 0, 0, $05, $80, PalettesCustom_fighter_shield) ; 50 - Safe master sword
%SpriteProps($51, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 51 - Bomb capacity (+5)
%SpriteProps($52, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 52 - Bomb capacity (+10)
%SpriteProps($52, 2, 0, $04, $80, PalettesCustom_fighter_shield) ; 52 - Bomb capacity (+10)
%SpriteProps($53, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 53 - Arrow capacity (+5)
%SpriteProps($54, 2, 2, $04, $04, PalettesVanilla_green_blue_guard+$0E) ; 54 - Arrow capacity (+10)
%SpriteProps($55, 2, 2, $04, $04, $0000) ; 55 - Programmable item 1
%SpriteProps($56, 2, 2, $04, $04, $0000) ; 56 - Programmable item 2
%SpriteProps($57, 2, 2, $04, $04, $0000) ; 57 - Programmable item 3
%SpriteProps($58, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 58 - Upgrade-only Silver Arrows
%SpriteProps($58, 2, 0, $01, $80, PalettesCustom_fighter_shield) ; 58 - Upgrade-only Silver Arrows
%SpriteProps($59, 0, 0, $03, $03, PalettesCustom_off_black) ; 59 - Rupoor
%SpriteProps($5A, 2, 2, $01, $01, $0000) ; 5A - Nothing
%SpriteProps($5B, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; 5B - Red clock
@@ -696,7 +696,7 @@ endmacro
%InventoryItem($01, $0081, SwordTime, $0000) ; 01 - Master sword
%InventoryItem($02, $0001, SwordTime, $0000) ; 02 - Tempered sword
%InventoryItem($03, $0081, SwordTime, $0000) ; 03 - Butter sword
%InventoryItem($04, $0081, $0000, $0000) ; 04 - Fighter shield
%InventoryItem($04, $0080, $0000, $0000) ; 04 - Fighter shield
%InventoryItem($05, $0081, $0000, $0000) ; 05 - Fire shield
%InventoryItem($06, $0081, $0000, $0000) ; 06 - Mirror shield
%InventoryItem($07, $0085, $0000, $0000) ; 07 - Fire rod
@@ -1220,40 +1220,40 @@ ItemReceiptGraphicsOffsets:
; for receipt and non-receipt drawing.
;===================================================================================================
StandingItemGraphicsOffsets:
dw $0860 ; 00 - Fighter Sword and Shield
dw $00E0 ; 01 - Master Sword
dw $0120 ; 02 - Tempered Sword
dw $0160 ; 03 - Butter Sword
dw BigDecompressionBuffer+$09E0 ; 00 - Fighter Sword and Shield
dw BigDecompressionBuffer+$09E0 ; 01 - Master Sword
dw BigDecompressionBuffer+$09E0 ; 02 - Tempered Sword
dw BigDecompressionBuffer+$09E0 ; 03 - Butter Sword
dw BigDecompressionBuffer+$09E0 ; 04 - Fighter Shield
dw BigDecompressionBuffer+$1940 ; 05 - Fire Shield
dw BigDecompressionBuffer+$0C80 ; 06 - Mirror Shield
dw BigDecompressionBuffer+$1C80 ; 07 - Fire Rod
dw BigDecompressionBuffer+$1C80 ; 08 - Ice Rod
dw BigDecompressionBuffer+$1CA0 ; 09 - Hammer
dw BigDecompressionBuffer+$1C60 ; 0A - Hookshot
dw BigDecompressionBuffer+$1C00 ; 0B - Bow
dw BigDecompressionBuffer+$1DE0 ; 0C - Boomerang
dw BigDecompressionBuffer+$1CC0 ; 0D - Powder
dw BigDecompressionBuffer+$09E0 ; 07 - Fire Rod
dw BigDecompressionBuffer+$09E0 ; 08 - Ice Rod
dw BigDecompressionBuffer+$09E0 ; 09 - Hammer
dw BigDecompressionBuffer+$09E0 ; 0A - Hookshot
dw BigDecompressionBuffer+$09E0 ; 0B - Bow
dw BigDecompressionBuffer+$09E0 ; 0C - Boomerang
dw BigDecompressionBuffer+$09E0 ; 0D - Powder
dw 0 ; 0E - Bottle Refill (bee)
dw BigDecompressionBuffer+$1440 ; 0F - Bombos
dw BigDecompressionBuffer+$1400 ; 10 - Ether
dw BigDecompressionBuffer+$1480 ; 11 - Quake
dw BigDecompressionBuffer+$10C0 ; 12 - Lamp
dw BigDecompressionBuffer+$11E0 ; 13 - Shovel
dw BigDecompressionBuffer+$0C40 ; 14 - Flute
dw BigDecompressionBuffer+$1C40 ; 15 - Somaria
dw BigDecompressionBuffer+$14C0 ; 16 - Bottle
dw BigDecompressionBuffer+$09E0 ; 0F - Bombos
dw BigDecompressionBuffer+$09E0 ; 10 - Ether
dw BigDecompressionBuffer+$09E0 ; 11 - Quake
dw BigDecompressionBuffer+$09E0 ; 12 - Lamp
dw BigDecompressionBuffer+$09E0 ; 13 - Shovel
dw BigDecompressionBuffer+$09E0 ; 14 - Flute
dw BigDecompressionBuffer+$09E0 ; 15 - Somaria
dw BigDecompressionBuffer+$09E0 ; 16 - Bottle
dw BigDecompressionBuffer+$0C00 ; 17 - Heartpiece
dw BigDecompressionBuffer+$1C40 ; 18 - Byrna
dw BigDecompressionBuffer+$1100 ; 19 - Cape
dw BigDecompressionBuffer+$1040 ; 1A - Mirror
dw BigDecompressionBuffer+$1D40 ; 1B - Glove
dw BigDecompressionBuffer+$1D40 ; 1C - Mitts
dw BigDecompressionBuffer+$1D80 ; 1D - Book
dw BigDecompressionBuffer+$1000 ; 1E - Flippers
dw BigDecompressionBuffer+$1180 ; 1F - Pearl
dw BigDecompressionBuffer+$09E0 ; 18 - Byrna
dw BigDecompressionBuffer+$09E0 ; 19 - Cape
dw BigDecompressionBuffer+$09E0 ; 1A - Mirror
dw BigDecompressionBuffer+$09E0 ; 1B - Glove
dw BigDecompressionBuffer+$09E0 ; 1C - Mitts
dw BigDecompressionBuffer+$09E0 ; 1D - Book
dw BigDecompressionBuffer+$09E0 ; 1E - Flippers
dw BigDecompressionBuffer+$09E0 ; 1F - Pearl
dw BigDecompressionBuffer+$08A0 ; 20 - Crystal
dw BigDecompressionBuffer+$0860 ; 21 - Net
dw BigDecompressionBuffer+$09E0 ; 21 - Net
dw BigDecompressionBuffer+$1900 ; 22 - Blue Mail
dw BigDecompressionBuffer+$1900 ; 23 - Red Mail
dw BigDecompressionBuffer+$1DC0 ; 24 - Small Key
@@ -1261,11 +1261,11 @@ StandingItemGraphicsOffsets:
dw BigDecompressionBuffer+$18C0 ; 26 - Heart Container from 4/4
dw BigDecompressionBuffer+$1080 ; 27 - Bomb
dw BigDecompressionBuffer+$1840 ; 28 - 3 bombs
dw BigDecompressionBuffer+$1540 ; 29 - Mushroom
dw BigDecompressionBuffer+$1DE0 ; 2A - Red boomerang
dw BigDecompressionBuffer+$1500 ; 2B - Full bottle (red)
dw BigDecompressionBuffer+$1500 ; 2C - Full bottle (green)
dw BigDecompressionBuffer+$1500 ; 2D - Full bottle (blue)
dw BigDecompressionBuffer+$09E0 ; 29 - Mushroom
dw BigDecompressionBuffer+$09E0 ; 2A - Red boomerang
dw BigDecompressionBuffer+$09E0 ; 2B - Full bottle (red)
dw BigDecompressionBuffer+$09E0 ; 2C - Full bottle (green)
dw BigDecompressionBuffer+$09E0 ; 2D - Full bottle (blue)
dw $0920 ; 2E - Potion refill (red)
dw $08A0 ; 2F - Potion refill (green)
dw $08E0 ; 30 - Potion refill (blue)
@@ -1278,10 +1278,10 @@ StandingItemGraphicsOffsets:
dw $0820 ; 37 - Green pendant
dw BigDecompressionBuffer+$0080 ; 38 - Blue pendant
dw BigDecompressionBuffer+$0080 ; 39 - Red pendant
dw BigDecompressionBuffer+$0920 ; 3A - Tossed bow
dw BigDecompressionBuffer+$08E0 ; 3B - Silvers
dw BigDecompressionBuffer+$09A0 ; 3C - Full bottle (bee)
dw BigDecompressionBuffer+$0960 ; 3D - Full bottle (fairy)
dw BigDecompressionBuffer+$09E0 ; 3A - Tossed bow
dw BigDecompressionBuffer+$09E0 ; 3B - Silvers
dw BigDecompressionBuffer+$09E0 ; 3C - Full bottle (bee)
dw BigDecompressionBuffer+$09E0 ; 3D - Full bottle (fairy)
dw BigDecompressionBuffer+$18C0 ; 3E - Boss heart
dw BigDecompressionBuffer+$18C0 ; 3F - Sanc heart
dw BigDecompressionBuffer+$0D20 ; 40 - 100 rupees
@@ -1292,25 +1292,25 @@ StandingItemGraphicsOffsets:
dw BigDecompressionBuffer+$0CE0 ; 45 - Small magic
dw BigDecompressionBuffer+$0DA0 ; 46 - 300 rupees
dw BigDecompressionBuffer+$0000 ; 47 - 20 rupees green
dw BigDecompressionBuffer+$09A0 ; 48 - Full bottle (good bee)
dw $00A0 ; 49 - Tossed fighter sword
dw BigDecompressionBuffer+$0C40 ; 4A - Active Flute
dw BigDecompressionBuffer+$0040 ; 4B - Boots
dw BigDecompressionBuffer+$09E0 ; 48 - Full bottle (good bee)
dw BigDecompressionBuffer+$09E0 ; 49 - Tossed fighter sword
dw BigDecompressionBuffer+$09E0 ; 4A - Active Flute
dw BigDecompressionBuffer+$09E0 ; 4B - Boots
; Rando items
dw $04A0 ; 4C - Bomb capacity (50)
dw $05A0 ; 4D - Arrow capacity (70)
dw $01A0 ; 4E - 1/2 magic
dw $01E0 ; 4F - 1/4 magic
dw $00E0 ; 50 - Safe master sword
dw BigDecompressionBuffer+$09E0 ; 4E - 1/2 magic
dw BigDecompressionBuffer+$09E0 ; 4F - 1/4 magic
dw BigDecompressionBuffer+$09E0 ; 50 - Safe master sword
dw $0420 ; 51 - Bomb capacity (+5)
dw $0460 ; 52 - Bomb capacity (+10)
dw BigDecompressionBuffer+$09E0 ; 52 - Bomb capacity (+10)
dw $0520 ; 53 - Arrow capacity (+5)
dw $0560 ; 54 - Arrow capacity (+10)
dw $0 ; 55 - Programmable item 1
dw $0 ; 56 - Programmable item 2
dw $0 ; 57 - Programmable item 3
dw $05E0 ; 58 - Upgrade-only silver arrows
dw BigDecompressionBuffer+$09E0 ; 58 - Upgrade-only silver arrows
dw $0 ; 59 - Rupoor
dw $0020 ; 5A - Nothing
dw $0DE0 ; 5B - Red clock
+20 -3
View File
@@ -89,7 +89,8 @@ org $80FDEE
InitializeMirrorHDMA:
org $89D62E
UWSpritesPointers: ; 0x250 bytes for 0x128 rooms' 16-bit pointers
;commenting out since this address can move
;UWSpritesPointers: ; 0x250 bytes for 0x128 rooms' 16-bit pointers
if !FEATURE_FIX_BASEROM
org $81DB67
@@ -98,10 +99,18 @@ else
endif
UWPotsPointers: ; 0x250 bytes for 0x128 rooms' 16-bit pointers
org $89DACE
if !FEATURE_FIX_BASEROM
org $01DDE7
else
org $89DACE
endif
UWPotsData: ; variable number of bytes (max 0x11D1) for all pots data
org $A88000
if !FEATURE_FIX_BASEROM
org $89D92E
else
org $A88000
endif
UWSpritesData: ; variable number of bytes (max 0x2800) for all sprites and sprite drop data
; First $2800 bytes of this bank (28) is reserved for the sprite tables
@@ -687,6 +696,14 @@ KeyGet:
LDA.l StandingItemsOn : BNE +
PLA : RTL
+ LDY.w SprSourceItemId, X
JSL ShieldCheck
BCS .not_replaced
PLA : PLA : PLA ; remove stored address to jump back to
PLA ; restore the A value going into KeyGet
JML $86D1A8
.not_replaced
LDA.w SprItemIndex, X : STA.w SpawnedItemIndex
LDA.w SprItemFlags, X : STA.w SpawnedItemFlag
STY.b Scrap00
+10 -7
View File
@@ -34,16 +34,19 @@ RTL
; Output: 0 locked, 1 open
;--------------------------------------------------------------------------------
CheckForZelda:
LDA.l ProgressIndicator : CMP.b #$02 : !BLT + ; Skip if rain is falling
LDA.b #$01 ; pretend we have zelda anyway
RTL
+
LDA.l FollowerIndicator
LDA.l ProgressIndicator : CMP.b #$02 : !BLT + ; Skip if rain is falling
LDA.b #$01 ; pretend we have zelda anyway
RTL
+
LDA.l FollowerIndicator
RTL
;================================================================================
SetOverlayIfLamp:
JSL LampCheck
STA.b SUBDESQ ; write it directly to the overlay, this isn't a terrible idea at all
JSL LampCheck
BEQ +
LDA.b #$01
+
STA.b SUBDESQ ; write it directly to the overlay, this isn't a terrible idea at all
RTL
;================================================================================
; Mantle Object Changes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+145 -23
View File
@@ -40,7 +40,7 @@ dw $0000
warnpc $8ABE2E
org $8ABE2E
; located posx/posy, dislocated posx/posy, prize pox/posy
; located posx/posy, dislocated posx/posy, prize posx/posy
; located = proper location of icon (default: if you have map)
; dislocated = location of icon if proper location is hidden from player
; highest bit on first posx indicates which world it should show in
@@ -49,27 +49,27 @@ WorldMapIcon_pos:
.hc
dw $FF00, $FF00, $FF00, $FF00, $FF00, $FF00
.ep
dw $0F31, $0620, $FF00, $FF00, $0F31, $0620
dw $0F40, $0660, $FF00, $FF00, $0F40, $0660
.dp
dw $0108, $0D70, $FF00, $FF00, $0108, $0D70
dw $0140, $0D00, $FF00, $FF00, $0140, $0D00
.at
dw $FF00, $FF00, $FF00, $FF00, $FF00, $FF00
.sp
dw $8759, $0ED0, $FF00, $FF00, $8759, $0ED0
dw $8778, $0F50, $FF00, $FF00, $8778, $0F50
.pod
dw $8F40, $0620, $FF00, $FF00, $8F40, $0620
dw $8F40, $0660, $FF00, $FF00, $8F40, $0660
.mm
dw $8100, $0CA0, $FF00, $FF00, $8100, $0CA0
dw $8148, $0D00, $FF00, $FF00, $8148, $0D00
.sw
dw $8082, $00B0, $FF00, $FF00, $8082, $00B0
dw $80B0, $00C0, $FF00, $FF00, $80B0, $00C0
.ip
dw $8CA0, $0DA0, $FF00, $FF00, $8CA0, $0DA0
dw $8CA0, $0E00, $FF00, $FF00, $8CA0, $0E00
.toh
dw $08D0, $0080, $FF00, $FF00, $08D0, $0080
dw $0900, $0100, $FF00, $FF00, $0900, $0100
.tt
dw $81D0, $0780, $FF00, $FF00, $81D0, $0780
dw $81F8, $0800, $FF00, $FF00, $81F8, $0800
.tr
dw $8F11, $0103, $FF00, $FF00, $8F11, $0103
dw $8F20, $0100, $FF00, $FF00, $8F20, $0100
.gt
dw $FF00, $FF00, $FF00, $FF00, $FF00, $FF00
@@ -262,8 +262,8 @@ DrawPrizesOverride:
; determine if draw and/or continue
JSR WorldMap_ValidateCoords : BCS .advance
JSR WorldMap_DrawTileOverlay
JSR WorldMap_DrawTile
JSR WorldMap_DrawTileOverlay
.advance
LDY.b Scrap05 : DEY #2 : BMI + : JMP .next_dungeon : +
PLB
@@ -321,24 +321,35 @@ RTS
WorldMap_DrawTile:
LDA.b Scrap00 : PHA
SEP #$20
LDA.l $7EC10A : BIT.w #$4000 : SEP #$20 : BNE .raw_coords ; use raw OAM coordinates
JSR WorldMap_CalculateOAMCoordinates
BCS .apply_offsets
REP #$20
BRA .exit
.raw_coords
STA.b Scrap0E
LDA.l $7EC108 : STA.b Scrap0F
.apply_offsets
LDX.b Scrap0A : BNE .aligned ; prize number/overlay: no offset
LDX.b Scrap0B : BEQ +
; 16x16 sprite: -8 pixels
LDA.b Scrap0E : SEC : SBC.b #$08 : STA.b Scrap0E
LDA.b Scrap0F : SBC.b #$08 : STA.b Scrap0F
BRA .aligned
+
; 8x8 sprite: -4 pixels
LDA.b Scrap0E : SEC : SBC.b #$04 : STA.b Scrap0E
LDA.b Scrap0F : SBC.b #$04 : STA.b Scrap0F
.aligned
LDX.b Scrap0B : TXA : STA.b (OAMPtr+2)
INC.b OAMPtr+2
JSR WorldMap_CalculateOAMCoordinates
LDX.b Scrap0A : BEQ +
LDA.b Scrap0E : CLC : ADC.b #$04 : STA.b Scrap0E
LDA.b Scrap0F : CLC : ADC.b #$04 : STA.b Scrap0F
+
LDX.b Scrap0B : BEQ +
LDA.b Scrap0E : SEC : SBC.b #$04 : STA.b Scrap0E
LDA.b Scrap0F : SEC : SBC.b #$04 : STA.b Scrap0F
+
REP #$20
PLA : STA.b Scrap00
LDA.b Scrap0E : STA.b (OAMPtr)
INC.b OAMPtr : INC.b OAMPtr
LDA.b Scrap0C : STA.b (OAMPtr)
INC.b OAMPtr : INC.b OAMPtr
.exit
PLA : STA.b Scrap00
RTS
; Y - dungeon index
@@ -423,6 +434,117 @@ WorldMap_CheckPrizeCollected:
RTS
warnpc $8AC3B1
org $8AC3B6
; ---------------------------------------------------------------------------------------------------
; Y coordinate calculation: Quadratic approximation
; Formula: Y_oam = 0x16 + (Y * 118 >> 12) + ((Y>>4)^2 * 49 >> 8)
; Accurate to within ±1.5 pixels across entire range
; ---------------------------------------------------------------------------------------------------
REP #$20
LDA.l $7EC108 : ASL #4 ; world Y coordinate
PHA
; calculate linear term: (Y * 118) >> 12
SEP #$20
LDA.b #$76
JSR WorldMap_MultiplyAxB ; (Y>>4) * 118
REP #$20
STA.b Scrap00 ; linear term stored at high byte (Scrap01)
; calculate quadratic term: ((Y>>4)^2 * 49) >> 8
LDA.b 1,S
SEP #$20
XBA : TAX : XBA : TXA
JSR WorldMap_MultiplyAxB ; (Y>>4) ^ 2
LDA.b #$31
JSR WorldMap_MultiplyAxB ; multiply by 49
XBA ; quadratic term
; combine: 0x16 + linear_term + quadratic_term
CLC : ADC.b Scrap01 ; add linear term
ADC.b #$16 ; add fixed offset
STA.b Scrap0F
REP #$20
PLA ; world Y coordinate
; ---------------------------------------------------------------------------------------------------
; Calculate half_width for perspective: 91 + (Y_shifted * 28 / 256)
; The world map appears wider at the bottom than at the top, simulating perspective
; Top (Y=0): X range 0x26-0xDC (half-width: 91), Bottom (Y=FFF): X range 0x08-0xF6 (half-width: 119)
; ---------------------------------------------------------------------------------------------------
SEP #$20
LDA.b #$1C ; width increase factor
JSR WorldMap_MultiplyAxB
XBA : CLC : ADC.b #$5B ; add fixed half-width
STA.b Scrap00
; ---------------------------------------------------------------------------------------------------
; Calculate X offset: X_offset = (X_from_center * half_width * 2) / 256
; where X_from_center = (world_X >> 4) - 128
; The center X is at 129 (0x81)
; ---------------------------------------------------------------------------------------------------
REP #$20
LDA.l $7EC10A : LSR #4 ; world X coordinate
SEP #$20
SEC : SBC.b #$80 ; subtract 128 (center point)
PHP ; preserve carry
BPL + : EOR.b #$FF : INC : + ; absolute value
PHA
LDA.b Scrap00 : ASL : XBA ; half-width x 2
PLA
JSR WorldMap_MultiplyAxB
XBA
PLP : BCS +
STA.b Scrap00
LDA.b #$81 : SEC : SBC.b Scrap00 ; center X position - offset
BRA .store_and_exit
+ CLC : ADC.b #$81 ; center X position + offset
.store_and_exit
STA.b Scrap0E
SEP #$30
JMP WorldMap_CalculateOAMCoordinates_exit_successfully
warnpc $8AC433
; most of this function is copied from the original, but rearranged
org $8AB7F3
FluteMenu_HandleSprites:
LDA.l $7EC108 : PHA
LDA.l $7EC109 : PHA
LDA.l $7EC10A : PHA
LDA.l $7EC10B : PHA
JSL FluteMenu_MoveLinkSprite ; override vanilla (LDA.b $1A : AND.b #$10)
BEQ .continue
JSR WorldMap_CalculateOAMCoordinates : BCC .continue
LDA.b Scrap0E : SEC : SBC.b #$04 : STA.b Scrap0E
LDA.b Scrap0F : SEC : SBC.b #$04 : STA.b Scrap0F
LDA.b #$00 : STA.b Scrap0D
LDA.b #$3E : STA.b Scrap0C
JSL OWMapFluteCancelIcon ; override vanilla (LDA.b #$02 : STA.b Scrap0B)
LDX.b #$10 : JSR WorldMap_HandleSpriteBlink
.continue
warnpc $8AB831
; most of this function is copied from the original, but rearranged
org $8ABF78
WorldMap_HandleSprites:
LDA.l $7EC108 : PHA
LDA.l $7EC109 : PHA
LDA.l $7EC10A : PHA
LDA.l $7EC10B : PHA
JSL WorldMap_SkipHandleSprites ; override vanilla (LDA.b $1A : AND.b #$10)
BEQ .continue
JSR WorldMap_CalculateOAMCoordinates : BCC .continue
LDA.b Scrap0E : SEC : SBC.b #$04 : STA.b Scrap0E
LDA.b Scrap0F : SEC : SBC.b #$04 : STA.b Scrap0F
LDA.b #$00 : STA.b Scrap0D
LDA.b #$3E : STA.b Scrap0C
LDA.b #$02 : STA.b Scrap0B
LDX.b #$00 : JSR WorldMap_HandleSpriteBlink
.continue
warnpc $8ABFB6
pullpc
WorldMap_LoadChrHalfSlot:
+74 -9
View File
@@ -89,6 +89,9 @@ GetMultiworldItem:
PHP
LDA.l !MULTIWORLD_ITEM : BNE +
LDA.l !MULTIWORLD_HUD_TIMER : BNE +
LDA.l ShieldEquipment : BNE ++
LDA.l PikitItem : CMP.b #$04 : BNE +
++
BRL .return
+
@@ -123,6 +126,34 @@ GetMultiworldItem:
BRL .return
+
LDA.l ShieldEquipment : BNE +
LDA.l PikitItem : CMP.b #$04 : BEQ +
LDY.b #$10
-
DEY
BMI .restore_shield
LDA.w $0E20, Y
CMP.b #$AA
BNE - ; go to next sprite if this sprite isn't a pikit
LDA.w $0DD0, Y
BEQ - ; go to next sprite if this sprite is dead/inactive
LDA.w $0ED0, Y
CMP.b #$04
BNE - ; go to next sprite if this pikit isn't grabbing a shield
LDA.w $0E90, Y
CMP.b #$04
BNE - ; go to next sprite if this pikit isn't grabbing a shield
BRA + ; active pikit has a shield
.restore_shield
; we have a pikit item, but no shield, and there's no pikit actively
; eating a shield, so return the shield to prevent a softlock
LDA.b #$01
STA.l ShieldEquipment
+
LDA.l !MULTIWORLD_ITEM : BNE +
BRL .return
+
@@ -202,35 +233,69 @@ RTL
Multiworld_BottleVendor_GiveBottle:
{
PHA
JSL ShieldCheck
PLA
BCC .no_take_shield
PHA : PHP
SEP #$20
LDA.l BottleMerchant_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLP : PLA
JSL Link_ReceiveItem ; thing we wrote over
RTL
RTL
.no_take_shield
PLA : PLA : PLA : PLX
JML $85EB3A
}
Multiworld_MiddleAgedMan_ReactToSecretKeepingResponse:
{
PHA
JSL ShieldCheck
PLA
BCC .no_take_shield
PHA : PHP
SEP #$20
LDA.l PurpleChest_Item_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLP : PLA
JSL Link_ReceiveItem ; thing we wrote over
RTL
; what we wrote over
JSL Link_ReceiveItem
LDA.l NpcFlagsVanilla
ORA.b #$10
STA.l NpcFlagsVanilla
.no_take_shield
RTL
}
Multiworld_Hobo_GrantBottle:
{
PHA : PHP
SEP #$20
LDA.l HoboItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLP : PLA
PHA
JSL ShieldCheck
PLA
BCC .no_take_shield
JSL Link_ReceiveItem ; thing we wrote over
RTL
; first bit we wrote over
LDX.b OverworldIndex
LDA.l OverworldEventDataWRAM, X
ORA.b #$20
STA.l OverworldEventDataWRAM, X
LDA.l HoboItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
; second bit we wrote over
JSL Link_ReceiveItem
LDA.l NpcFlagsVanilla
ORA.b #$01
STA.l NpcFlagsVanilla
.no_take_shield
RTL
}
Multiworld_MasterSword_GrantToPlayer:
+24 -15
View File
@@ -152,14 +152,23 @@ NewHUD_DrawDungeonCounters:
;================================================================================
NewHUD_DrawPrizeIcon:
REP #$10
SEP #$20
REP #$10
SEP #$20
LDA.b GameMode
CMP.b #$12 : BEQ .no_prize
CMP.b #$0E : BEQ +
LDA.l UpdateHUDFlag : BEQ NewHUD_DrawItemCounter
+
LDA.w DungeonID
CMP.b #$12 : BEQ .no_prize
CMP.b #$0E : BNE .check_hud_flag
LDA.b GameSubMode
CMP.b #$03 : BNE .check_dungeon
LDA.w SubModuleInterface
CMP.b #$06 : BNE .check_hud_flag
LDA.l $7EC22A
BRA .know_dungeon
.check_hud_flag
LDA.l UpdateHUDFlag : BEQ NewHUD_DrawItemCounter
.check_dungeon
LDA.w DungeonID
.know_dungeon
CMP.b #$1A : BCS .no_prize
CMP.b #$04 : BCC .no_prize
CMP.b #$08 : BNE .dungeon
@@ -176,19 +185,19 @@ NewHUD_DrawPrizeIcon:
LDA.l MapMode
REP #$30
BEQ .prize
BEQ .prize
LDA.w MapField
AND.l DungeonItemMasks,X
BEQ .no_prize
.prize
TYX
LDA.l CrystalPendantFlags_3,X : AND.w #$00FF
ASL : TAX
LDA.l PrizeIconTiles_Transparent,X : BEQ .no_icon
TAY
BRA .draw_prize
.prize
TYX
LDA.l CrystalPendantFlags_3,X : AND.w #$00FF
ASL : TAX
LDA.l PrizeIconTiles_Transparent,X : BEQ .no_icon
TAY
BRA .draw_prize
.pendant
LDY.w #!PTile
+4 -4
View File
@@ -1159,12 +1159,12 @@ JML StatsFinalPrep
;--------------------------------------------------------------------------------
ChestPrep:
LDA.b #$01 : STA.w ItemReceiptMethod
JSL IncrementChestCounter
JSL IncrementChestCounter
LDA.l ServerRequestMode : BEQ +
JSL ChestItemServiceRequest
RTL
+
LDY.b Scrap0C ; get item value
LDY.b Scrap0C ; get item value
SEC
RTL
@@ -1190,7 +1190,7 @@ MaybeFlagCompassTotalPickup:
RTL
MaybeFlagMapTotalPickup:
; LDA.l MapHUDMode : AND.b #$0F : BEQ .done
LDA.l MapHUDMode : AND.b #$0F : BEQ .done
LDA.w DungeonID : BMI .done
LDA.w ItemReceiptID : CMP.b #$33 : BEQ .set_flag
REP #$20
@@ -1212,7 +1212,7 @@ MaybeFlagDungeonTotalsEntrance:
LDA.l CompassMode : AND.w #$000F : BEQ .maps ; Skip if we're not showing compass counts
JSR FlagCompassCount
.maps
LDA.l MapHUDMode : AND.w #$000F
LDA.l MapHUDMode : AND.w #$000F : BEQ .done
LDX.w DungeonID
JSR FlagMapCount
.done
+89 -17
View File
@@ -98,9 +98,17 @@ ItemSet_MagicBat:
RTL
ItemSet_OldMan:
PHA : LDA.l OldManItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
PHA
JSL ShieldCheck
BCC .skip
LDA.l OldManItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLA
JSL Link_ReceiveItem ; thing we wrote over
PHA : LDA.l NpcFlags : ORA.b #$01 : STA.l NpcFlags : PLA
PHA
LDA.l NpcFlags : ORA.b #$01 : STA.l NpcFlags
.skip
PLA
RTL
ItemSet_ZoraKing:
@@ -108,21 +116,45 @@ ItemSet_ZoraKing:
RTL
ItemSet_SickKid:
PHA : LDA.l SickKidItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
PHA
JSL ShieldCheck
BCC .skip
LDA.l SickKidItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLA
JSL Link_ReceiveItem ; thing we wrote over
PHA : LDA.l NpcFlags : ORA.b #$04 : STA.l NpcFlags : PLA
PHA
LDA.l NpcFlags : ORA.b #$04 : STA.l NpcFlags
.skip
PLA
RTL
ItemSet_TreeKid:
PHA : LDA.l TreeKidItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
PHA
JSL ShieldCheck
BCC .skip
LDA.l TreeKidItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLA
JSL Link_ReceiveItem ; thing we wrote over
PHA : LDA.l NpcFlags : ORA.b #$08 : STA.l NpcFlags : PLA
PHA
LDA.l NpcFlags : ORA.b #$08 : STA.l NpcFlags
.skip
PLA
RTL
ItemSet_Sahasrala:
PHA : LDA.l SahasralaItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
PHA
JSL ShieldCheck
BCC .skip
LDA.l SahasralaItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLA
JSL Link_ReceiveItem ; thing we wrote over
PHA : LDA.l NpcFlags : ORA.b #$10 : STA.l NpcFlags : PLA
PHA
LDA.l NpcFlags : ORA.b #$10 : STA.l NpcFlags
.skip
PLA
RTL
ItemSet_Catfish:
@@ -130,22 +162,38 @@ ItemSet_Catfish:
RTL
ItemSet_Library:
PHA : LDA.l LibraryItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
PHA
JSL ShieldCheck
BCC .skip
LDA.l LibraryItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLA
JSL Link_ReceiveItem ; thing we wrote over
PHA : LDA.l NpcFlags : ORA.b #$80 : STA.l NpcFlags : PLA
PHA
LDA.l NpcFlags : ORA.b #$80 : STA.l NpcFlags
.skip
PLA
RTL
ItemSet_Mushroom:
PHA
LDA.l NpcFlags+1 : ORA.b #$10 : STA.l NpcFlags+1
LDY.w SprSourceItemId, X ; Retrieve stored item type
BNE +
; if for any reason the item value is 0 reload it, just in case
%GetPossiblyEncryptedItem(MushroomItem, SpriteItemValues) : TAY
+
JSL ShieldCheck
BCC .skip
LDA.l MushroomItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLA
STZ.w ItemReceiptMethod ; thing we wrote over - the mushroom is an npc for item purposes apparently
PLA
JSL Link_ReceiveItem
PHA
LDA.l NpcFlags+1 : ORA.b #$10 : STA.l NpcFlags+1
.skip
PLA
RTL
ItemSet_Powder:
@@ -175,11 +223,25 @@ Set300RupeeNPCItem:
+
LDA.w #$0000
LDY.b #$46 ; default to a normal 300 rupees
.done
.done
SEP #$20
STA.l !MULTIWORLD_ITEM_PLAYER_ID
JSL ShieldCheck
BCC .cant_take
LDA.w RoomItemsTaken
ORA.b #$40
STA.w RoomItemsTaken
PLP : PLA
RTL
SEC
RTL
.cant_take
PLP : PLA
CLC
RTL
;================================================================================
; Randomize Zora King
@@ -223,16 +285,26 @@ MarkThrownItem:
LDA.b OverworldIndex : CMP.b #$81 : BNE .catfish
.zora
JSL ItemSet_ZoraKing
JSL ShieldCheck
BCC .skip
JSL ItemSet_ZoraKing
LDA.l ZoraItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
BRA .done
.catfish
JSL ItemSet_Catfish
JSL ShieldCheck
BCC .skip
JSL ItemSet_Catfish
LDA.l CatfishItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
.done
PLA
JSL Link_ReceiveItem ; thing we wrote over
RTL
RTL
.skip
PLA
RTL
;--------------------------------------------------------------------------------
+330 -78
View File
@@ -6,18 +6,18 @@ OWFlags:
dw 0
OWReserved:
dw 0
OWFog:
db 0 ; 0: disabled - 1: fog clears after visiting either world version of a screen - 2: fog clears after visiting the current world version of a screen
org $aa8010
OWVersionInfo:
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
;Hooks
org $82a929
OWDetectTransitionReturn:
org $82a92C
JSL OWDetectEdgeTransition ; JSL Link_CheckForEdgeScreenTransition
org $82a939
OverworldHandleTransitions_SpecialTrigger:
JSL OWDetectEdgeTransition
BCS OWDetectTransitionReturn
org $82a936
OverworldHandleTransitions_PerformEdgeTransition:
org $82a999
jsl OWEdgeTransition : nop #4 ;LDA $02A4E3,X : ORA $7EF3CA
@@ -78,8 +78,6 @@ org $8ab7af ;LDA $F2 : ORA $F0 : AND #$C0
jml OWFluteCancel2 : nop
org $8ab90d ;JSL $02E99D
jsl OWFluteCancel
org $8ab816
JSL OWMapFluteCancelIcon
; allows Frog sprite to spawn in LW and also allows his friend to spawn in their house
org $868a76 ; < 30a76 - sprite_prep.asm:785 (LDA $7EF3CA : AND.w #$40)
@@ -106,20 +104,36 @@ jsl OWOldManSpeed
org $8aba6c ; < ? - Bank0a.asm:474 ()
jsl OWMapWorldCheck16 : nop
; Mixed Overworld Map
; Custom Overworld Map
org $8ABA52
JSL OverworldMap_InitGfx_InitScrap
org $8ABA99
WorldMap_LoadDarkWorldMap:
LDA.b GameMode : CMP.b #$14 ; attract module
BEQ .vanilla_light
LDA.l OWMode+1 : AND.b #!FLAG_OW_MIXED : BNE .mixed
LDA.l OWFlags : AND.b #!FLAG_OW_CUSTOM_MAP : BNE .custom
LDA.b OverworldIndex : AND.b #$40
BEQ .vanilla_light
.mixed
PHB : PHK : PLB
JSL LoadMapDarkOrMixed
PLB
.custom
STZ.b ScrapBuffer72 ; clear tile swap flag
JSL LoadMapDarkOrCustom_long
NOP #2
warnpc $8ABAB5
.vanilla_light ; $0ABAB5
org $8ABD12
JSL MoveZoomedInPositionY
org $8ABD2F
JSL MoveZoomedInPositionX
org $8ABB32
JSL LoadMapOppositeWorld
org $8ABFF0
JSL MoveMirrorPortalMapSprite
; Could insert similar hooks at $8AB860 and $8AB8AC for flute spots
;(replacing -> LDA $8A : AND.b #$40)
org $80d8c4 ; < ? - Bank00.asm:4068 ()
jsl OWWorldCheck
@@ -227,6 +241,7 @@ OWMapWorldCheck16:
{
lda.b GameMode : cmp.w #$0014 : beq .return ; attract module, return with Z flag cleared
jsl OWWorldCheck16
eor.b ScrapBuffer72 ; apply tile swap flag
.return
rtl
}
@@ -341,7 +356,7 @@ OWFluteCancel2:
}
OWMapFluteCancelIcon:
{
STA.b Scrap0B : LDX.b #$10 ; what we wrote over
LDA.b #$02 : STA.b Scrap0B ; what we wrote over
LDA.l OWFlags+1 : AND.b #$01 : BEQ .return
LDA.b GameSubMode : CMP.b #$0A : BNE .return
LDA.b FrameCounter : AND.b #$10 : BNE .return
@@ -387,51 +402,110 @@ OWMarkVisited:
RTL
}
LoadMapDarkOrMixed:
LoadMapDarkOrCustom:
{
CMP.b #!FLAG_OW_MIXED : REP #$30 : BEQ .mixed
CMP.b #!FLAG_OW_CUSTOM_MAP : REP #$30 : BEQ .custom
LDX.w #$03FE ; draw vanilla Dark World (what we wrote over)
.copy_next
LDA.w WorldMap_DarkWorldTilemap,X : STA.w GFXStripes,X
DEX : DEX : BPL .copy_next
BRL .end
.mixed
.custom
LDX.b OverworldIndex
LDA.l OWTileWorldAssoc,X
STA.b Scrap00
LDY.w #$139C
LDX.w #$003F
.next_screen
PHX
LDA.l OWTileWorldAssoc,X
EOR.b Scrap00
AND.w #$0040
BEQ .light
TYX : BRA .copy_screen
.light
TXA : AND.w #$0024 : LSR : TAX
TYA : SEC : SBC.l LWQuadrantOffsets,X
TYX : TAY
.copy_screen ; more efficient to have X on the right side
LDA.w $C739+$00,Y : STA.b $00,X
LDA.w $C739+$02,Y : STA.b $02,X
LDA.w $C739+$20,Y : STA.b $20,X
LDA.w $C739+$22,Y : STA.b $22,X
LDA.w $C739+$40,Y : STA.b $40,X
LDA.w $C739+$42,Y : STA.b $42,X
LDA.w $C739+$60,Y : STA.b $60,X
LDA.w $C739+$62,Y : STA.b $62,X
TXY : PLX
DEY : DEY : DEY : DEY ; move one screen left
TXA : AND.w #$0007 : BNE .same_row
TYA : SEC : SBC.w #$0060 : TAY ; move one screen row up
EOR.b ScrapBuffer72 ; apply tile swap flag
BEQ .draw_lw
LDA.w #OWMapGridDark
BRA .draw_dw
.draw_lw
LDA.w #OWMapGridLight
.draw_dw
STA.b Scrap00
LDA.w #OWMapGridLight>>16 ; current program bank
STA.b Scrap02
LDX.w #$139C
LDY.w #$003F
.next_cell
PHY
JSR GetOWMapTilemapOffsetToCopy
.copy_cell ; more efficient to have X on the right side
TAY
LDA.w WorldMap_LightWorldTilemap+$00,Y : STA.b $00,X
LDA.w WorldMap_LightWorldTilemap+$02,Y : STA.b $02,X
LDA.w WorldMap_LightWorldTilemap+$20,Y : STA.b $20,X
LDA.w WorldMap_LightWorldTilemap+$22,Y : STA.b $22,X
LDA.w WorldMap_LightWorldTilemap+$40,Y : STA.b $40,X
LDA.w WorldMap_LightWorldTilemap+$42,Y : STA.b $42,X
LDA.w WorldMap_LightWorldTilemap+$60,Y : STA.b $60,X
LDA.w WorldMap_LightWorldTilemap+$62,Y : STA.b $62,X
PLY
DEX : DEX : DEX : DEX ; move one screen left
TYA : AND.w #$0007 : BNE .same_row
TXA : SEC : SBC.w #$0060 : TAX ; move one screen row up
.same_row
DEX
BPL .next_screen
DEY
BPL .next_cell
.end
SEP #$30
LDA.b #$15 : STA.b NMIINCR ; what we wrote over
RTL
RTS
}
GetOWMapTilemapOffsetToCopy:
{
LDA.l OWFog : AND.w #$00FF
CMP.w #$0001 : BEQ .parallel_fog
CMP.w #$0002 : BNE .no_fog
LDA.b [Scrap00],Y : AND.w #$00FF
PHX
TAX
BIT.w #$0040
BEQ .light_fog
LDA.l Overworld_ActualScreenID-$40,X : ORA.w #$0040
BRA .dark_fog
.light_fog
LDA.l Overworld_ActualScreenID,X
.dark_fog
AND.w #$00FF
TAX
LDA.l OverworldEventDataWRAM,X
.check_visited_flag
PLX
AND.w #$0080 : BNE .no_fog
LDA.w #($D350-$C739)
RTS
.parallel_fog
LDA.b [Scrap00],Y : AND.w #$003F
PHX
TAX
LDA.l Overworld_ActualScreenID,X
AND.w #$00FF
TAX
LDA.l OverworldEventDataWRAM,X
ORA.l OverworldEventDataWRAM+$40,X
BRA .check_visited_flag
.no_fog
LDA.b [Scrap00],Y : AND.w #$0038 : ASL : ASL : ASL : ASL
STA.b Scrap03
LDA.b [Scrap00],Y
BIT.w #$0040
BEQ .light
AND.w #$0007
ASL : ASL : ADC.w #$1000 : ADC.b Scrap03
RTS
.light
PHX
AND.w #$0024 : LSR : TAX
LDA.b [Scrap00],Y
AND.w #$0007
ASL : ASL : ADC.w #$1000 : ADC.b Scrap03
SEC : SBC.l LWQuadrantOffsets,X
PLX
RTS
LWQuadrantOffsets:
dw $1000-$0210 ; top left
@@ -441,6 +515,143 @@ LoadMapDarkOrMixed:
dw $0400+$0210 ; bottom right
}
OverworldMap_InitGfx_InitScrap:
{
STZ.b ScrapBuffer72 ; clear tile swap flag
LDA.b #$11 : STA.b MAINDESQ ; what we wrote over
RTL
}
LoadMapDarkOrCustom_long:
{
PHB : LDA.b #WorldMap_DarkWorldTilemap>>16 : PHA : PLB
LDA.l OWFlags : AND.b #!FLAG_OW_CUSTOM_MAP
JSR LoadMapDarkOrCustom
PLB
RTL
}
LoadMapOppositeWorld:
{
LDA.l OWFlags : AND.b #!FLAG_OW_ADJUST_DYNAMIC_MAP_SPRITE_POSITION : BEQ .vanilla
LDA.b ScrapBuffer72 : BEQ +
LDA.b Joy1B_All : AND.b #$30 : BNE .vanilla
STZ.b ScrapBuffer72 ; clear tile swap flag
BRA .new_tiles
+ LDA.b Joy1B_New : AND.b #$30 : BEQ .vanilla
LDA.b #$40 : STA.b ScrapBuffer72 ; set tile swap flag
.new_tiles
JSL OverworldMap_InitGfx+$10 ; load palette
DEC.w SubModuleInterface
LDA.b #$0F : STA.b INIDISPQ
JSL LoadMapDarkOrCustom_long
LDA.b #$24 : STA.w SFX3
PLA : PLA : PEA.w $BBAF ; skip everything upon return
.vanilla
LDA.b Joy1B_New : AND.b #$70 ; what we wrote over
RTL
}
FluteMenu_MoveLinkSprite:
{
JSR MoveMapSprite
BRA WorldMap_SkipHandleSprites_vanilla
}
WorldMap_SkipHandleSprites:
{
JSR MoveMapSprite : BEQ .vanilla
LDA.b ScrapBuffer72 : BEQ .vanilla ; skip draw if no tile swap
PLA : PLA : PEA.w $C39B ; exit without drawing sprites
RTL
.vanilla
LDA.b FrameCounter : AND.b #$10 ; what we wrote over
RTL
}
MoveMirrorPortalMapSprite:
{
STA.l $7EC109 ; what we overwrote
JSR MoveMapSprite
RTL
}
MoveZoomedInPositionY:
{
LDA.l OWFlags : AND.w #!FLAG_OW_ADJUST_DYNAMIC_MAP_SPRITE_POSITION : BEQ .vanilla
SEP #$20
JSR MoveMapSprite_Setup
JSR MoveMapSprite_GetYCoordHighByte
PHA
REP #$20
LDA.l $7EC108 : XBA
SEP #$20
PLA : XBA
REP #$20
RTL
.vanilla
LDA.l $7EC108 ; what we overwrote
RTL
}
MoveZoomedInPositionX:
{
LDA.l OWFlags : AND.w #!FLAG_OW_ADJUST_DYNAMIC_MAP_SPRITE_POSITION : BEQ .vanilla
SEP #$20
JSR MoveMapSprite_Setup
JSR MoveMapSprite_GetXCoordHighByte
PHA
REP #$20
LDA.l $7EC10A : XBA
SEP #$20
PLA : XBA
REP #$20
RTL
.vanilla
LDA.l $7EC10A ; what we overwrote
RTL
}
MoveMapSprite:
{
LDA.l OWFlags : AND.b #!FLAG_OW_ADJUST_DYNAMIC_MAP_SPRITE_POSITION : BEQ .return
PHP
JSR MoveMapSprite_Setup
JSR MoveMapSprite_GetXCoordHighByte : STA.l $7EC10B
JSR MoveMapSprite_GetYCoordHighByte : STA.l $7EC109
PLP
.return
RTS
}
MoveMapSprite_Setup:
{
LDA.l $7EC10B : AND.b #$0E : LSR
STA.b Scrap00
LDA.l $7EC109 : AND.b #$0E : ASL : ASL
ADC.b Scrap00
STA.b Scrap00
LDX.b OverworldIndex
LDA.l OWTileWorldAssoc,X
LDX.b Scrap00
AND.b #$40
BEQ .light
LDA.l OWMapGridDarkPositionByAbsolutePosition,X
BRA .dark
.light
LDA.l OWMapGridLightPositionByAbsolutePosition,X
.dark
TAX
AND.b #$07 : ASL
STA.b Scrap00
RTS
}
MoveMapSprite_GetXCoordHighByte:
{
LDA.l $7EC10B : AND.b #$01 : ORA.b Scrap00
RTS
}
MoveMapSprite_GetYCoordHighByte:
{
TXA : AND.b #$38 : LSR : LSR : STA.b Scrap00
LDA.l $7EC109 : AND.b #$01 : ORA.b Scrap00
RTS
}
OWBonkDropPrepSprite:
{
LDA.b IndoorsFlag : BEQ +
@@ -609,27 +820,26 @@ OWBonkDrops:
JSL OWBonkSpritePrep
.mark_collected ; S = Collected, FlagBitmask, X (row + 2)
PLA : BNE + ; S = FlagBitmask, X (row + 2)
TYX : JSL Sprite_IsOnscreen : BCC +
LDA.b IndoorsFlag : BEQ ++
PLA : BEQ + : - : JMP .return : + ; S = FlagBitmask, X (row + 2)
TYX : JSL Sprite_IsOnscreen : BCC -
LDA.b IndoorsFlag : BEQ +
LDA.l RoomDataWRAM[$0120].high : ORA.b 1,S : STA.l RoomDataWRAM[$0120].high
LDA.w $0400 : ORA.b 1,S : STA.w $0400
BRA .increment_collection
++
+
LDA.b OverworldIndex
BIT.b #$40 : BEQ +
LDA.l ProgressIndicator : CMP.b #$02
LDA.b OverworldIndex : BCS ++ : AND.b #$BF
++
LDA.b OverworldIndex : BCS + : AND.b #$BF
+
TAX : LDA.l OverworldEventDataWRAM,X : ORA.b 1,S : STA.l OverworldEventDataWRAM,X
.increment_collection
REP #$20
LDA.l TotalItemCounter : INC : STA.l TotalItemCounter
INC.w UpdateHUDFlag
SEP #$20
+ BRA .return
LDA.b #$01 : STA.l UpdateHUDFlag
BRA .return
; spawn itemget item
.spawn_item ; A = item id ; Y = bonk sprite slot ; S = Collected, FlagBitmask, X (row + 2)
@@ -738,20 +948,29 @@ OWBonkSpritePrep:
org $aa9000
OWDetectEdgeTransition:
{
JSL OWDestroyItemSprites
JSL Link_CheckForEdgeScreenTransition ; what we wrote over
BCS .return
STZ.w RandoOverworldWalkDist
LDA.l OWMode : ORA.l OWMode+1 : BEQ .vanilla
PHY
JSR OWShuffle
LDA.w RandoOverworldTargetEdge : BMI .special
PLY
LDA.w RandoOverworldTargetEdge : BMI .specialOrDisabled
.vanilla
REP #$31 : LDX.b Scrap02 : LDA.b OverworldMap16Buffer ; what we wrote over
CLC ; allow transition
RTL
.specialOrDisabled
CMP.b #$FF : BNE .special
STZ.w RandoOverworldTargetEdge
PHB
JML Link_CheckForEdgeScreenTransition_prevent_transition
.special
REP #$30
AND.w #$0003 : TAY : ASL : TAX
LDA.w #$007F : STA.w RandoOverworldTargetEdge
JSR OWLoadSpecialArea
SEC
.return
RTL
}
OWDetectSpecialTransition:
@@ -761,17 +980,23 @@ OWDetectSpecialTransition:
TXA : AND.w #$0002 : LSR
STA.w RandoOverworldTerrain
LDA.l OWSpecialDestIndex,X : BIT.w #$0080 : BEQ .switch_to_edge
AND.w #$00FF : CMP.w #$00FF : BEQ .disabled
AND.w #$0003 : TAY : ASL : TAX
.normal
JSR OWLoadSpecialArea
.return
RTL
.disabled
SEP #$30
STZ.w RandoOverworldTargetEdge
RTL
.switch_to_edge
STA.w RandoOverworldTargetEdge
LDA.l OWEdgeDataOffset,X : STA.w RandoOverworldEdgeAddr
PLA : SEP #$30 : PLA ; delete 3 bytes from stack
JSL Link_CheckForEdgeScreenTransition : BCS .return ; Link_CheckForEdgeScreenTransition
JSL Link_CheckForEdgeScreenTransition : BCS .return
LDA.l Overworld_CheckForSpecialOverworldTrigger_Direction,X : STA.b Scrap00 : CMP.b #$08 : BNE .hobo
LSR : STA.b LinkPosY : STZ.b BG2V ; move Link and camera to edge
LDA.b #$06 : STA.b Scrap02
@@ -790,16 +1015,15 @@ OWDetectSpecialTransition:
LDA.b #$FF : STA.b LinkRecoilZ : STA.b $C7
STZ.b $3D : STZ.b LinkSpeed : STZ.w $032B : STZ.w LinkDashing : STZ.b LinkState
.not_dashing
PLA : REP #$31 : PLA ; delete 3 bytes from stack
LDX.b Scrap02
LDA.b OverworldMap16Buffer
JML OverworldHandleTransitions_SpecialTrigger+6
PLA : PLA : PLA ; delete 3 bytes from stack
JML OverworldHandleTransitions_PerformEdgeTransition
}
OWEdgeTransition:
{
LDA.l OWMode : ORA.l OWMode+1 : BEQ .unshuffled
LDY.w RandoOverworldTargetEdge : STZ.w RandoOverworldTargetEdge
CPY.b #$7F : BEQ .unshuffled
JSL OWDestroyItemSprites
REP #$10
LDX.w RandoOverworldEdgeAddr
PHB : PHK : PLB
@@ -1117,6 +1341,7 @@ OWWorldTerrainUpdate: ; x = owid of destination screen, y = 1 for land to water,
STZ.w RandoOverworldForceTrans
CMP.b #$02 : BNE +
DEC : STA.w LinkDeepWater : STZ.w LinkSwimDirection
LDA.b FlagBY : AND.b #$7F : STA.b FlagBY
LDA.b #$04 : BRA .set_state
+
CMP.b #$03 : BNE ++
@@ -1137,6 +1362,7 @@ OWWorldTerrainUpdate: ; x = owid of destination screen, y = 1 for land to water,
LDA.b #$01 : STA.w LinkDeepWater
LDA.l FlippersEquipment : BEQ .no_flippers ; check if flippers obtained
LDA.b LinkState : CMP.b #$17 : BEQ .no_flippers ; check if bunny
LDA.b FlagBY : AND.b #$7F : STA.b FlagBY
LDA.b #$04 : STA.b LinkState : STZ.w LinkSwimDirection : RTS
.no_flippers
PHX
@@ -1488,7 +1714,7 @@ dw $0b28, $0b38, $0010, $0b30, $1515, $1018, $0001, $000e
dw $0b70, $0ba0, $0030, $0b88, $1515, $1020, $0000, $000f
dw $0a40, $0b10, $00d0, $0aa8, $1d1d, $1006, $0000, $0010
dw $0350, $0390, $0040, $0370, $1821, $2060, $0000, $0011
dw $0670, $06a8, $0038, $068c, $1b23, $2002, $0000, $0012
dw $0670, $06a8, $0038, $068c, $1b23, $2004, $0000, $0012
dw $0898, $09b0, $0118, $0924, $1b24, $2054, $0000, $0013
dw $0a40, $0ba0, $0160, $0af0, $2525, $100e, $0000, $0014
dw $0c70, $0c90, $0020, $0c80, $1e26, $2002, $0000, $0015
@@ -1520,7 +1746,7 @@ dw $0b28, $0b38, $0010, $0b30, $5555, $1018, $0001, $002e
dw $0b70, $0ba0, $0030, $0b88, $5555, $1020, $0000, $002f
dw $0a40, $0b10, $00d0, $0aa8, $5d5d, $1006, $0000, $0030
dw $0350, $0390, $0040, $0370, $5861, $2060, $0000, $0031
dw $0670, $06a8, $0038, $068c, $5b63, $2002, $0000, $0032
dw $0670, $06a8, $0038, $068c, $5b63, $2004, $0000, $0032
dw $0898, $09b0, $0118, $0924, $5b64, $2054, $0000, $0033
dw $0a40, $0ba0, $0160, $0af0, $6565, $100e, $0000, $0034
dw $0c70, $0c90, $0020, $0c80, $5e66, $2002, $0000, $0035
@@ -1827,16 +2053,42 @@ db $74, $4e, $10, $b1, $00, $1c
UWBonkPrizeData:
db $ff, $00, $02, $b5, $00, $08
; temporary fix - murahdahla replaces one of the bonk tree prizes
; so we copy the sprite table here and update the pointer
; longterm solution should be to spawn in murahdahla separately
org $89AE2A
Overworld_Sprites_Screen1A_2:
db $08, $0F, $41 ; yx:{ 0x080, 0x0F0 }
db $0E, $0C, $41 ; yx:{ 0x0E0, 0x0C0 }
db $11, $0D, $E3 ; yx:{ 0x110, 0x0D0 }
db $18, $0A, $D8 ; yx:{ 0x180, 0x0A0 }
db $18, $0F, $45 ; yx:{ 0x180, 0x0F0 }
db $FF ; END
org $89CA55
dw Overworld_Sprites_Screen1A_2&$FFFF
org $AABC80 ;PC 153C80
OWMapGridLight:
db $00, $01, $02, $03, $04, $05, $06, $07
db $08, $09, $0A, $0B, $0C, $0D, $0E, $0F
db $10, $11, $12, $13, $14, $15, $16, $17
db $18, $19, $1A, $1B, $1C, $1D, $1E, $1F
db $20, $21, $22, $23, $24, $25, $26, $27
db $28, $29, $2A, $2B, $2C, $2D, $2E, $2F
db $30, $31, $32, $33, $34, $35, $36, $37
db $38, $39, $3A, $3B, $3C, $3D, $3E, $3F
OWMapGridDark:
db $40, $41, $42, $43, $44, $45, $46, $47
db $48, $49, $4A, $4B, $4C, $4D, $4E, $4F
db $50, $51, $52, $53, $54, $55, $56, $57
db $58, $59, $5A, $5B, $5C, $5D, $5E, $5F
db $60, $61, $62, $63, $64, $65, $66, $67
db $68, $69, $6A, $6B, $6C, $6D, $6E, $6F
db $70, $71, $72, $73, $74, $75, $76, $77
db $78, $79, $7A, $7B, $7C, $7D, $7E, $7F
org $AABD00 ;PC 153D00
OWMapGridLightPositionByAbsolutePosition:
db $00, $01, $02, $03, $04, $05, $06, $07
db $08, $09, $0A, $0B, $0C, $0D, $0E, $0F
db $10, $11, $12, $13, $14, $15, $16, $17
db $18, $19, $1A, $1B, $1C, $1D, $1E, $1F
db $20, $21, $22, $23, $24, $25, $26, $27
db $28, $29, $2A, $2B, $2C, $2D, $2E, $2F
db $30, $31, $32, $33, $34, $35, $36, $37
db $38, $39, $3A, $3B, $3C, $3D, $3E, $3F
OWMapGridDarkPositionByAbsolutePosition:
db $00, $01, $02, $03, $04, $05, $06, $07
db $08, $09, $0A, $0B, $0C, $0D, $0E, $0F
db $10, $11, $12, $13, $14, $15, $16, $17
db $18, $19, $1A, $1B, $1C, $1D, $1E, $1F
db $20, $21, $22, $23, $24, $25, $26, $27
db $28, $29, $2A, $2B, $2C, $2D, $2E, $2F
db $30, $31, $32, $33, $34, $35, $36, $37
db $38, $39, $3A, $3B, $3C, $3D, $3E, $3F
+471
View File
@@ -0,0 +1,471 @@
pushpc
org $89EB78
db $18, $1A, $AA ; replace uncle with pikit
org $80DCCE
db $1B ; load sprite sheet for pikit in link's house
org $80FC74
NOP #2 ; do not load rain-state sprites
org $8A8029
; move table slightly to center under pikit
db $C9, $C0, $DD
db $D0, $B8, $3C
pullpc
TuckLink:
; what we wrote over
STZ.w $037C
STZ.w $037D
LDA.b #$40 : STA.w $0FC2
LDA.b #$09 : STA.w $0FC3
LDA.b #$5A : STA.w $0FC4
LDA.b #$21 : STA.w $0FC5
RTL
LinkSnoring:
LDA.l ProgressIndicator
BNE +
LDA.b #$02
STA.l ProgressIndicator
LDA.b #$1D
LDY.b #$00
JSL Sprite_ShowMessageUnconditional
BRA ++
+
LDA.b FrameCounter
AND.b #$03
BNE ++
LDA.b $9C
CMP.b #$20
BEQ .lightened
DEC.b $9C
DEC.b $9D
++
; what we wrote over
LDA.b FrameCounter
AND.b #$1F
RTL
.lightened
INC.w $037C
INC.w $037D
RTL
LinkAwaken:
; what we wrote over
LDA.b #$06
STA.b LinkState
LDA.l ProgressFlags
ORA.b #$10
STA.l ProgressFlags
LDA.b #$01
STA.l StartingEntrance
RTL
BigChest_ShieldCheck:
PHY
LDY.b $0C
JSL ShieldCheck
STY.b $0C
PLY
BCC .no_open
LDA.l BigKeyField
AND.l BitMasks, X
.no_open
RTL
SmallChest_ShieldCheck:
PHY
LDY.b $0C
JSL ShieldCheck
STY.b $0C
PLY
BCC .no_open
LDA.w $0402
ORA.w RoomFlagMask, Y
.no_open
RTL
ShieldCheck:
PHP
REP #$30
PHX
TYA
AND.w #$00FF
TAX
LDA.l PikitItemList, X
AND.w #$00FF
BNE .replace
PLX
PLP
SEC
RTL
.replace
LDA.l ShieldEquipment
AND.w #$00FF
BNE .already_have_shield
TXA
STA.l PikitItem
LDY.w #$0004
PLX
PLP
SEC
RTL
.already_have_shield
SEP #$30
LDA.b #$3C
STA.w $012E
PHY
LDA.b #$98
LDY.b #$01
JSL Sprite_ShowMessageUnconditional
PLY
REP #$30
PLX
PLP
CLC
RTL
PikitSteal:
LDA.l ShieldEquipment
BNE .has_shield
JSL GetRandomInt
JML $9E8D73
.has_shield
LDA.b #$04
STA.w $0ED0, X
STA.w $0E90, X
LDA.b #$01
STA.w $0E30, X
STZ.w $012E
JML $9E8DC3
PikitDigest:
LDA.w $0ED0, X
CMP.b #$04
BNE +
STZ.w $0E90, X
LDA.b $6C
BNE + ; link is in a doorway; giving him an item could be scary :<
JSL IncrementPikitCounter
LDA.l PikitItem
CMP.b #$04
BEQ +
TAY
STZ.w ItemReceiptMethod
JSL Link_ReceiveItem
LDA.b #$04
STA.l PikitItem
+
; what we wrote over
STZ.w $0DA0, X
STZ.w $0ED0, X
RTL
MaybeFlagVoOChestGamePrize:
LDA.l $81EDA1, X
TAY
JSL ShieldCheck
BCC .cant_take
LDA.w RoomItemsTaken
ORA.b #$40
STA.w RoomItemsTaken
STX.b $C8
STY.b $0C
SEC
.cant_take
RTL
PikitItemList:
db $01 ; 00 - Fighter Sword and Shield
db $01 ; 01 - Master Sword
db $01 ; 02 - Tempered Sword
db $01 ; 03 - Butter Sword
db $00 ; 04 - Fighter Shield
db $00 ; 05 - Fire Shield
db $00 ; 06 - Mirror Shield
db $01 ; 07 - Fire Rod
db $01 ; 08 - Ice Rod
db $01 ; 09 - Hammer
db $01 ; 0A - Hookshot
db $01 ; 0B - Bow
db $01 ; 0C - Boomerang
db $01 ; 0D - Powder
db $00 ; 0E - Bottle Refill (bee)
db $01 ; 0F - Bombos
db $01 ; 10 - Ether
db $01 ; 11 - Quake
db $01 ; 12 - Lamp
db $01 ; 13 - Shovel
db $01 ; 14 - Flute
db $01 ; 15 - Somaria
db $01 ; 16 - Bottle
db $00 ; 17 - Heartpiece
db $01 ; 18 - Byrna
db $01 ; 19 - Cape
db $01 ; 1A - Mirror
db $01 ; 1B - Glove
db $01 ; 1C - Mitts
db $01 ; 1D - Book
db $01 ; 1E - Flippers
db $01 ; 1F - Pearl
db $00 ; 20 - Crystal
db $01 ; 21 - Net
db $00 ; 22 - Blue Mail
db $00 ; 23 - Red Mail
db $00 ; 24 - Small Key
db $00 ; 25 - Compass
db $00 ; 26 - Heart Container from 4/4
db $00 ; 27 - Bomb
db $00 ; 28 - 3 bombs
db $01 ; 29 - Mushroom
db $01 ; 2A - Red boomerang
db $01 ; 2B - Full bottle (red)
db $01 ; 2C - Full bottle (green)
db $01 ; 2D - Full bottle (blue)
db $00 ; 2E - Potion refill (red)
db $00 ; 2F - Potion refill (green)
db $00 ; 30 - Potion refill (blue)
db $00 ; 31 - 10 bombs
db $00 ; 32 - Big key
db $00 ; 33 - Map
db $00 ; 34 - 1 rupee
db $00 ; 35 - 5 rupees
db $00 ; 36 - 20 rupees
db $00 ; 37 - Green pendant
db $00 ; 38 - Blue pendant
db $00 ; 39 - Red pendant
db $01 ; 3A - Tossed bow
db $01 ; 3B - Silvers
db $01 ; 3C - Full bottle (bee)
db $01 ; 3D - Full bottle (fairy)
db $00 ; 3E - Boss heart
db $00 ; 3F - Sanc heart
db $00 ; 40 - 100 rupees
db $00 ; 41 - 50 rupees
db $00 ; 42 - Heart
db $00 ; 43 - Arrow
db $00 ; 44 - 10 arrows
db $00 ; 45 - Small magic
db $00 ; 46 - 300 rupees
db $00 ; 47 - 20 rupees green
db $01 ; 48 - Full bottle (good bee)
db $01 ; 49 - Tossed fighter sword
db $01 ; 4A - Active Flute
db $01 ; 4B - Boots
db $00 ; 4C - Bomb capacity (50)
db $00 ; 4D - Arrow capacity (70)
db $01 ; 4E - 1/2 magic
db $01 ; 4F - 1/4 magic
db $01 ; 50 - Safe master sword
db $00 ; 51 - Bomb capacity (+5)
db $01 ; 52 - Bomb capacity (+10)
db $00 ; 53 - Arrow capacity (+5)
db $00 ; 54 - Arrow capacity (+10)
db $00 ; 55 - Programmable item 1
db $00 ; 56 - Programmable item 2
db $00 ; 57 - Programmable item 3
db $01 ; 58 - Upgrade-only silver arrows
db $00 ; 59 - Rupoor
db $00 ; 5A - Nothing
db $00 ; 5B - Red clock
db $00 ; 5C - Blue clock
db $00 ; 5D - Green clock
db $01 ; 5E - Progressive sword
db $00 ; 5F - Progressive shield
db $00 ; 60 - Progressive armor
db $01 ; 61 - Progressive glove
db $00 ; 62 - RNG pool item (single)
db $00 ; 63 - RNG pool item (multi)
db $01 ; 64 - Progressive bow
db $01 ; 65 - Progressive bow
db $00 ; 66 -
db $00 ; 67 -
db $00 ; 68 -
db $00 ; 69 -
db $00 ; 6A - Triforce
db $00 ; 6B - Power star
db $00 ; 6C - Triforce Piece
db $00 ; 6D - Server request item
db $00 ; 6E - Server request item (dungeon drop)
db $00 ; 6F -
db $00 ; 70 - Map of Light World
db $00 ; 71 - Map of Dark World
db $00 ; 72 - Map of Ganon's Tower
db $00 ; 73 - Map of Turtle Rock
db $00 ; 74 - Map of Thieves' Town
db $00 ; 75 - Map of Tower of Hera
db $00 ; 76 - Map of Ice Palace
db $00 ; 77 - Map of Skull Woods
db $00 ; 78 - Map of Misery Mire
db $00 ; 79 - Map of Dark Palace
db $00 ; 7A - Map of Swamp Palace
db $00 ; 7B - Map of Agahnim's Tower
db $00 ; 7C - Map of Desert Palace
db $00 ; 7D - Map of Eastern Palace
db $00 ; 7E - Map of Hyrule Castle
db $00 ; 7F - Map of Sewers
db $00 ; 80 - Compass of Light World
db $00 ; 81 - Compass of Dark World
db $00 ; 82 - Compass of Ganon's Tower
db $00 ; 83 - Compass of Turtle Rock
db $00 ; 84 - Compass of Thieves' Town
db $00 ; 85 - Compass of Tower of Hera
db $00 ; 86 - Compass of Ice Palace
db $00 ; 87 - Compass of Skull Woods
db $00 ; 88 - Compass of Misery Mire
db $00 ; 89 - Compass of Dark Palace
db $00 ; 8A - Compass of Swamp Palace
db $00 ; 8B - Compass of Agahnim's Tower
db $00 ; 8C - Compass of Desert Palace
db $00 ; 8D - Compass of Eastern Palace
db $00 ; 8E - Compass of Hyrule Castle
db $00 ; 8F - Compass of Sewers
db $00 ; 90 - Skull key
db $00 ; 91 - Reserved
db $00 ; 92 - Big key of Ganon's Tower
db $00 ; 93 - Big key of Turtle Rock
db $00 ; 94 - Big key of Thieves' Town
db $00 ; 95 - Big key of Tower of Hera
db $00 ; 96 - Big key of Ice Palace
db $00 ; 97 - Big key of Skull Woods
db $00 ; 98 - Big key of Misery Mire
db $00 ; 99 - Big key of Dark Palace
db $00 ; 9A - Big key of Swamp Palace
db $00 ; 9B - Big key of Agahnim's Tower
db $00 ; 9C - Big key of Desert Palace
db $00 ; 9D - Big key of Eastern Palace
db $00 ; 9E - Big key of Hyrule Castle
db $00 ; 9F - Big key of Sewers
db $00 ; A0 - Small key of Sewers
db $00 ; A1 - Small key of Hyrule Castle
db $00 ; A2 - Small key of Eastern Palace
db $00 ; A3 - Small key of Desert Palace
db $00 ; A4 - Small key of Agahnim's Tower
db $00 ; A5 - Small key of Swamp Palace
db $00 ; A6 - Small key of Dark Palace
db $00 ; A7 - Small key of Misery Mire
db $00 ; A8 - Small key of Skull Woods
db $00 ; A9 - Small key of Ice Palace
db $00 ; AA - Small key of Tower of Hera
db $00 ; AB - Small key of Thieves' Town
db $00 ; AC - Small key of Turtle Rock
db $00 ; AD - Small key of Ganon's Tower
db $00 ; AE - Reserved
db $00 ; AF - Generic small key
db $00 ; B0 - Crystal 6
db $00 ; B1 - Crystal 1
db $00 ; B2 - Crystal 5
db $00 ; B3 - Crystal 7
db $00 ; B4 - Crystal 2
db $00 ; B5 - Crystal 4
db $00 ; B6 - Crystal 3
db $00 ; B7 - Reserved
db $00 ; B8 -
db $00 ; B9 -
db $00 ; BA -
db $00 ; BB -
db $00 ; BC -
db $00 ; BD -
db $00 ; BE -
db $00 ; BF -
db $00 ; C0 -
db $00 ; C1 -
db $00 ; C2 -
db $00 ; C3 -
db $00 ; C4 -
db $00 ; C5 -
db $00 ; C6 -
db $00 ; C7 -
db $00 ; C8 -
db $00 ; C9 -
db $00 ; CA -
db $00 ; CB -
db $00 ; CC -
db $00 ; CD -
db $00 ; CE -
db $00 ; CF -
db $00 ; D0 - Bee trap
db $00 ; D1 - Apples
db $00 ; D2 - Fairy
db $00 ; D3 - Chicken
db $00 ; D4 - Big Magic
db $00 ; D5 - 5 Arrows
db $00 ; D6 - Good Bee
db $00 ; D7 -
db $00 ; D8 -
db $00 ; D9 -
db $00 ; DA -
db $00 ; DB -
db $00 ; DC -
db $00 ; DD -
db $00 ; DE -
db $00 ; DF -
db $00 ; E0 -
db $00 ; E1 -
db $00 ; E2 -
db $00 ; E3 -
db $00 ; E4 -
db $00 ; E5 -
db $00 ; E6 -
db $00 ; E7 -
db $00 ; E8 -
db $00 ; E9 -
db $00 ; EA -
db $00 ; EB -
db $00 ; EC -
db $00 ; ED -
db $00 ; EE -
db $00 ; EF -
db $00 ; F0 -
db $00 ; F1 -
db $00 ; F2 -
db $00 ; F3 -
db $00 ; F4 -
db $00 ; F5 -
db $00 ; F6 -
db $00 ; F7 -
db $00 ; F8 -
db $00 ; F9 -
db $00 ; FA -
db $00 ; FB -
db $00 ; FC -
db $00 ; FD -
db $00 ; FE - Server request (async)
db $00 ; FF -
+25 -1
View File
@@ -65,6 +65,8 @@ LinkSubPixelVelocty = $7E002A ; Word length
LinkAnimationStep = $7E002E ;
LinkDirection = $7E002F ; $00 = Up | $02 = Down | $04 = Left | $06 = Right
;
FlagBY = $7E003A ; Bitfield for B and Y buttons.
;
OAMOffsetY = $7E0044 ;
OAMOffsetX = $7E0045 ;
LinkIncapacitatedTimer = $7E0046 ; Countdown when Link takes damage, not same as I-frames
@@ -114,6 +116,8 @@ RoomIndex = $7E00A0 ; Underworld room index. Word length. High byt
; Not zeroed on exit to overworld.
PreviousRoom = $7E00A2 ; Stores previous value of RoomIndex
;
CurrentFloor = $7E00A4 ; Current floor in dungeos
;
CameraBoundH = $7E00A6 ; Which set of camera boundaries to use.
CameraBoundV = $7E00A7 ;
;
@@ -194,6 +198,8 @@ BottleMenuCounter = $7E0205 ; Step counter for opening bottle menu
MenuFrameCounter = $7E0206 ; Incremented every menu frame. Never read.
MenuBlink = $7E0207 ; Incremented every frame and masked with $10 to blink cursor
;
DungeonMapCurrentFloor = $7E020E ;
;
RaceGameFlag = $7E021B ;
;
MessageJunk = $7E0223 ; Zeroed but never used (?)
@@ -231,6 +237,8 @@ CurrentYItem = $7E0303 ;
AButtonAct = $7E0308 ; Bitfield for A-actions. $80 = Carry/toss | $02 Prayer | $01 = Tree pull
CarryAct = $7E0309 ; Bitfield for carrying. $02 = Tossing | $01 = Lifting
;
LinkIFrames = $7E031F ; Countdown for Link's invincibility frames after taking damage.
;
LinkSwimDirection = $7E0340 ; Bitfield for swim direction. (.... udlr)
;
LinkDeepWater = $7E0345 ; Set when Link is in deep water.
@@ -347,6 +355,7 @@ DynamicDropGFXSlots = $7E07F1 ; Assume future use of this up to $0E bytes, t
; which item gfx is currently occupying each slot
OAMBuffer = $7E0800 ; Main OAM buffer sent to OAM. $200 bytes.
OAMBuffer2 = $7E0A00 ;
OAMBufferAux = $7E0A20 ; high X-bit and size bit sent to OAM, one byte per sprite
;
TransparencyFlag = $7E0ABD ; Flags transparency effects e.g. in Thieves Town Hellway
;
@@ -560,6 +569,17 @@ PegColor = $7EC172 ;
;
GameOverSongCache = $7EC227 ;
;
CachedDungeonID = $7EC22A ; Cached while opening dungeon map
CachedCurrentFloor = $7EC22B ; to restore when closing
;
CurrentDisplayedRoom = $7EC22C ; 2 bytes, used by dungeon map
DisplayedRoomDoorIndex = $7EC22E ; 2 bytes, used by dungeon map
;
DoorSlots = $7EC230 ; $32 bytes, used by dungeon map
DoorSlotScratch = $7EC262 ; 6 bytes, used by dungeon map
DoorSlotCursor = $7EC268 ; 2 bytes, used by dungeon map
CurrentDoorEntrance = $7EC26A ; 2 bytes, used by dungeon map
;
LastBGSet = $7EC2F8 ; Lists loaded sheets to check for decompression. 4 bytes.
;
PaletteBufferAux = $7EC300 ; Secondary and main palette buffer. See symbols_wram.asm
@@ -599,7 +619,8 @@ HexToDecDigit3: skip 1 ;
HexToDecDigit4: skip 1 ;
HexToDecDigit5: skip 1 ;
SpriteSkipEOR: skip 2 ; Used in utilities.asm to determine when to skip drawing sprites. Zero-padded
skip $2B ; Unused
skip $2A ; Unused
BossDropTouched: skip 1
AltTextFlag: skip 2 ; dialog.asm: Determines whether to load from vanilla decompression buffer
; or from a secondary buffer (used for things like free dungeon item text)
BossKills: skip 1 ;
@@ -761,6 +782,7 @@ endmacro
%assertRAM(LinkRecoilZ, $7E0029)
%assertRAM(LinkAnimationStep, $7E002E)
%assertRAM(LinkDirection, $7E002F)
%assertRAM(FlagBY, $7E003A)
%assertRAM(OAMOffsetY, $7E0044)
%assertRAM(OAMOffsetX, $7E0045)
%assertRAM(LinkIncapacitatedTimer, $7E0046)
@@ -858,6 +880,8 @@ endmacro
%assertRAM(UseY1, $7E0301)
%assertRAM(CurrentYItem, $7E0303)
%assertRAM(AButtonAct, $7E0308)
%assertRAM(CarryAct, $7E0309)
%assertRAM(LinkIFrames, $7E031F)
%assertRAM(LinkSwimDirection, $7E0340)
%assertRAM(LinkDeepWater, $7E0345)
%assertRAM(TileActIce, $7E0348)
+14 -4
View File
@@ -436,7 +436,7 @@ Shopkeeper_BuyItem:
BRA +
.refill
JSL Sprite_GetEmptyBottleIndex : BMI .full_bottles
LDA.b #$1 : STA.l ShopkeeperRefill ; If this is on, don't toggle bit to remove from shop
LDA.b #$01 : STA.l ShopkeeperRefill ; If this is on, don't toggle bit to remove from shop
+
LDA.l ShopType : AND.b #$80 : BNE .buy ; don't charge if this is a take-any
@@ -453,6 +453,16 @@ Shopkeeper_BuyItem:
LDA.b #$3C : STA.w SFX2 ; error sound
JMP .done
.buy
LDA.l ShopInventory, X
TAY
JSL ShieldCheck
BCS +
JMP .done
+
; Y now has the (possibly-substituted) item ID
LDA.l ShopType : AND.b #$80 : BNE ++ ; don't charge if this is a take-any
REP #$20 : LDA.l CurrentRupees : !SUB.l ShopInventory+1, X : STA.l CurrentRupees : SEP #$20 ; Take price away
++
@@ -464,9 +474,9 @@ Shopkeeper_BuyItem:
LDA.l EnableShopItemCount, X : STA.l ShopEnableCount ; If so, store the permission to count the item here.
+++
PLX
LDA.l ShopInventory, X
JSL AttemptItemSubstitution
TAY : JSL Link_ReceiveItem
; Y still has item ID
JSL Link_ReceiveItem
LDA.l ShopInventory+3, X : INC : STA.l ShopInventory+3, X
LDA.b #$00 : STA.l ShopEnableCount
TXA : LSR #2 : TAX
+3 -2
View File
@@ -190,7 +190,8 @@ ItemLimitCounts: skip 16 ; Keeps track of limited non-progressive items s
; See: ItemSubstitutionRules in tables.asm
; Right now this is only used for three items but extra space is
; reserved
skip 34 ; Unused
skip 32 ; Unused
PikitItem: skip 2 ; Item stored in shield player is carrying
FluteBitfield: skip 1 ;
SpecialWeaponLevel: skip 1 ; keeps track of level in special weapon modes
ItemOnB: skip 1 ; NYI
@@ -322,7 +323,7 @@ MagicCounter: skip 2 ; Magic used by player (16-bit integer)
HighestMail: skip 1 ; Highest mail level
SmallKeyCounter: skip 1 ; Total Number of small keys collected (integer)
HeartPieceCounter: skip 1 ; Total Number of heartpieces collected (integer)
skip 1 ; Unused
PikitFed: skip 1 ; Total Number of shields fed to pikit
DungeonsCompleted: skip 2 ; Bitfield indicating whether a dungeon's prize has been collected.
; This has the same shape as the dungeon item bitfields.
MapCountDisplay: skip 2 ;
+7
View File
@@ -5,6 +5,13 @@
;
; See sram.asm for adresses and documentation of stat values
;--------------------------------------------------------------------------------
IncrementPikitCounter:
LDA.l StatsLocked : BNE +
LDA.l PikitFed : INC A : BEQ + ; overflow
STA.l PikitFed
+
RTL
;--------------------------------------------------------------------------------
IncrementBonkCounter:
LDA.l StatsLocked : BNE +
LDA.l BonkCounter : INC : BEQ + ; overflow
+10 -8
View File
@@ -504,6 +504,15 @@ CreditsLineBlank:
%blankline()
%blankline()
%smallcredits("PIKIT FEEDER", "red")
%blankline()
%bigcredits("KARAFRUIT")
%blankline()
%blankline()
%smallcredits("SPRITE DEVELOPMENT", "yellow")
%blankline()
@@ -623,12 +632,6 @@ endif
%bigcredits("HTTPS://ALTTPR.COM/DISCORD")
%emptyline()
%emptyline()
%emptyline()
%emptyline()
%emptyline()
%emptyline()
%emptyline()
%emptyline()
@@ -755,10 +758,9 @@ endif
%bigcreditsleft("TOTAL LAG TIME")
%blankline()
%blankline()
%bigcreditsleft("SHIELDS EATEN")
%blankline()
%blankline()
+4 -1
View File
@@ -32,6 +32,8 @@
!TOTAL_MENU_TIME_Y = 364
!TOTAL_LAG_TIME_X = 19
!TOTAL_LAG_TIME_Y = 367
!PIKIT_FED_X = 26
!PIKIT_FED_Y = 370
!COLLECTION_RATE_X = 22
!COLLECTION_RATE_Y = 380
!TOTAL_TIME_X = 19
@@ -64,8 +66,9 @@ CreditsStats:
%AddStat(FaerieRevivalCounter, 0, 0, 08, 3, !FAERIE_REVIVALS_X, !FAERIE_REVIVALS_Y)
%AddStat(MenuFrames, 1, 8, 32, 4, !TOTAL_MENU_TIME_X, !TOTAL_MENU_TIME_Y)
%AddStat(LagTime, 1, 0, 32, 4, !TOTAL_LAG_TIME_X, !TOTAL_LAG_TIME_Y)
%AddStat(PikitFed, 0, 0, 8, 3, !PIKIT_FED_X, !PIKIT_FED_Y)
print "Collection Rate config: ", pc
warnpc $A39864
; warnpc $A39864
%AddStat(TotalItemCounter, 0, 0, 16, 3, !COLLECTION_RATE_X, !COLLECTION_RATE_Y)
%AddStat(NMIFrames, 1, 0, 32, 4, !TOTAL_TIME_X, !TOTAL_TIME_Y)
+6
View File
@@ -132,6 +132,12 @@ GetSmithSword:
.buy
LDA.l SmithItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
LDA.l SmithItem : TAY
JSL ShieldCheck
BCS +
JML $86B4A5
+
STZ.w ItemReceiptMethod ; Item from NPC
PHX : JSL Link_ReceiveItem : PLX
+4 -4
View File
@@ -464,10 +464,9 @@ db $00 ; #$00 = Original Behavior (default) - #$01 = Book can flip crystal switc
; 0x1800A7 - 0x1800AE (unused)
;--------------------------------------------------------------------------------
; 0x1800AF
; mtff ffff
; m-ff ffff
;
; m - 0 = only shorten timer on multiworld items, 1 = shorten all items
; t - 0 = triforce pieces considered important, 1 = triforce pieces considered junk
; f - number of frames to show items
;--------------------------------------------------------------------------------
org $B080AF ; PC 0x1800AF
@@ -1585,6 +1584,7 @@ dw $0000
; STAIRS3
; STAIRS4
;--------------------------------------------------------------------------------
org $B0DA00
RoomHeaders:
org $B0DA00 : RoomHeader_0000: ; pc 0x185A00
db $41, $21, $13, $22, $07, $3D, $00, $00, $00, $10, $C0, $00, $00, $04
@@ -2664,7 +2664,7 @@ db #$00, #$00, #$00, #$00, #$00, #$00, #$00, #$00, #$00, #$00, #$00, #$00, #$00,
;--------------------------------------------------------------------------------
org $B0EFE0 ; PC 0x186FE0-0x186FEF
CrystalPendantFlags_3:
db $00 ; Sewers
db $00 ; Sewers
db $00 ; Hyrule Castle
db $08 ; Eastern Palace
db $09 ; Desert Palace
@@ -2672,7 +2672,7 @@ CrystalPendantFlags_3:
db $02 ; Swamp Palace
db $01 ; Palace of Darkness
db $06 ; Misery Mire
db $03 ; Skull Woods
db $03 ; Skull Woods
db $05 ; Ice Palace
db $0A ; Tower of Hera
db $04 ; Thieves' Town
+21 -1
View File
@@ -57,7 +57,7 @@ RTL
MaybeUnlockTabletAnimation:
PHA : PHP
JSL IsMedallion : BCC +
JSR SetTabletItemFlag
JSR SetTabletItemFlag
STZ.w MedallionFlag ; disable falling-medallion mode
STZ.w ForceSwordUp ; release link from item-up pose
LDA.b #$00 : STA.b LinkState ; set link to ground state
@@ -73,6 +73,26 @@ MaybeUnlockTabletAnimation:
PLP : PLA
RTL
;--------------------------------------------------------------------------------
MaybeFreeLinkFromTablet:
PHA : PHP
JSL IsMedallion : BCC +
STZ.w MedallionFlag ; disable falling-medallion mode
STZ.w ForceSwordUp ; release link from item-up pose
LDA.b #$00 : STA.b LinkState ; set link to ground state
STZ.w CutsceneFlag
STZ.w NoDamage
REP #$20 ; set 16-bit accumulator
LDA.b OverworldIndex : CMP.w #$0030 : BNE ++ ; Desert
SEP #$20 ; set 8-bit accumulator
LDA.b #$02 : STA.b LinkDirection ; face link forward
LDA.b #$3C : STA.b LinkIncapacitatedTimer ; lock link for 60f
++
SEP #$20 ; set 8-bit accumulator
+
PLP : PLA
RTL
;--------------------------------------------------------------------------------
IsMedallion:
REP #$20 ; set 16-bit accumulator
LDA.b OverworldIndex
+17
View File
@@ -99,6 +99,7 @@ HandleFollowersAfterMirroring = $87AA8B
LinkHop_FindArbitraryLandingSpot = $87E359
Link_HandleMovingAnimation_FullLongEntry = $87E68F
Link_CheckForEdgeScreenTransition = $87F413
Link_CheckForEdgeScreenTransition_prevent_transition = $87F42C
Sprite_CheckIfPlayerPreoccupied = $87F4AA
FlashGanonTowerPalette_next_thunder = $87FA81
FlashGanonTowerPalette_bright_white = $87FAAC
@@ -191,6 +192,7 @@ LoadBackgroundGraphics_arbitrary = $80E64D
RoomTag_GetHeartForPrize = $81C709
RoomTag_GetHeartForPrize_spawn_prize = $81C731
RoomTag_GetHeartForPrize_delete_tag = $81C749
RoomTag_GetHeartForPrize_exit = $81C74D
Underworld_SetBossOrSancMusicUponEntry = $828AD9
ResetThenCacheRoomEntryProperties = $828C73
RecoverPositionAfterDrowning = $829485
@@ -221,6 +223,8 @@ Ancilla29_MilestoneItemReceipt_skip_crystal_sfx = $88CAE5
Ancilla29_MilestoneItemReceipt_no_sparkle = $88CB2E
Ancilla_SetOAM_XY = $88F6F3
Ancilla_AddAncilla = $899CCE
WorldMap_CalculateOAMCoordinates_exit_successfully = $8AC51F
WorldMap_MultiplyAxB = $8AC57F
UpdateHUD = $8DDFA9
UpdateEquippedItem = $8DDFAF
DrawProgressIcons = $8DE9C8
@@ -270,26 +274,39 @@ PalettesVanilla_spraux09 = $9BD47E
; Misc. Data
;===================================================================================================
DungeonMask = $8098C0
RoomFlagMask = $809900
GFXSheetPointers_background_bank = $80CFC0
GFXSheetPointers_background_high = $80D09F
GFXSheetPointers_background_low = $80D17E
LayerOfDestination = $81C31F
RoomData_ChestItems = $81E96C
AnimatedTileSheets = $82802E
Module1B_SpawnSelect_spawns = $828481
Overworld_ActualScreenID = $82A4E3
UnderworldTransitionLandingCoordinate = $82C034
Overworld_FinalizeEntryOntoScreen_Data = $82C176
EntranceData_room_id = $82C577
EntranceData_y_coordinate = $82CCBD
EntranceData_x_coordinate = $82CDC7
EntranceData_dungeon_id = $82D1EF
EntranceData_layer = $82D2F9
EntranceData_song = $82D592
SpawnPointData_room_id = $82D8D2
Overworld_CheckForSpecialOverworldTrigger_Direction = $84E879
RoomHeaderPointers = $84F1E2
Sprite_ShowSolicitedMessage_Direction = $85E1A3
FluteMenuNumbers_bits = $8AB7A3
WorldMap_RedXChars = $8ABF70
WorldMap_CalculateOAMCoordinates = $8AC3B1
WorldMap_HandleSpriteBlink = $8AC52E
WorldMapIcon_AdjustCoordinate = $8AC59B
WorldMap_LightWorldTilemap = $8AC739
WorldMap_DarkWorldTilemap = $8AD739
DungeonMapRoomMarkerYBase = $8AE803
DungeonMapBossRooms = $8AE817
DungeonMapFloorCountData = $8AF5E9
DungeonMapFloorToDataOffset = $8AF605
DungeonMapRoomPointers = $8AF615
DamageSubclassValue = $8DB8F1
TextCharMasks = $8EB844
Credits_ScrollScene_target_y = $8EC308