adjusted double check

This commit is contained in:
Jared_Brian_
2024-03-16 20:47:06 -06:00
parent b13c5e5d28
commit d4be8d172c

View File

@@ -169,6 +169,9 @@ Menu_InitItemScreen:
LDY.w $0202 : BNE .all_good
; Loop through the SRM of each item to see if we have
; one of them so we can start with that one selected.
.lookForAlternateItem
LDY.b #$00
.loop
INY : CPY.b #$25 : BCS .bad
LDX.w Menu_AddressIndex-1, Y
@@ -180,8 +183,8 @@ Menu_InitItemScreen:
.bad
; If we made it here that means there are no items
; available but one was still selected.
; This should never happen.
; available but one was still selected. This should
; never happen under normal vanilla circumstances.
STZ.w $0202
STZ $0207
@@ -195,7 +198,7 @@ Menu_InitItemScreen:
; infinite loop later on.
LDX.w Menu_AddressIndex-1, Y
LDA.l $7EF300, X
CMP.b #$01 : BCC .bad
CMP.b #$01 : BCC .lookForAlternateItem
STZ $0207
LDA.b #$04
STA.w $0200