Remove non-progressive bomb/cane upgrades

This commit is contained in:
2022-09-18 15:02:37 -07:00
parent f7070dd30f
commit bfc361ad3e
6 changed files with 140 additions and 180 deletions

View File

@@ -29,9 +29,6 @@ ItemDowngradeFixMain:
CPY.b #$13 : BEQ .isShovel ; Shovel
CPY.b #$29 : BEQ .isMushroom ; Mushroom
CPY.b #$B1 : !BLT + : CPY.b #$B6 : !BLT .isBombUpgrade : +
CPY.b #$B7 : !BLT + : CPY.b #$BC : !BLT .isCaneUpgrade : +
CPY.b #$00 : BEQ .isUncleSwordShield ; Fighter's Sword & Shield
.done
@@ -63,7 +60,7 @@ RTS
RTS
.isSword
PHA
LDA HighestSword : STA $04
LDA HighestSword : STA $04
TYA ; load sword item
CMP.b #$49 : BNE + : LDA.b #$00 : + ; convert extra fighter's sword to normal one
CMP.b #$50 : BNE + : LDA.b #$01 : + ; convert extra master sword to normal one
@@ -73,28 +70,6 @@ RTS
JMP .done
+
PLA
JMP .done
.isBombUpgrade
PHA
TYA ; load bomb upgrade item
!SUB #$B0 ; convert to bomb level
CMP.l SpecialWeaponLevel : !BGE + ; skip if highest is lower (this is an upgrade)
LDA.l SpecialWeaponLevel : !ADD #$B0 ; convert to item id
TAY : PLA : LDA.l SpecialWeaponLevel ; put bomb level into the thing to write
JMP .done
+
PLA
JMP .done
.isCaneUpgrade
PHA
TYA ; load cane upgrade item
!SUB #$B6 ; convert to cane level
CMP.l SpecialWeaponLevel : !BGE + ; skip if highest is lower (this is an upgrade)
LDA.l SpecialWeaponLevel : !ADD #$B6 ; convert to item id
TAY : PLA : LDA.l SpecialWeaponLevel ; put cane level into the thing to write
JMP .done
+
PLA
JMP .done
.isUncleSwordShield
PHA