diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 8df6e40..6e6ac22 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -36,8 +36,9 @@ db #$20, #$19, #$08, #$31 ; year/month/day ; Rando Specific SRAM assignments !SHOP_PURCHASE_COUNTS = "$7EF302" ;$7EF302 - $7EF33F (temporary home) -!INVENTORY_SWAP = "$7EF38C" ; [w] -!INVENTORY_SWAP_2 = "$7EF38E" ; [w] +!INVENTORY_SWAP = "$7EF38C" +!INVENTORY_SWAP_2 = "$7EF38E" +!BOMB_LEVEL = "$7EF38F" !ITEM_LIMIT_COUNTS = "$7EF390" ; $7EF390 - ???? !NPC_FLAGS = "$7EF410" !NPC_FLAGS_2 = "$7EF411" @@ -58,7 +59,6 @@ db #$20, #$19, #$08, #$31 ; year/month/day ;$7EF420 - $7EF46D - Stat Tracking Bank 1 (overlaps with RNG Item Flags) ;$7EF450 - $7EF45F - RNG Item (Single) Flags ;$7EF4A0 - $7EF4A7 - Service Request Block -!PROGRESSIVE_BOMBS = "$7EF4A8" !FRESH_FILE_MARKER = "$7EF4F0" ; zero if fresh file ;$700500 - $70050F - Extended File Name ;$701000 - $70100F - Password (incorporate into log header) diff --git a/darkworldspawn.asm b/darkworldspawn.asm index a10f298..9e4c774 100644 --- a/darkworldspawn.asm +++ b/darkworldspawn.asm @@ -147,7 +147,7 @@ SetEscapeAssist: ++ LDA.l SpecialBombs : BEQ + - LDA.l $7EF4A8 : BEQ + + LDA.l !BOMB_LEVEL : BEQ + LDA #$01 : STA !INFINITE_BOMBS + RTL diff --git a/inventory.asm b/inventory.asm index 98b8ae3..8e9264a 100644 --- a/inventory.asm +++ b/inventory.asm @@ -727,7 +727,7 @@ RTL .incrementBossSword LDA SpecialBombs : BEQ + - LDA $7EF4A8 : BRA ++ + LDA !BOMB_LEVEL : BRA ++ + : LDA $7EF359 ++ BNE + : - diff --git a/itemdowngrade.asm b/itemdowngrade.asm index b0253ca..f4e4aac 100644 --- a/itemdowngrade.asm +++ b/itemdowngrade.asm @@ -76,9 +76,9 @@ JMP .done PHA TYA ; load bomb upgrade item !SUB #$B0 ; convert to bomb level - CMP.l $7EF4A8 : !BGE + ; skip if highest is lower (this is an upgrade) - LDA.l $7EF4A8 : !ADD #$B0 ; convert to item id - TAY : PLA : LDA.l $7EF4A8 ; put bomb level into the thing to write + CMP.l !BOMB_LEVEL : !BGE + ; skip if highest is lower (this is an upgrade) + LDA.l !BOMB_LEVEL : !ADD #$B0 ; convert to item id + TAY : PLA : LDA.l !BOMB_LEVEL ; put bomb level into the thing to write JMP .done + PLA diff --git a/newitems.asm b/newitems.asm index 32a27a6..249f77c 100755 --- a/newitems.asm +++ b/newitems.asm @@ -533,7 +533,7 @@ AddReceivedItemExpanded: LDA #$FF : STA !LOCK_IN ; clear lock-in BRA .done ++ : CMP.b #$B6 : BNE ++ ; Progressive Bombs - LDA $7EF4A8 + LDA !BOMB_LEVEL CMP.b #$00 : BNE + ; have no Bombs LDA.b #$B1 : STA $02D8 : JMP .done + : CMP.b #$01 : BNE + ; have L-1 Bombs @@ -807,7 +807,7 @@ org $A08800 dw $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A ; Free Big Key dw $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A ; Free Small Key dw $F36A ; reserved for bee traps - dw $F4A8, $F4A8, $F4A8, $F4A8, $F4A8, $F4A8 ; Bomb Upgrades + dw $F38F, $F38F, $F38F, $F38F, $F38F, $F38F ; Bomb Upgrades dw $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A ; Unused dw $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A ; Unused dw $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A, $F36A ; Unused diff --git a/special_bombs.asm b/special_bombs.asm index 544bc78..556b817 100644 --- a/special_bombs.asm +++ b/special_bombs.asm @@ -1,6 +1,5 @@ ;-------------------------------------------------------------------------------- !ANCILLA_DAMAGE = "$06EC84" -!BOMB_LEVEL = "$7EF4A8" ; start with X = sprite index, A = ancilla type index ;-------------------------------------------------------------------------------- DamageClassCalc: @@ -262,7 +261,7 @@ DrawSwordInMenu: LDA.w #$F859 : STA $04 RTL .bombSword - LDA $7EF4A8 : AND.w #$00FF : STA $02 + LDA !BOMB_LEVEL : AND.w #$00FF : STA $02 LDA.w #$FC51 : STA $04 RTL ;-------------------------------------------------------------------------------- diff --git a/swordswap.asm b/swordswap.asm index 75593c6..323c8ff 100644 --- a/swordswap.asm +++ b/swordswap.asm @@ -135,7 +135,7 @@ CheckTabletSword: LDA.b #$02 : RTL + LDA.l SpecialBombs : BEQ + - LDA $7EF4A8 : CMP #$02 : !BLT + ; check for master bombs + LDA !BOMB_LEVEL : CMP #$02 : !BLT + ; check for master bombs LDA.b #$02 : RTL + LDA $7EF359 ; get actual sword value diff --git a/tables.asm b/tables.asm index 39a9149..c81b5f6 100644 --- a/tables.asm +++ b/tables.asm @@ -1632,7 +1632,7 @@ dw $0000, $0000, $0000, $0000, $F800, $0000, $0000, $0000 dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 dw $0000, $0000 ;-------------------------------------------------------------------------------- -; 0x182355 - 183FFF (unused) +; 0x183055 - 183FFF (unused) ;================================================================================ org $30C000 ; PC 0x184000 - 0x184007 ItemSubstitutionRules: diff --git a/zelda.asm b/zelda.asm index 33a7733..e83064f 100644 --- a/zelda.asm +++ b/zelda.asm @@ -21,7 +21,7 @@ EndRainState: CMP #$10 : BNE + : STA !INFINITE_ARROWS : + LDA.l SpecialBombs : BEQ + - LDA.l $7EF4A8 : BEQ + + LDA.l !BOMB_LEVEL : BEQ + LDA #$01 : STA !INFINITE_BOMBS + LDA.b #$02 : STA $7EF3C5 ; end rain state