Remove no-text lag

This commit is contained in:
Kevin Cathcart
2018-09-08 16:07:09 -04:00
parent a253648e6d
commit 93aead2d74
5 changed files with 70 additions and 15 deletions

View File

@@ -429,9 +429,6 @@ Sprite_ShowMessageFromPlayerContact:
org $05E219
Sprite_ShowMessageUnconditional:
org $05FA8E
Sprite_ShowMessageMinimal:
org $05EC96
Sprite_ZeldaLong:
@@ -580,9 +577,6 @@ ShopKeeper_RapidTerminateReceiveItem:
org $1CF500
Sprite_NullifyHookshotDrag:
org $1CFD69
Main_ShowTextMessage:
org $1DE9B6
Filter_MajorWhitenMain:

View File

@@ -237,7 +237,7 @@ FreeDungeonItemNotice:
PLB
PLP
PLY : PLX : PLA
;JSL.l Main_ShowTextMessage
;JSL.l Main_ShowTextMessage_Alt
RTL
.skip
@@ -288,7 +288,7 @@ DialogGanon1:
+
REP #$20 : LDA.w #$016D : STA $1CF0 : SEP #$20
++
JSL.l Sprite_ShowMessageMinimal
JSL.l Sprite_ShowMessageMinimal_Alt
RTL
;--------------------------------------------------------------------------------
DialogGanon2:
@@ -298,7 +298,7 @@ DialogGanon2:
+
REP #$20 : LDA.w #$016E : STA $1CF0 : SEP #$20
++
JSL.l Sprite_ShowMessageMinimal
JSL.l Sprite_ShowMessageMinimal_Alt
RTL
;--------------------------------------------------------------------------------
DialogEtherTablet:
@@ -366,6 +366,56 @@ DialogBombShopGuy:
LDY.b #$01
JSL.l Sprite_ShowMessageUnconditional
RTL
;--------------------------------------------------------------------------------
Main_ShowTextMessage_Alt:
; Are we in text mode? If so then end the routine.
LDA $10 : CMP.b #$0E : BEQ .already_in_text_mode
Sprite_ShowMessageMinimal_Alt:
STZ $11
PHX : PHY
LDA.b $00 : PHA
LDA.b $01 : PHA
LDA.b $02 : PHA
LDA.b #$1C : STA.b $02
REP #$30
LDA.w $1CF0 : ASL : TAX
LDA.l $7f71c0, X
STA.b $00
SEP #$30
LDY.b #$00
LDA [$00], Y : CMP.b #$fe : BNE +
INY : LDA [$00], Y : CMP.b #$6e : BNE +
INY : LDA [$00], Y : : BNE +
INY : LDA [$00], Y : CMP.b #$fe : BNE +
INY : LDA [$00], Y : CMP.b #$6b : BNE +
INY : LDA [$00], Y : CMP.b #$04 : BNE +
BRL .end
+
STZ $0223 ; Otherwise set it so we are in text mode.
STZ $1CD8 ; Initialize the step in the submodule
; Go to text display mode (as opposed to maps, etc)
LDA.b #$02 : STA $11
; Store the current module in the temporary location.
LDA $10 : STA $010C
; Switch the main module ($10) to text mode.
LDA.b #$0E : STA $10
.end
PLA : STA.b $02
PLA : STA.b $01
PLA : STA.b $00
PLY : PLX
Main_ShowTextMessage_Alt_already_in_text_mode:
RTL
;--------------------------------------------------------------------------------
; A0 - A9 - 0 - 9
; AA - C3 - A - Z

View File

@@ -202,7 +202,7 @@ PostItemAnimation:
LDA $7F50A0 : BEQ +
STZ $1CF0 : STZ $1CF1 ; reset decompression buffer
JSL.l Main_ShowTextMessage
JSL.l Main_ShowTextMessage_Alt
LDA.b #$00 : STA $7F50A0
+

View File

@@ -1591,6 +1591,20 @@ db #$8F
;================================================================================
; Text Removal
;--------------------------------------------------------------------------------
org $05FA8E
Sprite_ShowMessageMinimal:
JML.l Sprite_ShowMessageMinimal_Alt
;--------------------------------------------------------------------------------
org $1CFD69
Main_ShowTextMessage:
JML.l Main_ShowTextMessage_Alt
;--------------------------------------------------------------------------------
org $05E21F ; <- 2E21F - Bank05.asm : 2691 (STZ $0223)
JSL.l Sprite_ShowMessageMinimal_Alt
BRA Sprite_ShowMessageUnconditional_Rest
org $05E232 ; <- 2E232 - Bank05.asm : 2700 (PHX)
Sprite_ShowMessageUnconditional_Rest:
;--------------------------------------------------------------------------------
;-- Music restarting at zelda fix
org $05ED10 ; <- 2ED10 - sprite_zelda.asm : 233 - (LDA.b #$19 : STA $012C)
NOP #5
@@ -1631,9 +1645,6 @@ org $06B4F3 ; <- 334F3 sprite_smithy_bros.asm : 556 (JSL Sprite_ShowMessageUncon
JSL ItemSet_SmithSword
;NOP #4
;----------------------------------------------------------
org $05FBC2 ; <- 2FBC3 - sprite_mad_batter.asm:195 - (JSL Sprite_ShowMessageUnconditional)
NOP #4 ; removing this breaks animated received objects like rupees
;----------------------------------------------------------
;===================================
;-- Escort Text

View File

@@ -173,9 +173,9 @@ RTS
;--------------------------------------------------------------------------------
AddReceivedItemExpandedGetItem:
PHX
;JSR.w ProcessEventItems : CPX.b #$00 : BEQ ++
; ;JSL.l Main_ShowTextMessage
; ;JSL.l Main_ShowTextMessage_Alt
; LDA !GOAL_COUNTER : INC : STA !GOAL_COUNTER
; LDA.b #$01 : STA $7F50A0
; BRL .done