Fix Murahdahla overriding messages

This commit is contained in:
Kevin Cathcart
2019-09-02 14:06:52 -04:00
parent 8bc6b294cc
commit b59468d65b
2 changed files with 47 additions and 1 deletions

View File

@@ -135,3 +135,49 @@ Sprite_ShowSolicitedMessageIfPlayerFacing_Alt:
RTL RTL
} }
;================================================================ ;================================================================
Sprite_ShowSolicitedMessageIfPlayerFacing_PreserveMessage:
{
PHY
PHA
JSL Sprite_CheckDamageToPlayerSameLayerLong : BCC .alpha
JSL Sprite_CheckIfPlayerPreoccupied : BCS .alpha
LDA $F6 : BPL .alpha
LDA $0F10, X : BNE .alpha
LDA $4D : CMP.b #$02 : BEQ .alpha
JSL Sprite_DirectionToFacePlayerLong : PHX : TYX
; Make sure that the sprite is facing towards the player, otherwise
; talking can't happen. (What sprites actually use this???)
LDA $05E1A3, X : PLX : CMP $2F : BNE .not_facing_each_other
PLA : XBA : PLA
PHY
TAY : XBA
JSL Sprite_ShowMessageUnconditional
LDA.b #$40 : STA $0F10, X
PLA : EOR.b #$03
SEC
RTL
.not_facing_each_other
.alpha
PLY
PLA
LDA $0DE0, X
CLC
RTL
}
;================================================================

View File

@@ -50,7 +50,7 @@ RTL
LDA.b #$96 LDA.b #$96
LDY.b #$01 LDY.b #$01
JSL Sprite_ShowSolicitedMessageIfPlayerFacing : BCC .dont_show JSL Sprite_ShowSolicitedMessageIfPlayerFacing_PreserveMessage : BCC .dont_show
LDA !GOAL_COUNTER LDA !GOAL_COUNTER
CMP GoalItemRequirement : !BLT + CMP GoalItemRequirement : !BLT +
JSL.l ActivateGoal JSL.l ActivateGoal