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