From e74e1ed6656745f829c6d26cd4405cbab387a71d Mon Sep 17 00:00:00 2001 From: sporchia Date: Mon, 2 Oct 2017 19:12:29 -0400 Subject: [PATCH] dirty fix for small keys with text boxes --- LTTP_RND_GeneralBugfixes.asm | 2 +- dialog.asm | 34 +++++++++++++++++++++------------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index cf3f572..1c50d01 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -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 ;================================================================================ diff --git a/dialog.asm b/dialog.asm index bc1e4c8..fe0dc36 100644 --- a/dialog.asm +++ b/dialog.asm @@ -26,12 +26,12 @@ RTL ; LDA $01 : PHA ; LDA $02 : PHA ; LDA.b #$01 : STA $7F5035 ; set flag -; +; ; LDA : ASL : !ADD.l : TAX ; get quote offset *3, move to X ; LDA , X : STA $00 ; write pointer to direct page ; LDA
+1, X : STA $01 ; LDA
+2, X : STA $02 -; +; ; LDX.b #$00 : LDY.b #$00 ; - ; LDA [$00], Y ; load the next character from the pointer @@ -54,11 +54,11 @@ RTL ; LDA $01 : PHA ; LDA $02 : PHA ; LDA.b #$01 : STA $7F5035 ; set flag -; +; ; LDA.b #
: STA $00 ; write pointer to direct page ; LDA.b #
>>8 : STA $01 ; LDA.b #
>>16 : STA $02 -; +; ; LDX.b #$00 : LDY.b #$00 ; - ; LDA [$00], Y ; load the next character from the pointer @@ -125,7 +125,7 @@ RTL !ITEM_TEMPORARY = "$7F5040" FreeDungeonItemNotice: STA !ITEM_TEMPORARY - + PHA : PHX : PHY PHP PHB : PHK : PLB @@ -135,9 +135,10 @@ FreeDungeonItemNotice: LDA $01 : PHA LDA $02 : PHA ;-------------------------------- - + 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 @@ -194,10 +202,10 @@ FreeDungeonItemNotice: %CopyDialog(Notice_Sewers) + .done - + LDA.b #$01 : STA $7F5035 ; set alternate dialog flag LDA.b #$01 : STA $7F50A0 - + ;-------------------------------- PLA : STA $02 PLA : STA $01 @@ -207,7 +215,7 @@ FreeDungeonItemNotice: PLY : PLX : PLA ;JSL.l Main_ShowTextMessage RTL - + .skip ;-------------------------------- PLA : STA $02 @@ -239,7 +247,7 @@ DialogGanon1: BRA ++ + %LoadDialogAddress(GanonText1) - ++ + ++ JSL.l Sprite_ShowMessageMinimal RTL ;-------------------------------------------------------------------------------- @@ -249,7 +257,7 @@ DialogGanon2: BRA ++ + %LoadDialogAddress(GanonText2) - ++ + ++ JSL.l Sprite_ShowMessageMinimal RTL ;-------------------------------------------------------------------------------- @@ -594,4 +602,4 @@ RTL ; db $75, $00, $ae, $00, $c1, $00, $ac, $00, $be, $00, $be, $00, $be, $00, $be, $00, $be, $00, $bc, $00, $ae, $00, $ff, $00, $b6, $00, $ae, $00, $c8 ; db $76, $00, $b9, $00, $bb, $00, $b2, $00, $b7, $00, $ac, $00, $ae, $00, $bc, $00, $bc, $00, $c7 ; db $7f, $7f -;;-------------------------------------------------------------------------------- ^32nd \ No newline at end of file +;;-------------------------------------------------------------------------------- ^32nd