57 Commits

Author SHA1 Message Date
2477918df9 Bugfixes 2026-05-13 00:58:23 -05:00
a52f0d71fb Fix compass toggle check and eastern palace split room 2026-05-11 22:21:08 -05:00
85a4abbe7b Fix map/icon issues 2026-05-04 17:49:23 -05:00
d7503ad0f3 Add setting to cap hud/cave loot 2026-05-04 08:52:11 -05:00
fbd4efc447 Update version 2026-05-04 00:38:06 -05:00
ec0bb02a53 Merge branch 'codemann_OWMain' into beta 2026-05-04 00:35:52 -05:00
80c0f47b1c Show level of current loot in HUD 2026-05-04 00:14:09 -05:00
b58641ad90 extra keys display 2026-05-03 17:06:30 -05:00
031a444a4a Merge commit '9174bbfba54f94ff51c149ba5d3f9e754dbf61a1' into codemann_OWMain 2026-05-02 23:41:40 -05:00
codemann8
9174bbfba5 Fix for Kiki unfollowing after certain entrance transition conditions 2026-03-15 16:59:19 -05:00
codemann8
37caff7bcf Fixed bug with MSU-1 GT2 track not falling back to GT track 2026-03-15 14:19:12 -05:00
codemann8
6fb81c0aa8 Fix buffer sword slash when dashing into water 2026-03-15 10:55:57 -05:00
codemann8
6609253059 Merged in DR v1.5.5 2026-03-03 07:59:14 -06:00
aerinon
d0f4651130 fix: skip key counter with universal keys 2026-02-11 10:49:57 -07:00
57591e1ef8 Merge in OWRando fixes (#3)
Reviewed-on: #3
2026-02-03 23:48:20 +00:00
ed2746a27b Update map coordinates and fix red crystals showing junk 2026-01-31 13:01:14 -06:00
f8917c461a Merge remote-tracking branch 'codemann/OWMain' into codemann_OWMain 2026-01-31 08:47:00 -06:00
5dd62441a8 Pull in OW Fog and Grid Map (#2)
Reviewed-on: #2
2026-01-31 14:41:47 +00:00
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
482381fe53 Add lower-layer headers to doors/stairs in IP tile theme 2026-01-27 21:21:23 -06:00
2b3b50fc5c Initialize $72 before loading palette for OW map 2026-01-27 00:19:56 -06:00
b7c32fdfb1 Bump GK Rom version 2026-01-25 21:48:20 -06:00
ec1083a2e5 Fix reference to now-removed UWSpritesPointer 2026-01-25 21:31:39 -06:00
53d2a7606a Merge remote-tracking branch 'codemann/OWMain' into codemann_OWMain 2026-01-25 21:15:13 -06: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
aerinon
cc635ddb78 fix: consistency for dungeon counter settings 2026-01-16 15:29:26 -07: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
aerinon
c5aaa07f3e feat: king tomb bonk fix 2026-01-15 15:47:23 -07: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
33 changed files with 1164 additions and 182 deletions

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
@@ -211,6 +213,7 @@ incsrc gk/variable_ganon_vulnerability.asm
incsrc gk/pseudoflute.asm
incsrc gk/fast_junk.asm
incsrc gk/dungeon_maps.asm
incsrc gk/dungeon_indicator.asm
print "End of B9: ", pc
warnpc $B9EE00
@@ -332,6 +335,8 @@ 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

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

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

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 $87964D ; 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

View File

@@ -599,7 +599,7 @@ skip $10
BigKeyStatus: ;27f040 (status 2 indicate BnC guard)
dw $0002, $0002, $0001, $0001, $0000, $0001, $0001, $0001, $0001, $0001, $0001, $0001, $0001, $0001, $0000, $0000
DungeonReminderTable: ;27f060
dw $2D50, $2D50, $2D51, $2D52, $2D54, $2D56, $2D55, $2D5A, $2D57, $2D59, $2D53, $2D58, $2D5B, $2D5C, $0000, $0000
dw $2DA4, $2DA4, $2DA5, $2DA6, $2DA8, $2DAA, $2DA9, $2DAE, $2DAB, $2DAD, $2DA7, $2DAC, $2DAF, $2DB0, $0000, $0000
TotalLocationsLow: ;27f080
db $08, $08, $06, $06, $02, $00, $04, $08, $08, $08, $06, $08, $02, $07, $00, $00
TotalLocationsHigh: ;27f090
@@ -696,4 +696,4 @@ dw $ffff
OldManDarkWorld:
dw $ffff
OldManRetrievalWorld:
dw $0000
dw $0000

View File

@@ -1,10 +1,11 @@
!BlankTile = $207F
!SlashTile = $2830
!PlusTile = $2404
!HyphenTile = $2405
!LTile = $2D68
!DTile = $2D60
!RedSquare = $345E
!BlueSquare = $2C5E
!BossIcon = $253C
DrHudOverride:
PHB
@@ -46,7 +47,7 @@ DRHUD_BossIndicator:
SEP #$20
BEQ .draw_indicator
LDA.l CompassBossIndicator, x : CMP.b RoomIndex : BNE .draw_indicator
LDY.w #!RedSquare
LDY.w #!BossIcon
.draw_indicator
STY.w HUDMultiIndicator
BRA DRHUD_DrawCurrentDungeonIndicator
@@ -71,13 +72,12 @@ DRHUD_DrawCurrentDungeonIndicator: ; mX
CMP.b #$06 : BEQ .draw_indicator
.get_indicator
REP #$20 : LDA.l DungeonReminderTable,X : TAY
SEP #$20
LDY.w #$2C28
.draw_indicator
STY.w HUDCurrentDungeonWorld
DRHUD_DrawKeyCounter:
LDA.l DRFlags : AND.b #$04 : BEQ DRHUD_Finished
LDA.l DRFlags : AND.b #$04 : BEQ .to_finished
LDA.l CompassMode : BIT.b #$03 : BEQ DRHUD_Finished
REP #$20
BIT.w #$0002 : BNE .skip_map_check
@@ -90,8 +90,17 @@ DRHUD_DrawKeyCounter:
LDA.l GenericKeys : LSR : BCS .total_only
LDA.w DungeonCollectedKeys, X : JSR ConvertToDisplay : STA.w HUDKeysObtained
LDA.w #!SlashTile : STA.w HUDKeysSlash
LDA.l ExtraChestKeys, X : AND.w #$00FF : BEQ .total_only
JSR ConvertToDisplay : STA.w HUDKeysExtraCount
LDA.w #!PlusTile : STA.w HUDKeysExtraPlus
.total_only
LDA.l ChestKeys, x : JSR ConvertToDisplay : STA.w HUDKeysTotal
SEP #$20
LDA.l ChestKeys, X : SEC : SBC.l ExtraChestKeys, X
REP #$20
JSR ConvertToDisplay : STA.w HUDKeysTotal
.to_finished
JMP DRHUD_Finished
OWRHUD_DrawWorldIndicator:
@@ -167,9 +176,7 @@ DrHudDungeonItemsAdditions:
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
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
@@ -294,17 +301,29 @@ BossStatus:
; default palette 3 - white
LDA.l DungeonReminderTable, X : RTS
ConvertToDisplay:
and.w #$00ff : cmp.w #$000a : !BLT +
!ADD.w #$2519 : rts
+ !ADD.w #$2490 : rts
ConvertToDisplay: ; transparent background
AND.w #$00FF
CMP.w #$000A : BCC .under10
CMP.w #$000C : BCC .under12
.over11
CLC : ADC.w #$2553 : RTS
.under12
CLC : ADC.w #$2519 : RTS
.under10
CLC : ADC.w #$2490 : RTS
ConvertToDisplay2:
and.w #$00ff : beq ++
cmp.w #$000a : !BLT +
!ADD.w #$2517 : rts ; 2580 with 258A as "A" for non transparent digits
+ !ADD.w #$2816 : rts
++ lda.w #$2827 : rts ; 0/O for 0 or placeholder digit ;2483
ConvertToDisplay2: ; solid background
AND.w #$00FF : BEQ .zero
CMP.w #$000A : BCC .under10
CMP.w #$000C : BCC .under12
.over11
CLC : ADC.w #$2580 : RTS
.under12
CLC : ADC.w #$2517 : RTS
.under10
CLC : ADC.w #$2816 : RTS
.zero
LDA.w #$2827 : RTS
CountAbsorbedKeys:
JML IncrementSmallKeysNoPrimary

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
@@ -848,6 +857,7 @@ RTL
Kiki_DontScareTheMonke:
LDA.b LinkJumping : BEQ .return
CMP.b #$02 : BEQ .no_spook ; needed for quake usage
LDA.b GameMode : CMP.b #$0F : BEQ .no_spook ; needed for entrance transitions
LDA.w NoDamage : BNE .no_spook
LDA.w LinkThud : BNE .no_spook
.spook

View File

@@ -17,7 +17,7 @@ CheckLoot:
STA.b $0E
LDA.b $CA
AND.w #$00FF
AND.w #$01FF
ASL A
TAX
@@ -31,6 +31,10 @@ CheckLoot:
STA.b $0E
+ LDA.w DungeonID
AND.w #$00FF
CMP.w #$00FF
BEQ .skip_dungeon_checks
TAX
LDA.l MapField
@@ -52,6 +56,8 @@ CheckLoot:
STA.b $0E
+
.skip_dungeon_checks
LDA.l ItemSources : BIT.w #$0001 : BEQ +
JSR CheckChests
+
@@ -82,7 +88,7 @@ CheckLoot:
CheckChests:
LDA.b $CA
AND.w #$00FF
AND.w #$01FF
STA.b $00
ASL A
TAX
@@ -141,7 +147,7 @@ CheckBoss:
+
LDA.b $CA
AND.w #$00FF
AND.w #$01FF
STA.b $04
LDX.w #$FFFA
@@ -196,7 +202,7 @@ CheckBoss:
CheckPrize:
LDA.b $CA
AND.w #$00FF
AND.w #$01FF
STA.b $04
LDX.w #$FFFD
@@ -232,7 +238,7 @@ CheckPrize:
CheckPots:
LDA.b $CA
AND.w #$00FF
AND.w #$01FF
ASL A
TAX
@@ -298,7 +304,7 @@ CheckPots:
+
LDA.b $CA
AND.w #$00FF
AND.w #$01FF
ASL A
TAX
if !FEATURE_FIX_BASEROM
@@ -336,7 +342,7 @@ CheckJunkPot:
+
LDA.b $CA
AND.w #$00FF
AND.w #$01FF
ASL A
TAX
LDA.l PotCollectionRateTable, X
@@ -364,11 +370,17 @@ endif
CheckEnemies:
LDA.b $CA
AND.w #$00FF
AND.w #$01FF
ASL A
TAX
LDA.l UWSpritesPointers, X
; 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)
@@ -448,7 +460,7 @@ CheckEnemies:
+
LDA.b $CA
AND.w #$00FF
AND.w #$01FF
ASL A
TAX
@@ -478,7 +490,9 @@ GetLootClass:
CMP.w #$0080 : BNE .not_compass
.compass
LDA.l AlwaysShowCompass : BNE .check_value
LDA.l AlwaysShowCompass
AND.w #$00FF
BNE .check_value
.not_compass
LDA.b $0E
@@ -526,7 +540,7 @@ macro DefineGetFooSection(type, offset)
Get<type>Section:
PHX
LDA.b $CA
AND.w #$00FF
AND.w #$01FF
ASL A
TAX
LDA.l SplitRooms, X
@@ -574,13 +588,13 @@ Check<type>Section:
STA.b $CC
LDA.b $CB
AND.w #$00FF
AND.w #$00F0
BEQ .yes
JSR Get<type>Section
LDA.b $CB
AND.w #$00FF
AND.w #$00F0
LSR A : LSR A : LSR A : LSR A
DEC A
CMP.b $CE

View File

@@ -61,7 +61,24 @@ SplitRooms:
%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)
; E0
%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)
; F0
%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)
; 100
%d(.no) : %d(.101) : %d(.no) : %d(.103) : %d(.no) : %d(.no) : %d(.106) : %d(.107)
%d(.no) : %d(.no) : %d(.no) : %d(.no) : %d(.10c) : %d(.no) : %d(.10e) : %d(.no)
; 110
%d(.no) : %d(.no) : %d(.112) : %d(.no) : %d(.114) : %d(.115) : %d(.no) : %d(.no)
%d(.no) : %d(.no) : %d(.no) : %d(.11b) : %d(.11c) : %d(.no) : %d(.11e) : %d(.11f)
; 120
%d(.120) : %d(.no) : %d(.122) : %d(.no) : %d(.124) : %d(.125) : %d(.126) : %d(.no)
.no
db $00
@@ -435,7 +452,7 @@ db $01
%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 $01, $34, $44, $B4, $FF
db $FF
..doors
db $03, $06
@@ -569,3 +586,326 @@ db $FF
..chests
db $01
db $FF
.101 ; East Snitch House (2) // West Snitch House (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(..pots) : %d(..enemies)
..areas
db $03, $00, $7F, $00, $FF
db $FF
..doors
db $06
db $FF
..pots
db $00
db $FF
..enemies
db $00
db $FF
.103 ; Man With Beds (3) // Front of Tavern (2) // Back of Tavern (1)
db $02
%sq($00)
%d(..areas3) : %d(..doors3) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(..enemies3)
%sq($00)
%d(..areas2) : %d(..doors2) : %d(.no_items)
%d(.no_items) : %d(..pots2) : %d(..enemies2)
..areas3
db $03, $80, $FF, $00, $FF
db $FF
..doors3
db $08
db $FF
..enemies3
db $02
db $FF
..areas2
db $03, $00, $7F, $50, $FF
db $FF
..doors2
db $06
db $FF
..pots2
db $02
db $FF
..enemies2
db $00
db $01
db $FF
.106 ; VoO Chest Game (2) // Brewery (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(..enemies)
..areas
db $03, $00, $7F, $00, $FF
db $FF
..doors
db $06
db $FF
..enemies
db $00
db $FF
.107 ; Library (2) // Bomb Refill Hut (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(.no_items)
..areas
db $03, $00, $7F, $00, $FF
db $FF
..doors
db $06
db $FF
.10c ; Mimic Cave (2) // Hookshot Fairy Pot (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(..chests) : %d(.no_items) : %d(..enemies)
..areas
db $03, $00, $7F, $00, $FF
db $FF
..doors
db $06
db $FF
..chests
db $00
db $FF
..enemies
db $04
db $05
db $06
db $07
db $FF
.10e ; Storyteller (2) // Storyteller (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(..enemies)
..areas
db $03, $00, $7F, $00, $FF
db $FF
..doors
db $06
db $FF
..chests
db $FF
..pots
db $FF
..enemies
db $00
db $FF
.112 ; Dark Chapel (2) // Store (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(..enemies)
..areas
db $03, $00, $7F, $00, $FF
db $FF
..doors
db $06
db $FF
..enemies
db $00
db $FF
.114 ; Waterfall Fairy (2) // Hint NPC (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(..chests) : %d(.no_items) : %d(..enemies)
..areas
db $03, $00, $7F, $00, $FF
db $FF
..doors
db $06
db $FF
..chests
db $00
db $01
db $FF
..enemies
db $00
db $FF
.115 ; Capacity Fairy (1) // Healing Fairy (2)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(..enemies)
..areas
db $03, $80, $FF, $80, $FF
db $FF
..doors
db $08
db $FF
..enemies
db $00
db $FF
.11b ; Cave 45 (2) // Graveyard Ledge (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(..pots) : %d(..enemies)
..areas
db $03, $00, $7F, $00, $FF
db $FF
..doors
db $06
db $FF
..pots
db $00
db $01
db $02
db $03
db $04
db $05
db $FF
..enemies
db $01
db $FF
.11c ; Bomb Shop (2) // C-Shaped House (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(..enemies)
..areas
db $03, $00, $7F, $00, $FF
db $FF
..doors
db $06
db $FF
..enemies
db $00
db $FF
.11e ; Long Fairy Cave (2) // Hype Cave (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(..enemies)
..areas
db $03, $00, $7F, $00, $FF
db $FF
..doors
db $06
db $FF
..enemies
db $00
db $01
db $02
db $03
db $FF
.11f ; Lumberjack House (1) // Store (2)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(..enemies)
..areas
db $03, $80, $FF, $00, $FF
db $FF
..doors
db $08
db $FF
..enemies
db $00
db $FF
.120 ; Ice Rod Cave (1) // Cool Bee Cave (2)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(..enemies)
..areas
db $03, $80, $FF, $00, $FF
db $03, $80, $FF, $00, $FF
db $FF
..doors
db $08
db $FF
..enemies
db $00
db $01
db $02
db $FF
.122 ; Fortune Teller (2) // Other Fortune Teller (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(..enemies)
..areas
db $03, $00, $7F, $00, $FF
db $FF
..doors
db $06
db $FF
..enemies
db $00
db $FF
.124 ; 50-Rupee Cave (1) // Bonk Rocks (2)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(..chests) : %d(.no_items) : %d(.no_items)
..areas
db $03, $80, $FF, $00, $FF
db $FF
..doors
db $08
db $FF
..chests
db $00
db $FF
.125 ; 20-Rupee Cave (2) // Spiky Hint Cave (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(..pots) : %d(..enemies)
..areas
db $03, $00, $7F, $00, $FF
db $FF
..doors
db $06
db $FF
..pots
db $00
db $01
db $02
db $03
db $FF
..enemies
db $00
db $FF
.126 ; Bonk Fairy Pool (2) // Checkerboard Cave (1)
db $01
%sq($00)
%d(..areas) : %d(..doors) : %d(.no_items)
%d(.no_items) : %d(.no_items) : %d(..enemies)
..areas
db $03, $00, $7F, $00, $FF
db $FF
..doors
db $06
db $FF
..enemies
db $01
db $02
db $03
db $04
db $FF

View File

@@ -172,6 +172,7 @@ DrawSingleRoomLoot:
STA.w GFXStripes+$0C, Y
LDA.b $CA
AND.w #$F0FF
JSL CheckLoot
ASL A : ASL A : ASL A
@@ -687,6 +688,13 @@ GetSpecificRoomVisibility:
STA.b $0A
+
SEP #$20
LDA.b $0A
CMP.b $0B
BCC +
STA.b $0B
+
REP #$20
LDA.b $CA
AND.w #$00FF
@@ -1453,8 +1461,8 @@ MoveDoorsMapCursor:
BRA .done
.no_move
LDA.b #$3C
STA.w $012E
; LDA.b #$3C
; STA.w $012E
.done
PLP
@@ -2105,6 +2113,13 @@ DrawDoorsStairs:
DetectLinksSection:
LDA.b RoomIndex
CMP.w #$0128
BCC +
LDA.w #$0000
RTL
+
ASL A
TAX
LDA.l SplitRooms, X

50
gk/dungeon_indicator.asm Normal file
View File

@@ -0,0 +1,50 @@
LoadDungeonIndicator:
; what we wrote over
JSL InitializeTilesets
LDA.w DungeonID
CMP.b #DungeonIndicatorMap_end-DungeonIndicatorMap : BCS .done
TAX
LDA.l DungeonIndicatorMap, X
TAX
LDA.b #$80
STA.w $2115
REP #$20
LDA.w #$7140
STA.w $2116
LDY.b #$10
- LDA.l DungeonIndicatorGfx, X
STA.w $2118
INX #2
DEY #2
BNE -
SEP #$20
.done
RTL
DungeonIndicatorMap:
dw $0000
dw $0000
dw $0010
dw $0020
dw $0040
dw $0060
dw $0050
dw $00A0
dw $0070
dw $0090
dw $0030
dw $0080
dw $00B0
dw $00C0
.end
DungeonIndicatorGfx:
incbin "menu/dr_dungeon_indicators.2bpp"
.end

View File

@@ -24,6 +24,8 @@ endmacro
%WriteGFXSheetPointer($62, DungeonMapIcons5)
%WriteGFXSheetPointer($63, DungeonMapIcons6)
%WriteGFXSheetPointer($14, DRSheet14)
pullpc
incsrc doors_dungeon_map.asm
@@ -32,6 +34,7 @@ incsrc map_bg3.asm
incsrc dungeon_switch.asm
incsrc draw_loot.asm
incsrc check_loot.asm
incsrc loot_hud.asm
incsrc blink_loot.asm
incsrc data/doors_display.asm
incsrc data/spiral_stairs.asm

76
gk/loot_hud.asm Normal file
View File

@@ -0,0 +1,76 @@
UpdateLootHUD:
PHP
REP #$30
PHX : PHY
SEP #$30
LDA.l ShowLootInHUD : BEQ .setting_off
LDA.b IndoorsFlag : BEQ .done
REP #$30
LDA.b $00 : PHA
LDA.b $02 : PHA
LDA.b $04 : PHA
LDA.b $06 : PHA
LDA.b $08 : PHA
LDA.b $0E : PHA
; if if door rando, check for section of supertile
LDA.l DRMode
BNE +
; if not in door rando, check for section of supertile if we're not in a dungeon
LDA.w DungeonID
AND.w #$00FF
CMP.w #$00FF
BEQ +
; just load the room id, we don't care about sections
LDA.b RoomIndex
BRA .check
+ ; figure out section before checking
JSL DetectLinksSection
INC A
XBA
ASL A : ASL A : ASL A : ASL A
ORA.b RoomIndex
.check
JSL CheckLoot
SEP #$30
CMP.l ShowItems_hud_cap
BCC +
LDA.l ShowItems_hud_cap
+
LDX.w DungeonID
CPX.b #$FF
BNE +
CMP.l ShowItems_cave_cap
BCC +
LDA.l ShowItems_cave_cap
+
REP #$30
ASL A : TAX
LDA.l HUDLootTypeIcons, X
STA.w EnemyDropIndicator
PLA : STA.b $0E
PLA : STA.b $08
PLA : STA.b $06
PLA : STA.b $04
PLA : STA.b $02
PLA : STA.b $00
BRA .done
.setting_off
JSL SetupEnemyDropIndicator
.done
REP #$30
PLY : PLX
PLP
RTL

View File

@@ -146,6 +146,25 @@ dw $25A4, $25A4 ; Reserved
dw $25A4, $25A4 ; Reserved
; $B9FB40
HUDLootTypeIcons:
dw $287F ; 00 - nothing
dw $295C ; 01 - unknown - dot
dw $2954 ; 02 - junk - pot
dw $2950 ; 03 - small key
dw $2952 ; 04 - triforce piece
dw $2955 ; 05 - safety - plus
dw $2953 ; 06 - less important item - small chest
dw $2957 ; 07 - map
dw $2D56 ; 08 - compass
dw $2950 ; 09 - small key
dw $2951 ; 0A - big key
dw $295A ; 0B - important inventory item - big chest
dw $2D58 ; 0C - pendant
dw $2D59 ; 0D - crystal
dw $2952 ; 0E - triforce piece
dw $295B ; 0F - triforce
; $B9FB60
warnpc $B9FE00
org $B9FE00
@@ -190,7 +209,11 @@ ShowItems:
.visited_tile
db $01
.reserved
skip 4
skip 2
.hud_cap
db $FF
.cave_cap
db $01
warnpc $B9FF10
org $B9FF10
@@ -206,3 +229,7 @@ ItemSources:
; $B9FF11
AlwaysShowCompass:
db $01
; $B9FF12
ShowLootInHUD:
db $01

View File

@@ -12,7 +12,9 @@ db $01
GKRomVersion:
; $01 = Dungeon Maps
; .., $01 = Dark rooms don't show on map from visition
db $01, $01, $00
; .., $02 = OW Fog and Grid modes
; .., $03 = Loot level of current supertile in HUD
db $01, $03, $00
;--------------------------------------------------------------------------------
;================================================================================

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
@@ -2102,6 +2107,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
;--------------------------------------------------------------------------------
@@ -2748,6 +2758,13 @@ JSL MimicDirection
org $828068
JSL AdjustDefaultGraphics
;================================================================================
;--------------------------------------------------------------------------------
; Dungeon Indicator VRAM overwrite
;--------------------------------------------------------------------------------
org $828190
JSL LoadDungeonIndicator
;================================================================================
; Special Weapons Modes
;--------------------------------------------------------------------------------

View File

@@ -165,6 +165,7 @@ AddInventory:
LDA.l !MULTIWORLD_RECEIVING_ITEM : BNE .done
REP #$30
LDA.l TotalItemCounter : INC : TAY
JSL UpdateLootHUD
LDA.l BootsEquipment : AND.w #$00FF : BNE +
TYA : STA.l PreBootsLocations
+

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
@@ -220,7 +221,8 @@ RevealPotItem:
STZ.w SpawnedItemIsMultiWorld
BIT.b Scrap08
BVS LoadMultiWorldPotItem
BMI LoadMajorPotItem
BPL .normal_secret
JMP LoadMajorPotItem
.normal_secret
STA.b Scrap08
@@ -241,6 +243,7 @@ RevealPotItem:
; Could increment GT Tower Pre Big Key but we aren't showing that stat right now
+ REP #$10
LDA.l TotalItemCounter : INC : STA.l TotalItemCounter ; Increment Item Total
JSL UpdateLootHUD
LDA.w #$0001 : STA.l UpdateHUDFlag
.obtained
PLY : PLX
@@ -340,6 +343,7 @@ IncrementCountsForSubstitute:
; Could increment GT Tower Pre Big Key but we aren't showing that stat right now
+
LDA.l TotalItemCounter : INC : STA.l TotalItemCounter ; Increment Item Total
JSL UpdateLootHUD
LDA.w #$0001 : STA.l UpdateHUDFlag
.obtained
SEP #$30 : PLX
@@ -356,7 +360,7 @@ ClearSpriteData:
STZ.w SprSourceItemId, X : STZ.w SprItemReceipt, X : STZ.w SprItemMWPlayer, X
STZ.w SprRedrawFlag, X
DEX : BPL .loop
JSR SetupEnemyDropIndicator
JSL UpdateLootHUD
PLX
RTL
@@ -403,7 +407,7 @@ SetupEnemyDropIndicator:
.done
SEP #$20
RTS
RTL
; Runs during sprite load of the room
@@ -570,7 +574,7 @@ IncrementCountForMinor:
LDA.l SpriteDropData, X : BIT.b Scrap0A : BNE .obtained
ORA.b Scrap0A : STA.l SpriteDropData, X
SEP #$10
JSR SetupEnemyDropIndicator
JSL UpdateLootHUD
REP #$20
LDX.w DungeonID : CPX.b #$FF : BEQ +
CPX.b #$00 : BNE ++
@@ -626,10 +630,10 @@ MarkSRAMForItem:
TYX
LDA.w SpawnedItemFlag : CMP.w #$0001 : BEQ +
LDA.l SpriteDropData, X : ORA.b Scrap00 : STA.l SpriteDropData, X
SEP #$10 : JSR SetupEnemyDropIndicator
BRA .end
+ LDA.l RoomPotData, X : ORA.b Scrap00 : STA.l RoomPotData, X
.end
JSL UpdateLootHUD
SEP #$30 : PLY : PLX
LDA.w RoomItemsTaken
RTL

Binary file not shown.

BIN
menu/dr_sheet_14.3bpp Normal file

Binary file not shown.

BIN
menu/dr_sheet_14.3bppc Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -9,7 +9,7 @@ UploadMenuOnlyIcons:
REP #$20
LDA.w #MenuOnlyIcons : STA.w $4342
LDA.w #$1801 : STA.w $4340
LDA.w #$0240 : STA.w $4345
LDA.w #$0310 : STA.w $4345
LDA.w #$0F800>>1 : STA.w $2116
SEP #$20
@@ -20,4 +20,4 @@ UploadMenuOnlyIcons:
RTL
MenuOnlyIcons:
incbin "drfont.2bpp"
incbin "drfont.2bpp"

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:

View File

@@ -386,6 +386,7 @@ RTS
;================================================================================
DrawMapCounts:
LDA.l MapHUDMode : BEQ .done
LDA.l GenericKeys : BNE .done ; generator don't have an accurrate count of key doors in this case
; no map needed if this bit is set
BIT.b #$02 : BNE .draw_map_count

View File

@@ -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

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

View File

@@ -291,10 +291,10 @@ RTL
REP #$30
;-------------------------------------------------------------------------------
; dungeon names
LDA.w #$2D50
LDA.w #$2DA4
LDY.w #00
.next_dungeon_name
.next_dungeon_name
LDX.w .dungeon_positions,Y
STA.w GFXStripes+$0646,X
INC
@@ -310,10 +310,10 @@ RTL
STA.w GFXStripes+$0706,X
DEX : DEX
BPL --
BPL --
LDA.l HudFlag : AND.w #$0020 : BEQ +
JMP .maps_and_compasses
JMP .maps_and_compasses
;-------------------------------------------------------------------------------
+
LDA.l HUDDungeonItems : AND.w #$0001 : BNE +

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
@@ -235,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.
@@ -593,6 +597,8 @@ HUDMultiIndicator = $7EC790 ;
HUDKeysObtained = $7EC7A2 ;
HUDKeysSlash = $7EC7A4 ;
HUDKeysTotal = $7EC7A6 ;
HUDKeysExtraPlus = $7EC7E4 ;
HUDKeysExtraCount = $7EC7E6 ;
;
BigRAM = $7EC900 ; Big buffer of free ram (0x1F00)
ItemGFXStack = $7ECB00 ; Pointers to source of decompressed item tiles deferred to NMI loading.
@@ -777,6 +783,7 @@ endmacro
%assertRAM(LinkRecoilZ, $7E0029)
%assertRAM(LinkAnimationStep, $7E002E)
%assertRAM(LinkDirection, $7E002F)
%assertRAM(FlagBY, $7E003A)
%assertRAM(OAMOffsetY, $7E0044)
%assertRAM(OAMOffsetX, $7E0045)
%assertRAM(LinkIncapacitatedTimer, $7E0046)
@@ -874,6 +881,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)

View File

@@ -1532,7 +1532,7 @@ db $19,$1A,$1B,$1C,$1D,$1E,$1F,$20
db $21,$22,$11,$11,$10,$16,$16,$16
db $16,$16,$11,$16,$16,$16,$15,$15
db $15,$15,$15,$15,$15,$15,$15,$15
db $15,$15,$16,$02,$09,$00,$00,$00
db $15,$15,$2E,$02,$09,$00,$00,$00
MusicShuffleTable:
db $01,$02,$03,$04,$05,$06,$07,$08
@@ -2686,9 +2686,9 @@ org $B0EFFF ; PC 0x186FFF
BallNChainDungeon: ; Dungeon ID where ball n chain guard is located. Write
db $02 ; $FF to count ball and chain item for collection stats.
;--------------------------------------------------------------------------------
; 0x187000 - 18700F (unused)
;--------------------------------------------------------------------------------
org $B0F000
ExtraChestKeys: ; PC 0x187000-0x18700F
db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
org $B0F010
ChestKeys: ; PC 0x187010-0x18701F

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
@@ -221,6 +222,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
@@ -295,6 +298,7 @@ WorldMap_RedXChars = $8ABF70
WorldMap_CalculateOAMCoordinates = $8AC3B1
WorldMap_HandleSpriteBlink = $8AC52E
WorldMapIcon_AdjustCoordinate = $8AC59B
WorldMap_LightWorldTilemap = $8AC739
WorldMap_DarkWorldTilemap = $8AD739
DungeonMapRoomMarkerYBase = $8AE803
DungeonMapBossRooms = $8AE817