From c5aaa07f3e0d26cdca73a057a7fdd64368055972 Mon Sep 17 00:00:00 2001 From: aerinon Date: Thu, 15 Jan 2026 15:47:23 -0700 Subject: [PATCH 1/8] feat: king tomb bonk fix --- boots.asm | 26 +++++++++++++------------- hooks.asm | 8 +++++++- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/boots.asm b/boots.asm index 4e8c771..26fcfad 100644 --- a/boots.asm +++ b/boots.asm @@ -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 ; JML moveGravestone .done JML GravestoneHook_continue diff --git a/hooks.asm b/hooks.asm index 5e5c224..806b773 100644 --- a/hooks.asm +++ b/hooks.asm @@ -117,7 +117,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 ;-------------------------------------------------------------------------------- ;================================================================================ @@ -136,6 +136,12 @@ GravestoneHook_continue: org $87C106 moveGravestone: ;-------------------------------------------------------------------------------- +org $899A30 +JSL ValidDashCheck : NOP #2 +org $899A3A +JSL ValidDashCheck : NOP #2 +;-------------------------------------------------------------------------------- + ;================================================================================ ; Jump Down Ledge From cc635ddb782c7445425181cf6a04e82321e0252c Mon Sep 17 00:00:00 2001 From: aerinon Date: Fri, 16 Jan 2026 15:29:26 -0700 Subject: [PATCH 2/8] fix: consistency for dungeon counter settings --- doorrando/hudadditions.asm | 2 -- newitems.asm | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/doorrando/hudadditions.asm b/doorrando/hudadditions.asm index d4cd84f..e0007e3 100644 --- a/doorrando/hudadditions.asm +++ b/doorrando/hudadditions.asm @@ -147,9 +147,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 plx : sep #$30 : lda.l ChestKeys, x : sta.b Scrap02 lda.l GenericKeys : bne +++ lda.b Scrap02 : !SUB.l DungeonCollectedKeys, x : sta.b Scrap02 diff --git a/newitems.asm b/newitems.asm index ed261ee..54551ad 100644 --- a/newitems.asm +++ b/newitems.asm @@ -1136,7 +1136,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 @@ -1158,7 +1158,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 : BEQ .done + LDA.l MapHUDMode : AND.w #$000F : BEQ .done LDX.w DungeonID JSR FlagMapCount .done From d0f46511300be05076b7403d71656f3955f3f8fc Mon Sep 17 00:00:00 2001 From: aerinon Date: Wed, 11 Feb 2026 10:49:57 -0700 Subject: [PATCH 3/8] fix: skip key counter with universal keys --- newhud.asm | 1 + 1 file changed, 1 insertion(+) diff --git a/newhud.asm b/newhud.asm index ec266c5..9705196 100644 --- a/newhud.asm +++ b/newhud.asm @@ -357,6 +357,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 From 6fb81c0aa8e54cedd7707e8b17c0150821a22c3e Mon Sep 17 00:00:00 2001 From: codemann8 Date: Sun, 15 Mar 2026 10:55:57 -0500 Subject: [PATCH 4/8] Fix buffer sword slash when dashing into water --- bugfixes.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bugfixes.asm b/bugfixes.asm index cdc74c8..f19482d 100644 --- a/bugfixes.asm +++ b/bugfixes.asm @@ -246,7 +246,7 @@ FixSwimBump: .normal LDA.b LinkJumping : BNE .continue ; what we wrote over .not_diving - PLA : PLA : PEA.w $87964E ; skip ahead, not diving + PLA : PLA : PEA.w $87964D ; skip ahead, not diving .continue RTL ;-------------------------------------------------------------------------------- From 37caff7bcf146df2229b9f88a789bde9ca38c7a1 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Sun, 15 Mar 2026 14:19:12 -0500 Subject: [PATCH 5/8] Fixed bug with MSU-1 GT2 track not falling back to GT track --- tables.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tables.asm b/tables.asm index e7eddef..655ba5d 100644 --- a/tables.asm +++ b/tables.asm @@ -1484,7 +1484,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 From 9174bbfba54f94ff51c149ba5d3f9e754dbf61a1 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Sun, 15 Mar 2026 16:59:19 -0500 Subject: [PATCH 6/8] Fix for Kiki unfollowing after certain entrance transition conditions --- follower.asm | 1 + 1 file changed, 1 insertion(+) diff --git a/follower.asm b/follower.asm index b33ada0..ef00935 100644 --- a/follower.asm +++ b/follower.asm @@ -857,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 From b58641ad90b4239775b2653a3e7892e25a657f80 Mon Sep 17 00:00:00 2001 From: Kara Alexandra Date: Sun, 3 May 2026 17:06:30 -0500 Subject: [PATCH 7/8] extra keys display --- doorrando/hudadditions.asm | 46 ++++++++++++++++++++++++++++---------- ram.asm | 2 ++ tables.asm | 6 ++--- 3 files changed, 39 insertions(+), 15 deletions(-) diff --git a/doorrando/hudadditions.asm b/doorrando/hudadditions.asm index 73cf87f..7eb29b5 100644 --- a/doorrando/hudadditions.asm +++ b/doorrando/hudadditions.asm @@ -1,5 +1,6 @@ !BlankTile = $207F !SlashTile = $2830 +!PlusTile = $2404 !HyphenTile = $2405 !LTile = $2D68 !DTile = $2D60 @@ -77,7 +78,7 @@ DRHUD_DrawCurrentDungeonIndicator: ; mX 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 +91,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: @@ -292,17 +302,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 diff --git a/ram.asm b/ram.asm index 1e8b7ae..1e89b51 100644 --- a/ram.asm +++ b/ram.asm @@ -597,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. diff --git a/tables.asm b/tables.asm index 3cf1dd1..12de6d4 100644 --- a/tables.asm +++ b/tables.asm @@ -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 From 80c0f47b1cd00830afb868b872fb39576fa50493 Mon Sep 17 00:00:00 2001 From: Kara Alexandra Date: Mon, 4 May 2026 00:14:09 -0500 Subject: [PATCH 8/8] Show level of current loot in HUD --- LTTP_RND_GeneralBugfixes.asm | 1 + doorrando/doortables.asm | 4 +- doorrando/hudadditions.asm | 7 +- gk/check_loot.asm | 35 ++-- gk/data/split_room.asm | 342 +++++++++++++++++++++++++++++++- gk/doors_dungeon_map.asm | 8 + gk/dungeon_indicator.asm | 50 +++++ gk/dungeon_maps.asm | 1 + gk/loot_hud.asm | 45 +++++ gk/settings.asm | 23 +++ hooks.asm | 7 + inventory.asm | 1 + keydrop/standing_items.asm | 13 +- menu/dr_dungeon_indicators.2bpp | Bin 0 -> 224 bytes menu/dr_sheet_dc.2bpp | Bin 2048 -> 2048 bytes menu/dr_sheet_dc.2bppc | Bin 1461 -> 1503 bytes menu/drfont.2bpp | Bin 768 -> 1024 bytes menu/hudalpha.asm | 4 +- pendantcrystalhud.asm | 8 +- 19 files changed, 516 insertions(+), 33 deletions(-) create mode 100644 gk/dungeon_indicator.asm create mode 100644 gk/loot_hud.asm create mode 100644 menu/dr_dungeon_indicators.2bpp diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 46c6b36..5d20f34 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -213,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 diff --git a/doorrando/doortables.asm b/doorrando/doortables.asm index 63005e9..6144190 100644 --- a/doorrando/doortables.asm +++ b/doorrando/doortables.asm @@ -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 \ No newline at end of file +dw $0000 diff --git a/doorrando/hudadditions.asm b/doorrando/hudadditions.asm index 7eb29b5..2f0a4dc 100644 --- a/doorrando/hudadditions.asm +++ b/doorrando/hudadditions.asm @@ -4,8 +4,8 @@ !HyphenTile = $2405 !LTile = $2D68 !DTile = $2D60 -!RedSquare = $345E !BlueSquare = $2C5E +!BossIcon = $253C DrHudOverride: PHB @@ -47,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 @@ -72,8 +72,7 @@ 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 diff --git a/gk/check_loot.asm b/gk/check_loot.asm index 54f8d19..b4b611b 100644 --- a/gk/check_loot.asm +++ b/gk/check_loot.asm @@ -17,7 +17,7 @@ CheckLoot: STA.b $0E LDA.b $CA - AND.w #$00FF + AND.w #$01FF ASL A TAX @@ -31,6 +31,9 @@ CheckLoot: STA.b $0E + LDA.w DungeonID + CMP.w #$0010 + BCS .skip_dungeon_checks + TAX LDA.l MapField @@ -52,6 +55,8 @@ CheckLoot: STA.b $0E + +.skip_dungeon_checks + LDA.l ItemSources : BIT.w #$0001 : BEQ + JSR CheckChests + @@ -82,7 +87,7 @@ CheckLoot: CheckChests: LDA.b $CA - AND.w #$00FF + AND.w #$01FF STA.b $00 ASL A TAX @@ -141,7 +146,7 @@ CheckBoss: + LDA.b $CA - AND.w #$00FF + AND.w #$01FF STA.b $04 LDX.w #$FFFA @@ -196,7 +201,7 @@ CheckBoss: CheckPrize: LDA.b $CA - AND.w #$00FF + AND.w #$01FF STA.b $04 LDX.w #$FFFD @@ -232,7 +237,7 @@ CheckPrize: CheckPots: LDA.b $CA - AND.w #$00FF + AND.w #$01FF ASL A TAX @@ -298,7 +303,7 @@ CheckPots: + LDA.b $CA - AND.w #$00FF + AND.w #$01FF ASL A TAX if !FEATURE_FIX_BASEROM @@ -336,7 +341,7 @@ CheckJunkPot: + LDA.b $CA - AND.w #$00FF + AND.w #$01FF ASL A TAX LDA.l PotCollectionRateTable, X @@ -364,7 +369,7 @@ endif CheckEnemies: LDA.b $CA - AND.w #$00FF + AND.w #$01FF ASL A TAX @@ -454,7 +459,7 @@ CheckEnemies: + LDA.b $CA - AND.w #$00FF + AND.w #$01FF ASL A TAX @@ -532,7 +537,7 @@ macro DefineGetFooSection(type, offset) GetSection: PHX LDA.b $CA - AND.w #$00FF + AND.w #$01FF ASL A TAX LDA.l SplitRooms, X @@ -580,13 +585,13 @@ CheckSection: STA.b $CC LDA.b $CB - AND.w #$00FF + AND.w #$00F0 BEQ .yes JSR GetSection LDA.b $CB - AND.w #$00FF + AND.w #$00F0 LSR A : LSR A : LSR A : LSR A DEC A CMP.b $CE @@ -623,21 +628,21 @@ GetIncomingStairSection: STA.b $CC LDA.b $CA - AND.w #$00FF + AND.w #$01FF ASL A TAX LDA.l SplitRooms, X TAX LDA.l SplitRooms, X - AND.w #$00FF + AND.w #$01FF STA.b $CE BEQ .found INX .check_next_section LDA.l SplitRooms+0, X - AND.w #$00FF + AND.w #$01FF AND.b $CC BNE .found TXA : CLC : ADC.w #$000D : TAX diff --git a/gk/data/split_room.asm b/gk/data/split_room.asm index 06f5f7b..47a12ac 100644 --- a/gk/data/split_room.asm +++ b/gk/data/split_room.asm @@ -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 @@ -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 diff --git a/gk/doors_dungeon_map.asm b/gk/doors_dungeon_map.asm index aa701b6..b0d501a 100644 --- a/gk/doors_dungeon_map.asm +++ b/gk/doors_dungeon_map.asm @@ -172,6 +172,7 @@ DrawSingleRoomLoot: STA.w GFXStripes+$0C, Y LDA.b $CA + AND.w #$F0FF JSL CheckLoot ASL A : ASL A : ASL A @@ -2105,6 +2106,13 @@ DrawDoorsStairs: DetectLinksSection: LDA.b RoomIndex + CMP.w #$0128 + BCC + + + LDA.w #$0000 + RTL ++ + ASL A TAX LDA.l SplitRooms, X diff --git a/gk/dungeon_indicator.asm b/gk/dungeon_indicator.asm new file mode 100644 index 0000000..f2721e1 --- /dev/null +++ b/gk/dungeon_indicator.asm @@ -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 + diff --git a/gk/dungeon_maps.asm b/gk/dungeon_maps.asm index 1dba340..54731ac 100644 --- a/gk/dungeon_maps.asm +++ b/gk/dungeon_maps.asm @@ -34,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 diff --git a/gk/loot_hud.asm b/gk/loot_hud.asm new file mode 100644 index 0000000..f5a8cd1 --- /dev/null +++ b/gk/loot_hud.asm @@ -0,0 +1,45 @@ +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 + + JSL DetectLinksSection + INC A + XBA + ASL A : ASL A : ASL A : ASL A + ORA.b RoomIndex + JSL CheckLoot + + ASL A : TAX + LDA.l HUDLootTypeIcons, X + STA.w EnemyDropIndicator + + REP #$30 + 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 diff --git a/gk/settings.asm b/gk/settings.asm index c2eb610..27b8284 100644 --- a/gk/settings.asm +++ b/gk/settings.asm @@ -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 @@ -206,3 +225,7 @@ ItemSources: ; $B9FF11 AlwaysShowCompass: db $01 + +; $B9FF12 +ShowLootInHUD: + db $01 diff --git a/hooks.asm b/hooks.asm index 82ab111..0456f84 100755 --- a/hooks.asm +++ b/hooks.asm @@ -2758,6 +2758,13 @@ JSL MimicDirection org $828068 JSL AdjustDefaultGraphics +;================================================================================ +;-------------------------------------------------------------------------------- +; Dungeon Indicator VRAM overwrite +;-------------------------------------------------------------------------------- +org $828190 +JSL LoadDungeonIndicator + ;================================================================================ ; Special Weapons Modes ;-------------------------------------------------------------------------------- diff --git a/inventory.asm b/inventory.asm index fcbed68..cf26238 100644 --- a/inventory.asm +++ b/inventory.asm @@ -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 + diff --git a/keydrop/standing_items.asm b/keydrop/standing_items.asm index f06ac28..f0ae86e 100644 --- a/keydrop/standing_items.asm +++ b/keydrop/standing_items.asm @@ -221,7 +221,8 @@ RevealPotItem: STZ.w SpawnedItemIsMultiWorld BIT.b Scrap08 BVS LoadMultiWorldPotItem - BMI LoadMajorPotItem + BPL .normal_secret + JMP LoadMajorPotItem .normal_secret STA.b Scrap08 @@ -242,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 @@ -341,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 @@ -357,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 @@ -404,7 +407,7 @@ SetupEnemyDropIndicator: .done SEP #$20 -RTS +RTL ; Runs during sprite load of the room @@ -571,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 ++ @@ -627,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 diff --git a/menu/dr_dungeon_indicators.2bpp b/menu/dr_dungeon_indicators.2bpp new file mode 100644 index 0000000000000000000000000000000000000000..fb049a03089d690c559580d6f34bb9aeccde4520 GIT binary patch literal 224 zcmZQz2>c%YU*t~+5JvuAwv2&6=wIr4)%Q;4T+WF6dGUgQLFrxS|Iq(I|3dz#yg6}# zfkE{D()Wt_s$l5l#lWDLAN4Qjo6xr)AY8Hpre5{E>v^YhJv~74>Qdh?eIHaOVguD* z58?;b3)-u`KXrmx=;8vhf9ZSGe5E{<9Ekm){{?{%OV literal 0 HcmV?d00001 diff --git a/menu/dr_sheet_dc.2bpp b/menu/dr_sheet_dc.2bpp index 3f3e2c3f8a89fc48e92640534ba70da429384be3..7625a5a0c757c0eed2f4097f55ecc347e256c1f5 100644 GIT binary patch delta 244 zcmX|*F$%&!5Jg9$U^zt!OUo^{oCE9ygp}e5Qdw>B!LUd07^#GGLBz^BC$JDt-~k3_ zO~@=Pyg$RtYq;U-qhOJMq^{3com$m5{Iy(>4S3qyz`!F<~ol;t&v2^8{cE zV2n&6|4y$-)11_n)gog*;9^&wJwi@IY8+3m@BMxI#C^1p4V6^-RisGXkh2gSc8(o$ a-axA6-P)hBz${dunuG|`BkG2=U;Y4$flCDd delta 244 zcmZn=Xb{+NfLY*Q{onn+?|*;){`>vk`~TMe+kAo9fU*An|H%L0|HXkg9LNFz;s2%o zP5&4FF9(W(fbsuOAPfe|n}hkH|F{0%2*e-=0vrEF1EDmS1o0v2O@XEqgSh`E16f=D zU;cj`s(&h&fARlCpe_FcfeHlw?}kH=24S$#oBwZzIv^CNLJ;hTP>?iS9_E0F|Eqxz OXaB}J7)Zsv(H<7xU7ZAZE zDipybmUPqI!Lbd}xdE3BZ4Y+(mk<8;@}xZY5Pt4Ym)u>A7L$2V%qNS{s>@Pp>T$v; zYYIrp_*;y-n_tJpZV?w3RVYc2t^^nMd~i}=pc-j#%{EqDC2NYb#asoCAn-_Nq7V>d zc!-cH?)6X5X_Kb5l+h_}X}VvJK2y@Bg*#HV>GEd$m;DZ>osI`kQc$rPwrX|&8fG6g zNUL?AYA(1wc&ri@%so@bzK0^9;I@wEK&FY&TYP38HO(_R8HdZ^GBYn2CKy#5^^jY6 e9t~`f@uRuM4JMlDS#tM-YaTz@uVS45ul@l9{dEff delta 251 zcmVxH%|8@U0|8xI${}+WD0Yv{*1XKT4|2HK61Qq|a|FK5@wIlxk zu|)q{02@UATZtY80yY12gqs5j|NoQ!b^o>h)Bo3oD+K_RgkuFm(fw;rO8>is z4h2KC{{plBw}u-9096=7{}Dx1|BH?VhdKoSkwpJ{LtFma_hY|)upx^=E;DxXR1HS&E{)PGl0PaNYs)^PGgAfLj&jhUk5C)Te1!0Q()>|{r#{gVTj3<1a-sp0?t delta 11 ScmZqRXkgpmz%*Hq`2YYEDg$T$ diff --git a/menu/hudalpha.asm b/menu/hudalpha.asm index 22fcfc8..280d31b 100644 --- a/menu/hudalpha.asm +++ b/menu/hudalpha.asm @@ -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" \ No newline at end of file +incbin "drfont.2bpp" diff --git a/pendantcrystalhud.asm b/pendantcrystalhud.asm index 2b1cb66..3046606 100644 --- a/pendantcrystalhud.asm +++ b/pendantcrystalhud.asm @@ -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 +