set item index on menu exit
This commit is contained in:
@@ -303,6 +303,7 @@ Menu_ScrollUp:
|
|||||||
STZ.b $E4
|
STZ.b $E4
|
||||||
|
|
||||||
INC.w $0200
|
INC.w $0200
|
||||||
|
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
@@ -343,18 +344,16 @@ Menu_HookItems:
|
|||||||
|
|
||||||
Menu_Exit:
|
Menu_Exit:
|
||||||
{
|
{
|
||||||
; set $0303 by using $0202 to index table on exit
|
|
||||||
; JSR Menu_CheckBottle
|
|
||||||
JSR Menu_HookItems
|
|
||||||
LDY.w $0202 : BEQ .no_item : DEY
|
|
||||||
LDA.w Menu_ItemIndex, Y
|
|
||||||
STA.w $0303
|
|
||||||
|
|
||||||
.no_item
|
|
||||||
REP #$20
|
REP #$20
|
||||||
|
; reset submodule
|
||||||
STZ $0200
|
STZ $0200
|
||||||
LDA.w $010C
|
|
||||||
STA.b $10
|
; go back to the submodule we came from
|
||||||
|
LDA.w $010C : STA.b $10
|
||||||
|
|
||||||
|
; set $0303 by using $0202 to index table on exit
|
||||||
|
LDX $0202
|
||||||
|
LDA.w Menu_ItemIndex, X : STA $0303
|
||||||
|
|
||||||
LDX.b #$3E
|
LDX.b #$3E
|
||||||
.loop
|
.loop
|
||||||
|
|||||||
Reference in New Issue
Block a user