summaryrefslogtreecommitdiff
path: root/engine/overworld/npc_movement.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2018-05-23 22:01:21 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2018-05-23 22:01:21 -0400
commit1840af8b4f02d6b8f748ea917344c64cb1c5ff2d (patch)
tree2e7d6719c20d82600bccec3bc394db9b6dd0854b /engine/overworld/npc_movement.asm
parent85f7328bf853d30c23149151718c2ccef337ced5 (diff)
Identify more sprite move data flag bits
Diffstat (limited to 'engine/overworld/npc_movement.asm')
-rw-r--r--engine/overworld/npc_movement.asm39
1 files changed, 20 insertions, 19 deletions
diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm
index a8bb5e138..66b64037c 100644
--- a/engine/overworld/npc_movement.asm
+++ b/engine/overworld/npc_movement.asm
@@ -7,31 +7,32 @@ Function6ec1: ; 6ec1
ld hl, OBJECT_FLAGS1
add hl, bc
- bit 4, [hl] ; lost, uncomment next line to fix
-; jr nz, .resume
+ bit NOCLIP_TILES_F, [hl] ; lost, uncomment next line to fix
+ ; jr nz, .noclip_tiles
push hl
push bc
- call Function6f2c
+ call WillObjectBumpIntoLand
pop bc
pop hl
ret c
- jr .resume
+ jr .continue
.not_swimming
ld hl, OBJECT_FLAGS1
add hl, bc
- bit 4, [hl]
- jr nz, .resume
+ bit NOCLIP_TILES_F, [hl]
+ jr nz, .noclip_tiles
push hl
push bc
- call Function6f07
+ call WillObjectBumpIntoWater
pop bc
pop hl
ret c
-.resume
- bit 6, [hl]
- jr nz, .bit_6
+.noclip_tiles
+.continue
+ bit NOCLIP_OBJS_F, [hl]
+ jr nz, .noclip_objs
push hl
push bc
@@ -40,9 +41,9 @@ Function6ec1: ; 6ec1
pop hl
ret c
-.bit_6
- bit 5, [hl]
- jr nz, .bit_5
+.noclip_objs
+ bit MOVE_ANYWHERE_F, [hl]
+ jr nz, .move_anywhere
push hl
call HasObjectReachedMovementLimit
pop hl
@@ -53,13 +54,13 @@ Function6ec1: ; 6ec1
pop hl
ret c
-.bit_5
+.move_anywhere
and a
ret
; 6f07
-Function6f07: ; 6f07
+WillObjectBumpIntoWater: ; 6f07
call Function6f5f
ret c
ld hl, OBJECT_NEXT_MAP_X
@@ -78,12 +79,12 @@ Function6f07: ; 6f07
ld d, a
call GetTileCollision
and a ; LANDTILE
- jr z, Function6f3e
+ jr z, WillObjectBumpIntoTile
scf
ret
; 6f2c
-Function6f2c: ; 6f2c
+WillObjectBumpIntoLand: ; 6f2c
call Function6f5f
ret c
ld hl, OBJECT_NEXT_TILE
@@ -91,12 +92,12 @@ Function6f2c: ; 6f2c
ld a, [hl]
call GetTileCollision
cp WATERTILE
- jr z, Function6f3e
+ jr z, WillObjectBumpIntoTile
scf
ret
; 6f3e
-Function6f3e: ; 6f3e
+WillObjectBumpIntoTile: ; 6f3e
ld hl, OBJECT_NEXT_TILE
add hl, bc
ld a, [hl]