Allow menu free dungeon item toggle with no menu items
This commit is contained in:
@@ -1116,6 +1116,13 @@ JSL.l CheckCloseItemMenu
|
|||||||
org $0DEE70 ; <- 6EE70 - equipment.asm : 2137
|
org $0DEE70 ; <- 6EE70 - equipment.asm : 2137
|
||||||
JSL.l PrepItemScreenBigKey : NOP
|
JSL.l PrepItemScreenBigKey : NOP
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
org $0DDEA5 ; LDA.b Joy1A_New : BEQ .wait_for_button
|
||||||
|
JSL.l HandleEmptyMenu : RTS
|
||||||
|
org $0DEB3C ; LDA.w ItemCursor : AND.w #$00FF
|
||||||
|
JML.l MaybeDrawEquippedItem : NOP #2
|
||||||
|
org $0DE363 ; LDA.b #$04 : STA.w SubModuleInterface
|
||||||
|
JSL.l RestoreMenu_SetSubModule : NOP
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
org $08D395 ; <- 45395 - ancilla_bird_travel_intro.asm : 253
|
org $08D395 ; <- 45395 - ancilla_bird_travel_intro.asm : 253
|
||||||
JSL.l UpgradeFlute : NOP #2
|
JSL.l UpgradeFlute : NOP #2
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
ProcessMenuButtons:
|
ProcessMenuButtons:
|
||||||
LDA.b Joy1A_New : BIT.b #$40 : BNE .y_pressed ; check for P1 Y-button
|
LDA.b Joy1A_New : BIT.b #$40 : BNE .y_pressed ; check for P1 Y-button
|
||||||
BIT #$20 : BNE .sel_pressed ; check for P1 Select button
|
BIT.b #$20 : BNE .sel_pressed ; check for P1 Select button
|
||||||
LDA.b Joy1A_All : BIT.b #$20 : BNE .sel_held
|
LDA.b Joy1A_All : BIT.b #$20 : BNE .sel_held
|
||||||
.sel_unheld
|
.sel_unheld
|
||||||
LDA.l HudFlag : AND.b #$20 : BEQ +
|
LDA.l HudFlag : AND.b #$20 : BEQ +
|
||||||
|
|||||||
@@ -177,6 +177,7 @@ CheckCloseItemMenu:
|
|||||||
RTL
|
RTL
|
||||||
;================================================================================
|
;================================================================================
|
||||||
ShowDungeonItems:
|
ShowDungeonItems:
|
||||||
|
REP #$30
|
||||||
LDA.w DungeonID : AND.w #$00FF : CMP.w #$00FF : BNE + : RTL : + ; return normal result if outdoors or in a cave
|
LDA.w DungeonID : AND.w #$00FF : CMP.w #$00FF : BNE + : RTL : + ; return normal result if outdoors or in a cave
|
||||||
LDA.l HudFlag : AND.w #$0020 ; check hud flag
|
LDA.l HudFlag : AND.w #$0020 ; check hud flag
|
||||||
BEQ + : LDA.w #$0000 : RTL : + ; if set, send the zero onwards
|
BEQ + : LDA.w #$0000 : RTL : + ; if set, send the zero onwards
|
||||||
@@ -655,3 +656,38 @@ dw $A8FB, $A8F9, $A8F9, $A8F9, $A8F9, $A8F9, $A8F9, $A8F9, $A8F9, $E8FB
|
|||||||
;0x1C - ??? possibly unused. (Were they planning two extra dungeons perhaps?)
|
;0x1C - ??? possibly unused. (Were they planning two extra dungeons perhaps?)
|
||||||
;0x1E - ??? possibly unused.
|
;0x1E - ??? possibly unused.
|
||||||
;================================================================================
|
;================================================================================
|
||||||
|
HandleEmptyMenu:
|
||||||
|
LDA.b Joy1A_New : BIT.b #$DF : BNE .close_menu ; Not select, close menu
|
||||||
|
BIT.b #$20 : BNE .sel_pressed
|
||||||
|
LDA.b Joy1A_All : BIT.b #$20 : BNE .wait_for_change
|
||||||
|
LDA.l HudFlag : AND.b #$20 : BEQ .wait_for_change ; HUD flag off, skip drawing work
|
||||||
|
LDA.l HudFlag : AND.b #$DF : STA.l HudFlag ; Unset without select
|
||||||
|
LDA.b IndoorsFlag : BEQ ++ ; skip if outdoors
|
||||||
|
LDA.b #$20 : STA.w SFX3
|
||||||
|
++
|
||||||
|
LDA.b #$0C : BRA .done
|
||||||
|
.sel_pressed
|
||||||
|
LDA.l HudFlag : ORA.b #$20 : STA.l HudFlag
|
||||||
|
LDA.b #$20 : STA.w SFX3
|
||||||
|
LDA.b #$0C : BRA .done
|
||||||
|
.wait_for_change
|
||||||
|
LDA.b #$03 : BRA .done
|
||||||
|
.close_menu
|
||||||
|
LDA.b #$06
|
||||||
|
.done
|
||||||
|
STA.w SubModuleInterface
|
||||||
|
RTL
|
||||||
|
;-------------------------------------------------------------------------------
|
||||||
|
MaybeDrawEquippedItem:
|
||||||
|
LDA.w ItemCursor : BEQ +
|
||||||
|
JML.l ItemMenu_DrawEquippedYItem+$07
|
||||||
|
+
|
||||||
|
JML.l ItemMenu_DrawEquippedYItem_exit
|
||||||
|
;-------------------------------------------------------------------------------
|
||||||
|
RestoreMenu_SetSubModule:
|
||||||
|
LDA.w ItemCursor : BEQ +
|
||||||
|
LDA.b #$04 : STA.w SubModuleInterface
|
||||||
|
RTL
|
||||||
|
+
|
||||||
|
LDA.b #$03 : STA.w SubModuleInterface
|
||||||
|
RTL
|
||||||
|
|||||||
@@ -91,8 +91,11 @@ Equipment_UpdateEquippedItemLong = $0DDD32
|
|||||||
BottleMenu_movingOn = $0DE01E
|
BottleMenu_movingOn = $0DE01E
|
||||||
RestoreNormalMenu = $0DE346
|
RestoreNormalMenu = $0DE346
|
||||||
Equipment_SearchForEquippedItemLong = $0DE395
|
Equipment_SearchForEquippedItemLong = $0DE395
|
||||||
DrawProgressIcons = $0DE9C8 ; this returns short
|
DrawProgressIcons = $0DE9C8 ; returns short
|
||||||
DrawEquipment = $0DED29 ; this returns short
|
ItemMenu_DrawEquippedYItem = $0DEB3A ; returns short
|
||||||
|
ItemMenu_DrawEquippedYItem_exit = $0DECE6 ; returns short
|
||||||
|
ItemMenu_DrawEquipment_dungeonitems = $0DEDCC ; returns short
|
||||||
|
DrawEquipment = $0DED29 ; returns short
|
||||||
HUD_RebuildLong = $0DFA78
|
HUD_RebuildLong = $0DFA78
|
||||||
HUD_RebuildIndoor_Palace = $0DFA88
|
HUD_RebuildIndoor_Palace = $0DFA88
|
||||||
HUD_RebuildLong2 = $0DFA88
|
HUD_RebuildLong2 = $0DFA88
|
||||||
|
|||||||
Reference in New Issue
Block a user