From 0ec028a36f48643e1db0b1a5b1049bce7e614499 Mon Sep 17 00:00:00 2001 From: sporchia Date: Sat, 30 Sep 2017 09:54:18 -0400 Subject: [PATCH] Fix free item text to work if enabled --- dialog.asm | 6 ++++-- events.asm | 8 ++++---- newitems.asm | 3 ++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/dialog.asm b/dialog.asm index 6ed2c8d..bc1e4c8 100644 --- a/dialog.asm +++ b/dialog.asm @@ -152,7 +152,9 @@ FreeDungeonItemNotice: + : CMP.b #$A0 : BNE + ; small key of... %CopyDialog(Notice_SmallKeyOf) PLA : AND.b #$0F : STA $7F5020 : LDA.b #$0F : !SUB $7F5020 : PHA + BRA .dungeon + + BRL .skip ; it's not something we are going to give a notice for .dungeon LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER @@ -194,6 +196,7 @@ FreeDungeonItemNotice: .done LDA.b #$01 : STA $7F5035 ; set alternate dialog flag + LDA.b #$01 : STA $7F50A0 ;-------------------------------- PLA : STA $02 @@ -202,8 +205,7 @@ FreeDungeonItemNotice: PLB PLP PLY : PLX : PLA - - JSL.l Main_ShowTextMessage + ;JSL.l Main_ShowTextMessage RTL .skip diff --git a/events.asm b/events.asm index 257ac68..9ccbd5a 100644 --- a/events.asm +++ b/events.asm @@ -93,10 +93,10 @@ RTL PostItemAnimation: LDA.b #$00 : STA !ITEM_BUSY ; mark item as finished - ;LDA $7F50A0 : BEQ + - ; JSL.l Main_ShowTextMessage - ; LDA.b #$00 : STA $7F50A0 - ;+ + LDA $7F50A0 : BEQ + + JSL.l Main_ShowTextMessage + LDA.b #$00 : STA $7F50A0 + + STZ $02E9 : LDA $0C5E, X ; thing we wrote over to get here RTL diff --git a/newitems.asm b/newitems.asm index e5ee887..9879ad8 100755 --- a/newitems.asm +++ b/newitems.asm @@ -172,8 +172,9 @@ AddReceivedItemExpandedGetItem: ; LDA.b #$01 : STA $7F50A0 ; BRL .done ;++ - + LDA $02D8 ; check inventory + JSL.l FreeDungeonItemNotice CMP.b #$4C : BNE + ; 50 bombs ;LDA.b #$07 : STA $7EF370 ; upgrade bombs LDA.b #50 : !SUB.l StartingMaxBombs : STA $7EF370 ; upgrade bombs