From d4be8d172cfb028a197f5b2b7f8b2bb337f33bd4 Mon Sep 17 00:00:00 2001 From: Jared_Brian_ Date: Sat, 16 Mar 2024 20:47:06 -0600 Subject: [PATCH] adjusted double check --- Menu/menu_select_item.asm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Menu/menu_select_item.asm b/Menu/menu_select_item.asm index 20764df..a9a6acd 100644 --- a/Menu/menu_select_item.asm +++ b/Menu/menu_select_item.asm @@ -169,19 +169,22 @@ 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 LDA.l $7EF300, X - BEQ .loop + BEQ .loop STY.w $0202 BRA .all_good .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