summaryrefslogtreecommitdiff
path: root/engine/overworld
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2015-08-29 17:15:05 -0700
committerYamaArashi <shadow962@live.com>2015-08-29 17:15:05 -0700
commitb6a7e5e9cf20e7924f6cf427c66e9aeb42fa77f3 (patch)
treeaf1bac71243d59c9479898fa0c86ba37d742aacf /engine/overworld
parent1a987d1e1ab96ca9553d4253c72858057332a03a (diff)
documented flags and misc. fixes
Diffstat (limited to 'engine/overworld')
-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