dirty fix for small keys with text boxes

This commit is contained in:
sporchia
2017-10-02 19:12:29 -04:00
parent 0ec028a36f
commit e74e1ed665
2 changed files with 22 additions and 14 deletions

View File

@@ -26,7 +26,7 @@ org $3FFFFF ; <- 1FFFFF
db #$00 ; expand file to 2mb
org $1FFFF8 ; <- FFFF8 timestamp rom
db #$20, #$17, #$09, #$28 ; year/month/day
db #$20, #$17, #$10, #$02 ; year/month/day
;================================================================================

View File

@@ -138,6 +138,7 @@ FreeDungeonItemNotice:
LDA.l FreeItemText : BNE + : BRL .skip : +
LDA #$00 : STA $7F5010 ; initialize scratch
LDA !ITEM_TEMPORARY
AND.b #$F0 ; looking at high bits only
CMP.b #$70 : BNE + ; map of...
@@ -152,6 +153,7 @@ FreeDungeonItemNotice:
+ : CMP.b #$A0 : BNE + ; small key of...
%CopyDialog(Notice_SmallKeyOf)
PLA : AND.b #$0F : STA $7F5020 : LDA.b #$0F : !SUB $7F5020 : PHA
LDA #$01 : STA $7F5010 ; set up a flip for small keys
BRA .dungeon
+
BRL .skip ; it's not something we are going to give a notice for
@@ -160,6 +162,12 @@ FreeDungeonItemNotice:
LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER
LDA !ITEM_TEMPORARY
AND.b #$0F ; looking at low bits only
STA $7F5011
LDA $7F5010 : BEQ +
LDA $7F5010
LDA #$0F : !SUB $7F5011 : STA $7F5011 ; flip the values for small keys
+
LDA $7F5011
CMP.b #$00 : BNE + ; ...light world
%CopyDialog(Notice_LightWorld) : BRL .done
+ : CMP.b #$01 : BNE + ; ...dark world