diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 8e7194e..9f992e2 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -35,14 +35,15 @@ db #$00 ; expand file to 2mb !NPC_FLAGS = "$7EF410" !NPC_FLAGS_2 = "$7EF411" !INVENTORY_SWAP = "$7EF412" -!HUD_FLAG = "$7EF416" ; --h- ---- -!PROGRESSIVE_SHIELD = "$7EF416" ; ss-- ---- !INVENTORY_SWAP_2 = "$7EF414" !MAP_ZOOM = "$7EF415" +!PROGRESSIVE_SHIELD = "$7EF416" ; ss-- ---- +!HUD_FLAG = "$7EF416" ; --h- ---- +!SHAME_CHEST = "$7EF416" ; ---s ---- !HAS_GROVE_ITEM = "$7EF416" ; ---- ---g general flags, don't waste these !HIGHEST_SWORD_LEVEL = "$7EF417" ; --- -sss -!FRESH_FILE_MARKER = "$7EF4F0" ; zero if fresh file !SRAM_SINK = "$7EF41E" ; <- change this +!FRESH_FILE_MARKER = "$7EF4F0" ; zero if fresh file ;$7EF41A[w] - Programmable Item #1 ;$7EF41C[w] - Programmable Item #3 ;$7EF41E[w] - Programmable Item #3 @@ -401,6 +402,9 @@ DrawProgressIcons: ; this returns short org $0DED29 DrawEquipment: ; this returns short +org $0DFA78 +HUD_RebuildLong: + org $0EEE10 Messaging_Text: diff --git a/hooks.asm b/hooks.asm index e1e2ea0..d2d630f 100644 --- a/hooks.asm +++ b/hooks.asm @@ -369,8 +369,8 @@ LDA.w BottleListExpanded, X org $09895C ; 4895C - ancilla_init.asm:1344 (LDA PotionList, X) LDA.w PotionListExpanded, X ;-------------------------------------------------------------------------------- -;org $06D1EB ; 351EB - sprite_absorbable.asm:364 (STA $7EF375) ; bugbug commented out until i figure out why it doesn't work -;JSL HandleBombAbsorbtion +org $06D1EB ; 351EB - sprite_absorbable.asm:364 (STA $7EF375) ; bugbug commented out until i figure out why it doesn't work +JSL HandleBombAbsorbtion ;-------------------------------------------------------------------------------- ;================================================================================ @@ -773,7 +773,7 @@ org $1ED577 ; <- F5577 - sprite_agahnim.asm:418 (PHX) JML.l GetAgahnimPalette GetAgahnimPaletteReturn: ;-------------------------------------------------------------------------------- -org $1ED577 ; <- F5577 - sprite_agahnim.asm:587 (INC $0E30, X) +org $1ED678 ; <- F5678 - sprite_agahnim.asm:587 (INC $0E30, X) NOP #2 JSL.l GetAgahnimLightning ;-------------------------------------------------------------------------------- diff --git a/inventory.asm b/inventory.asm index 902bf49..3162fe9 100644 --- a/inventory.asm +++ b/inventory.asm @@ -176,6 +176,7 @@ FullInventoryExternal: LDA !LOCK_STATS : BEQ + : RTL : + PHA : PHX : PHP : JMP AddInventory_fullItemCounts ;-------------------------------------------------------------------------------- +!SHAME_CHEST = "$7EF416" ; ---s ---- AddInventory: PHA : PHX : PHP @@ -258,6 +259,15 @@ AddInventory: .dungeonCounts LDA $1B : BNE + : BRL .fullItemCounts : + + ; ==BEGIN INDOOR-ONLY SECTION + + REP #$20 ; Set 16-bit Accumulator + LDA $A0 ; load room ID + CMP.w #$0010 : BNE + ; Ganon Fall Room + ;!SHAME_CHEST = "$7EF416" ; ---s ---- + LDA !SHAME_CHEST : ORA.w #$0010 : STA !SHAME_CHEST + + + SEP #$20 ; Set 8-bit Accumulator LDA $040C ; get dungeon id @@ -315,6 +325,7 @@ AddInventory: ;BRL .fullItemCounts + + ; == END INDOOR-ONLY SECTION .fullItemCounts CPY.b #$3B : BNE + ; Skip Total Counts for Repeat Silver Arrows @@ -459,13 +470,41 @@ AddInventory: + CPY.b #$50 : BNE + ; Master Sword (Safe) JSR .incrementSword BRL .done - + CPY.b #$51 : !BLT + ; Items 4D - 4F - Capacity Upgrades + + CPY.b #$51 : !BLT + ; Items 51 - 54 - Capacity Upgrades CPY.b #$55 : !BGE + JSR .incrementCapacity BRL .done + CPY.b #$58 : BNE + ; Upgrade-Only Sivler Arrows JSR .incrementBow BRL .done + + CPY.b #$5E : BNE + ; Progressive Sword + JSR .incrementSword + BRL .done + + CPY.b #$5F : BNE + ; Progressive Shield + JSR .incrementShield + BRL .done + + CPY.b #$60 : BNE + ; Progressive Armor + JSR .incrementMail + BRL .done + + CPY.b #$61 : BNE + ; Progressive Lifting Glove + JSR .incrementA + BRL .done + + CPY.b #$70 : !BLT + ; Items 70 - 7F - Free Maps + CPY.b #$80 : !BGE + + JSR .incrementMap + BRL .done + + CPY.b #$80 : !BLT + ; Items 80 - 8F - Free Compasses + CPY.b #$90 : !BGE + + JSR .incrementCompass + BRL .done + + CPY.b #$90 : !BLT + ; Items 90 - 9F - Free Big Keys + CPY.b #$A0 : !BGE + + JSR .incrementBigKey + BRL .done + + CPY.b #$A0 : !BLT + ; Items A0 - AF - Free Small Keys + CPY.b #$B0 : !BGE + + JSR .incrementKey + BRL .done + .done PLP : PLX : PLA @@ -620,20 +659,14 @@ RTL ;-------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------- -; HandleBombAbsorbtion: ; NOTE CAREFULLY HOW THESE TWO FUNCTIONS ARE PARTIALLY COMMENTED OUT +; HandleBombAbsorbtion: ;-------------------------------------------------------------------------------- HandleBombAbsorbtion: STA $7EF375 ; thing we wrote over -;RTL ; don't return, fall throgh to next function -;-------------------------------------------------------------------------------- - -;-------------------------------------------------------------------------------- -; Link_ReceiveItem_PreselectItems: -;-------------------------------------------------------------------------------- -;Link_ReceiveItem_PreselectItems: - LDA $0202 : BNE + ; skip if we already have some item selected -; LDA $7EF343 : BEQ + ; skip if we have no bombs + LDA $0303 : BNE + ; skip if we already have some item selected LDA.b #$04 : STA $0202 ; set selected item to bombs + LDA.b #$01 : STA $0303 ; set selected item to bombs + JSL.l HUD_RebuildLong + RTL ;--------------------------------------------------------------------------------