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/bugfixes.asm b/bugfixes.asm index 85f3cbc..e56cfd1 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 ;-------------------------------------------------------------------------------- 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 73cf87f..2f0a4dc 100644 --- a/doorrando/hudadditions.asm +++ b/doorrando/hudadditions.asm @@ -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: @@ -292,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 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 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 0000000..fb049a0 Binary files /dev/null and b/menu/dr_dungeon_indicators.2bpp differ diff --git a/menu/dr_sheet_dc.2bpp b/menu/dr_sheet_dc.2bpp index 3f3e2c3..7625a5a 100644 Binary files a/menu/dr_sheet_dc.2bpp and b/menu/dr_sheet_dc.2bpp differ diff --git a/menu/dr_sheet_dc.2bppc b/menu/dr_sheet_dc.2bppc index 05907aa..5c63f55 100644 Binary files a/menu/dr_sheet_dc.2bppc and b/menu/dr_sheet_dc.2bppc differ diff --git a/menu/drfont.2bpp b/menu/drfont.2bpp index 4e8e30e..b4782ed 100644 Binary files a/menu/drfont.2bpp and b/menu/drfont.2bpp differ 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/newhud.asm b/newhud.asm index 0db99c9..c72e0e5 100644 --- a/newhud.asm +++ b/newhud.asm @@ -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 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 + 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 4692f71..12de6d4 100644 --- a/tables.asm +++ b/tables.asm @@ -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