Fix bugnet on aga not reflecting balls

This commit is contained in:
2023-09-03 23:27:06 -05:00
parent ae8020642b
commit 52c3033282
2 changed files with 21 additions and 20 deletions

View File

@@ -118,8 +118,8 @@ ProcessEventItems:
RTS RTS
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
AddReceivedItemExpanded: AddReceivedItemExpanded:
JSR.w ResolveReceipt JSR.w ResolveReceipt
PHB : PHK PHB : PHK
JML AddReceivedItem+2 JML AddReceivedItem+2
AddReceivedItemExpandedGetItem: AddReceivedItemExpandedGetItem:
@@ -662,22 +662,22 @@ ItemBehavior:
.done .done
RTS RTS
.prog_weapon .prog_weapon
LDA.l SpecialWeaponLevel : INC : STA.l SpecialWeaponLevel LDA.l SpecialWeaponLevel : INC : STA.l SpecialWeaponLevel
LDA.l SpecialWeapons : CMP #$01 : BEQ ..bombs LDA.l SpecialWeapons : CMP #$01 : BEQ ..bombs
CMP #$03 : BEQ ..byrna CMP #$03 : BEQ ..byrna
CMP #$04 : BEQ ..somaria CMP #$04 : BEQ ..somaria
CMP #$08 : BEQ ..bug_net CMP #$08 : BEQ ..bug_net
RTS RTS
..bombs ..bombs
LDA #$01 : STA.l InfiniteBombs : RTS LDA #$01 : STA.l InfiniteBombs : RTS
INC.w UpdateHUD INC.w UpdateHUD
..byrna ..byrna
LDA #$01 : STA.l ByrnaEquipment : RTS LDA #$01 : STA.l ByrnaEquipment : RTS
..somaria ..somaria
LDA #$01 : STA.l SomariaEquipment : RTS LDA #$01 : STA.l SomariaEquipment : RTS
..bug_net ..bug_net
LDA #$01 : STA.l BugNetEquipment : RTS LDA #$01 : STA.l BugNetEquipment : RTS
ResolveReceipt: ResolveReceipt:
PHA : PHX PHA : PHX

View File

@@ -595,14 +595,15 @@ RTS
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
CheckBugNet: CheckBugNet:
LDA.w $037A : AND.b #$10 : BEQ .done ; normal behavior if not bugnet 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 LDA.l SpecialWeapons : CMP.b #$08 : BNE .return_10 ; normal behavior if not bugnet mode
.bugnet_mode .bugnet_mode
LDA.w $0E20, X : CMP.b #$E3 : BEQ .return_10 ; normal behavior if fairy 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 #$79 : BEQ .return_10 ; normal behavior if bee
CMP.b #$B2 : 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 .return_10
LDA.b #$10 PLP : LDA.b #$10
.done .done
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------