Extra cleanup of text removal code

Remove hooks that were only left to clear $1C8E, replacing them with a
single new hook.
This commit is contained in:
Kevin Cathcart
2018-04-21 11:01:51 -04:00
parent adbbc786f7
commit e07f51dfb4
4 changed files with 102 additions and 145 deletions

View File

@@ -356,6 +356,9 @@ GetAnimatedSpriteTile:
org $00D52D org $00D52D
GetAnimatedSpriteTile_variable: GetAnimatedSpriteTile_variable:
org $00D84E
Attract_DecompressStoryGfx:
org $00E529 org $00E529
LoadSelectScreenGfx: LoadSelectScreenGfx:

View File

@@ -1,82 +1,82 @@
;================================================================ ;================================================================
; Contributor: Myramong ; Contributor: Myramong
;================================================================ ;================================================================
Sprite_ShowMessageFromPlayerContact_Edit: ;Sprite_ShowMessageFromPlayerContact_Edit:
{ ;{
STZ $1CE8 ; STZ $1CE8
JSL.l Sprite_CheckDamageToPlayerSameLayerLong : BCC .dont_show ; JSL.l Sprite_CheckDamageToPlayerSameLayerLong : BCC .dont_show
;
LDA $4D : CMP.b #$02 : BEQ .dont_show ; LDA $4D : CMP.b #$02 : BEQ .dont_show
;
JSL.l Sprite_DirectionToFacePlayerLong : TYA : EOR.b #$03 ; JSL.l Sprite_DirectionToFacePlayerLong : TYA : EOR.b #$03
SEC ; SEC
RTL ;RTL
.dont_show ;.dont_show
LDA $0DE0, X ; LDA $0DE0, X
CLC ; CLC
RTL ;RTL
} ;}
;================================================================ ;================================================================
Sprite_ShowSolicitedMessageIfPlayerFacing_Edit: ;Sprite_ShowSolicitedMessageIfPlayerFacing_Edit:
{ ;{
JSL.l Sprite_CheckDamageToPlayerSameLayerLong : BCC .alpha ; JSL.l Sprite_CheckDamageToPlayerSameLayerLong : BCC .alpha
JSL.l Sprite_CheckIfPlayerPreoccupied : BCS .alpha ; JSL.l Sprite_CheckIfPlayerPreoccupied : BCS .alpha
LDA $F6 : BPL .alpha ; LDA $F6 : BPL .alpha
LDA $0F10, X : BNE .alpha ; LDA $0F10, X : BNE .alpha
;
LDA $4D : CMP.b #$02 : BEQ .alpha ; LDA $4D : CMP.b #$02 : BEQ .alpha
;
STZ $1CE8 ; set text choice to 1st option (usually yes/confirm/etc) ; STZ $1CE8 ; set text choice to 1st option (usually yes/confirm/etc)
JSL.l Sprite_DirectionToFacePlayerLong : PHX : TYX ; JSL.l Sprite_DirectionToFacePlayerLong : PHX : TYX
;
; Make sure that the sprite is facing towards the player, otherwise ; ; Make sure that the sprite is facing towards the player, otherwise
; talking can't happen. (What sprites actually use this???) ; ; talking can't happen. (What sprites actually use this???)
LDA $05E1A3, X : PLX : CMP $2F : BNE .not_facing_each_other ; LDA $05E1A3, X : PLX : CMP $2F : BNE .not_facing_each_other
PHY ; PHY
LDA.b #$40 : STA $0F10, X ; LDA.b #$40 : STA $0F10, X
PLA : EOR.b #$03 ; PLA : EOR.b #$03
SEC ; SEC
RTL ;RTL
.not_facing_each_other ;.not_facing_each_other
.alpha ;.alpha
LDA $0DE0, X ; LDA $0DE0, X
CLC ; CLC
RTL ;RTL
} ;}
;================================================================ ;================================================================
OldMountainMan_TransitionFromTagalong_Edit: ;OldMountainMan_TransitionFromTagalong_Edit:
{ ;{
PHA ; PHA
;
LDA.b #$AD : JSL Sprite_SpawnDynamically ; LDA.b #$AD : JSL Sprite_SpawnDynamically
;
PLA : PHX : TAX ; PLA : PHX : TAX
;
LDA $1A64, X : AND.b #$03 : STA $0EB0, Y ; LDA $1A64, X : AND.b #$03 : STA $0EB0, Y
STA $0DE0, Y ; STA $0DE0, Y
;
LDA $1A00, X : CLC : ADC.b #$02 : STA $0D00, Y ; LDA $1A00, X : CLC : ADC.b #$02 : STA $0D00, Y
LDA $1A14, X : ADC.b #$00 : STA $0D20, Y ; LDA $1A14, X : ADC.b #$00 : STA $0D20, Y
;
LDA $1A28, X : CLC : ADC.b #$02 : STA $0D10, Y ; LDA $1A28, X : CLC : ADC.b #$02 : STA $0D10, Y
LDA $1A3C, X : ADC.b #$00 : STA $0D30, Y ; LDA $1A3C, X : ADC.b #$00 : STA $0D30, Y
;
LDA $EE : STA $0F20, Y ; LDA $EE : STA $0F20, Y
;
LDA.b #$01 : STA $0BA0, Y ; LDA.b #$01 : STA $0BA0, Y
STA $0E80, Y ; STA $0E80, Y
;
LDA.b #$01 : STA $02E4 ; OldMountainMan_FreezePlayer ; LDA.b #$01 : STA $02E4 ; OldMountainMan_FreezePlayer
STA $037B ; ^ ; STA $037B ; ^
;
PLX ; PLX
;
LDA.b #$00 : STA $7EF3CC ; LDA.b #$00 : STA $7EF3CC
;
STZ $5E ; STZ $5E
;
JML $09A6B6 ; <- 4A6B6 tagalong.asm:1194 (SEP #$30 : RTS) ; JML $09A6B6 ; <- 4A6B6 tagalong.asm:1194 (SEP #$30 : RTS)
} ;}
;================================================================ ;================================================================
!MAP_OVERLAY = "$7EF414" ; [2] !MAP_OVERLAY = "$7EF414" ; [2]
Sprite_ShowSolicitedMessageIfPlayerFacing_Alt: Sprite_ShowSolicitedMessageIfPlayerFacing_Alt:

View File

@@ -250,6 +250,11 @@ RTL
PLY : PLX : PLA PLY : PLX : PLA
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
DialogResetSelectionIndex:
JSL.l Attract_DecompressStoryGfx ; what we wrote over
STZ $1CE8
RTL
;--------------------------------------------------------------------------------
DialogFairyThrow: DialogFairyThrow:
LDA.l Restrict_Ponds : BEQ .normal LDA.l Restrict_Ponds : BEQ .normal
LDA $7EF35C : ORA $7EF35D : ORA $7EF35E : ORA $7EF35F : BNE .normal LDA $7EF35C : ORA $7EF35D : ORA $7EF35E : ORA $7EF35F : BNE .normal

View File

@@ -1431,71 +1431,20 @@ LDA #$40 : STA !MS_GOT
org $08C5E5 ; <- 445ED - ancilla_receive_item.asm:395 (LDA .item_messages, Y : CMP.w #$FFFF : BEQ .handleGraphics) org $08C5E5 ; <- 445ED - ancilla_receive_item.asm:395 (LDA .item_messages, Y : CMP.w #$FFFF : BEQ .handleGraphics)
LDA.w #$FFFF LDA.w #$FFFF
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
;-- zelda in jail ;-- Reset Dialog Selection index for each new message
org $05ED27 ; <- 2ED27 sprite_zelda.asm : 256 - (JSL Sprite_ShowMessageUnconditional) org $0EEE5D ; <- 76E5D - vwf.asm:84 (JSL Attract_DecompressStoryGfx)
STZ $1CE8 : NOP JSL.l DialogResetSelectionIndex
;----------------------------------------------------
;-- sanctuary
org $05DDAB ; <- 2DDAB sprite_uncle_and_priest.asm : 635 - (JSL Sprite_ShowMessageUnconditional)
STZ $1CE8 : NOP
;----------------------------------------------------
;-- King Zora
org $059A82 ; <- 29A82 sprite_zora_king.asm : 229 - (LDA $1CE8 : BNE .player_says_just_came_to_visit)
LDA.b #00 : NOP
org $059A8D ; <- 29A8d sprite_zora_king.asm : 229 - (LDA $1CE8 : BNE .not_buying)
LDA.b #00 : NOP
;----------------------------------------------------
;-- Kiki
org $1EE3E6 ; <- F63E6 sprite_kiki.asm : 157 pay kiki 10 rupees
STZ $1CE8 : NOP
org $1EE4FB ; <- F64FB sprite_kiki.asm : 340 pay 100 rupees
STZ $1CE8 : NOP
;---------------------------------------------------- ;----------------------------------------------------
;-- Agahnim 1 Defeated ;-- Agahnim 1 Defeated
org $068475 ; <- 30475 Bank06.asm : 762 - (JSL Sprite_ShowMessageMinimal) org $068475 ; <- 30475 Bank06.asm : 762 - (JSL Sprite_ShowMessageMinimal)
JSL.l AddInventory_incrementBossSwordLong JSL.l AddInventory_incrementBossSwordLong
;NOP #4 ;NOP #4
;---------------------------------------------------------- ;----------------------------------------------------------
;-- Middle aged man opens purple chest
org $06BD44 ; <- 33D44 sprite_middle_aged_man.asm : 107 (JSL Sprite_ShowMessageFromPlayerContact : BCC .return)
JSL Sprite_ShowMessageFromPlayerContact_Edit
; ^ still needed because of clearing $1CE8
;----------------------------------------------------------
;-- Smiths
;-- Ask us to do anything
org $06B418 ; <- 33418 sprite_smithy_bros.asm : 371 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .player_didnt_speak)
JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit
; ^ still needed because of clearing $1CE8
;-- 10 rupees to temper
org $06B470 ; <- 33470 sprite_smithy_bros.asm : 447 (JSL Sprite_ShowMessageUnconditional)
STZ $1CE8 : NOP
;-- Yes, I'm sure
org $06B495 ; <- 33495 sprite_smithy_bros.asm : 479 (JSL Sprite_ShowMessageUnconditional)
STZ $1CE8 : NOP
;-- We'll take your sword ;-- We'll take your sword
org $06B4F3 ; <- 334F3 sprite_smithy_bros.asm : 556 (JSL Sprite_ShowMessageUnconditional) org $06B4F3 ; <- 334F3 sprite_smithy_bros.asm : 556 (JSL Sprite_ShowMessageUnconditional)
JSL ItemSet_SmithSword JSL ItemSet_SmithSword
;NOP #4 ;NOP #4
;---------------------------------------------------------- ;----------------------------------------------------------
;-- Bottle Vendor
org $05EAE3 ; <- 2EAE3 sprite_bottle_vendor.asm : 104 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .didnt_converse)
JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit
; ^ still needed because of clearing $1CE8
;----------------------------------------------------------
;-- Digging Game Guy
org $1DFC76 ; <- EFC76 sprite_digging_game_guy.asm : 46 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .return)
JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit
; ^ still needed because of clearing $1CE8
;----------------------------------------------------------
;-- Flute Boy
org $06B078 ; <- 33078 sprite_flute_boy.asm : 244 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .didnt_speak)
JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit
; ^ still needed because of clearing $1CE8
;----------------------------------------------------------
;-- Chest Game Guy
org $1EEFBF ; <- F6FBF sprite_shopkeeper.asm : 121 - (JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC BRANCH_ALPHA)
JSL Sprite_ShowSolicitedMessageIfPlayerFacing_Edit
; ^ still needed because of clearing $1CE8
;=================================== ;===================================
;-- Escort Text ;-- Escort Text