summaryrefslogtreecommitdiff
path: root/engine/overworld/movement.asm
diff options
context:
space:
mode:
authorDaniel Harding <corrnondacqb@yahoo.com>2015-08-30 20:40:32 -0500
committerDaniel Harding <corrnondacqb@yahoo.com>2015-08-30 20:40:32 -0500
commit1ee9fb408c47c3a15a38b1bb407d86ed1a5d2fcc (patch)
tree937d54d5f4c7ee08099669e2742704800dab11d2 /engine/overworld/movement.asm
parent1a987d1e1ab96ca9553d4253c72858057332a03a (diff)
parent4cfcc2f589d07e0b038a0ca4b31123152b93dbe1 (diff)
Merge pull request #116 from YamaArashi/master
Misc changes
Diffstat (limited to 'engine/overworld/movement.asm')
-rw-r--r--engine/overworld/movement.asm11
1 files changed, 8 insertions, 3 deletions
diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm
index be10fd69..2ed49838 100644
--- a/engine/overworld/movement.asm
+++ b/engine/overworld/movement.asm
@@ -133,8 +133,8 @@ UpdateNPCSprite: ; 4ed1 (1:4ed1)
ld l, a
inc l
ld a, [hl] ; c1x1
- bit 7, a
- jp nz, InitializeSpriteFacingDirection ; c1x1 >= $80
+ bit 7, a ; is the face player flag set?
+ jp nz, MakeNPCFacePlayer
ld b, a
ld a, [wFontLoaded]
bit 0, a
@@ -400,10 +400,15 @@ notYetMoving: ; 5073 (1:5073)
ld [hl], $0 ; c1x8 = 0 (walk animation frame)
jp UpdateSpriteImage
-InitializeSpriteFacingDirection: ; 507f (1:507f)
+MakeNPCFacePlayer: ; 507f (1:507f)
+; Make an NPC face the player if the player has spoken to him or her.
+
+; Check if the behaviour of the NPC facing the player when spoken to is
+; disabled. This is only done when rubbing the S.S. Anne captain's back.
ld a, [wd72d]
bit 5, a
jr nz, notYetMoving
+
res 7, [hl]
ld a, [wPlayerDirection]
bit PLAYER_DIR_BIT_UP, a