diff --git a/newitems.asm b/newitems.asm index c557d4d..cc6009f 100755 --- a/newitems.asm +++ b/newitems.asm @@ -118,8 +118,8 @@ ProcessEventItems: RTS ;-------------------------------------------------------------------------------- AddReceivedItemExpanded: - JSR.w ResolveReceipt - PHB : PHK + JSR.w ResolveReceipt + PHB : PHK JML AddReceivedItem+2 AddReceivedItemExpandedGetItem: @@ -662,22 +662,22 @@ ItemBehavior: .done RTS - .prog_weapon - LDA.l SpecialWeaponLevel : INC : STA.l SpecialWeaponLevel - LDA.l SpecialWeapons : CMP #$01 : BEQ ..bombs - CMP #$03 : BEQ ..byrna - CMP #$04 : BEQ ..somaria - CMP #$08 : BEQ ..bug_net - RTS - ..bombs - LDA #$01 : STA.l InfiniteBombs : RTS - INC.w UpdateHUD - ..byrna - LDA #$01 : STA.l ByrnaEquipment : RTS - ..somaria - LDA #$01 : STA.l SomariaEquipment : RTS - ..bug_net - LDA #$01 : STA.l BugNetEquipment : RTS + .prog_weapon + LDA.l SpecialWeaponLevel : INC : STA.l SpecialWeaponLevel + LDA.l SpecialWeapons : CMP #$01 : BEQ ..bombs + CMP #$03 : BEQ ..byrna + CMP #$04 : BEQ ..somaria + CMP #$08 : BEQ ..bug_net + RTS + ..bombs + LDA #$01 : STA.l InfiniteBombs : RTS + INC.w UpdateHUD + ..byrna + LDA #$01 : STA.l ByrnaEquipment : RTS + ..somaria + LDA #$01 : STA.l SomariaEquipment : RTS + ..bug_net + LDA #$01 : STA.l BugNetEquipment : RTS ResolveReceipt: PHA : PHX diff --git a/special_weapons.asm b/special_weapons.asm index 175a4f3..8e2545e 100644 --- a/special_weapons.asm +++ b/special_weapons.asm @@ -595,14 +595,15 @@ RTS ;-------------------------------------------------------------------------------- CheckBugNet: LDA.w $037A : AND.b #$10 : BEQ .done ; normal behavior if not bugnet +PHP ; we want to preserve the carry bit LDA.l SpecialWeapons : CMP.b #$08 : BNE .return_10 ; normal behavior if not bugnet mode .bugnet_mode LDA.w $0E20, X : CMP.b #$E3 : BEQ .return_10 ; normal behavior if fairy CMP.b #$79 : BEQ .return_10 ; normal behavior if bee CMP.b #$B2 : BEQ .return_10 ; normal behavior if bee -LDA.b #$00 : BRA .done +PLP : LDA.b #$00 : RTL .return_10 -LDA.b #$10 +PLP : LDA.b #$10 .done RTL ;--------------------------------------------------------------------------------