From abe856f98bf6b6e74c608fa3026d0c1da17c33f0 Mon Sep 17 00:00:00 2001 From: Karkat Date: Sun, 18 Jun 2017 19:03:58 -0400 Subject: [PATCH] bugfix? removed free dungeon item notices until I can figure out why they crash --- dialog.asm | 3 ++- events.asm | 6 +++++- newitems.asm | 5 +---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dialog.asm b/dialog.asm index d8da096..c21f985 100644 --- a/dialog.asm +++ b/dialog.asm @@ -146,7 +146,7 @@ FreeDungeonItemNotice: .dungeon LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER LDA !ITEM_TEMPORARY - AND.b #$0F ; looking at high bits only + AND.b #$0F ; looking at low bits only CMP.b #$00 : BNE + ; ...light world %CopyDialog(Notice_LightWorld) : BRL .done + : CMP.b #$01 : BNE + ; ...dark world @@ -191,6 +191,7 @@ FreeDungeonItemNotice: PLB PLP PLY : PLX : PLA + JSL.l Sprite_ShowMessageMinimal RTL diff --git a/events.asm b/events.asm index 6d9f96e..2b939aa 100644 --- a/events.asm +++ b/events.asm @@ -77,7 +77,11 @@ PreItemGet: RTL ;-------------------------------------------------------------------------------- PostItemGet: - ;LDA.b #$00 : STA !ITEM_BUSY ; mark item as finished + ;LDA $02D8 + ;CMP #$70 : !BLT + + ;CMP #$B0 : !BGE + + ; JSL.l FreeDungeonItemNotice + ;+ JSL.l MaybeWriteSRAMTrace RTL ;-------------------------------------------------------------------------------- diff --git a/newitems.asm b/newitems.asm index 3daf9c9..0693411 100755 --- a/newitems.asm +++ b/newitems.asm @@ -231,7 +231,6 @@ AddReceivedItemExpandedGetItem: CMP GoalItemRequirement : !BLT ++ : JSL.l StatsFinalPrep : ++ BRL .done + CMP.b #$70 : !BLT + : CMP.b #$80 : !BGE + ; Free Map - JSL.l FreeDungeonItemNotice AND #$0F : CMP #$08 : !BGE ++ %ValueShift() ORA $7EF368 : STA $7EF368 ; Map 1 @@ -241,7 +240,6 @@ AddReceivedItemExpandedGetItem: ORA $7EF369 : STA $7EF369 ; Map 2 BRL .done + CMP.b #$80 : !BLT + : CMP.b #$90 : !BGE + ; Free Compass - JSL.l FreeDungeonItemNotice AND #$0F : CMP #$08 : !BGE ++ %ValueShift() ORA $7EF364 : STA $7EF364 ; Compass 1 @@ -251,7 +249,6 @@ AddReceivedItemExpandedGetItem: ORA $7EF365 : STA $7EF365 ; Compass 2 BRL .done + CMP.b #$90 : !BLT + : CMP.b #$A0 : !BGE + ; Free Big Key - JSL.l FreeDungeonItemNotice AND #$0F : CMP #$08 : !BGE ++ %ValueShift() ORA $7EF366 : STA $7EF366 ; Big Key 1 @@ -261,7 +258,6 @@ AddReceivedItemExpandedGetItem: ORA $7EF367 : STA $7EF367 ; Big Key 2 BRL .done + CMP.b #$A0 : !BLT + : CMP.b #$B0 : !BGE + ; Free Small Key - JSL.l FreeDungeonItemNotice AND #$0F : TAX LDA $7EF37C, X : INC : STA $7EF37C, X ; Increment Key Count TXA : ASL : CMP $040C : BNE ++ @@ -276,6 +272,7 @@ RTL ; #$70 - Maps ; #$80 - Compasses ; #$90 - Big Keys +; #$A0 - Small Keys ;-------------------------------------------------------------------------------- !PROGRESSIVE_SHIELD = "$7EF416" ; ss-- ---- !RNG_ITEM = "$7EF450"