summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/events/checkforhiddenitems.asm2
-rw-r--r--engine/overworld/events.asm2
-rw-r--r--engine/overworld/npc_movement.asm30
3 files changed, 23 insertions, 11 deletions
diff --git a/engine/events/checkforhiddenitems.asm b/engine/events/checkforhiddenitems.asm
index c0d31fe24..c71bd2905 100644
--- a/engine/events/checkforhiddenitems.asm
+++ b/engine/events/checkforhiddenitems.asm
@@ -60,7 +60,7 @@ CheckForHiddenItems:
.next
; Restore the bg_event pointer and increment it by the length of a bg_event.
pop hl
- ld bc, 5
+ ld bc, BG_EVENT_SIZE
add hl, bc
; Restore the BG event counter and decrement it. If it hits zero, there are no hidden items in range.
ld a, [wBuffer2]
diff --git a/engine/overworld/events.asm b/engine/overworld/events.asm
index ec81f1c27..fe2c51560 100644
--- a/engine/overworld/events.asm
+++ b/engine/overworld/events.asm
@@ -418,7 +418,7 @@ RunSceneScript:
ld a, [hli]
ld h, [hl]
ld l, a
-rept 4
+rept SCENE_SCRIPT_SIZE
add hl, de
endr
diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm
index ffed4875b..d249d2fd4 100644
--- a/engine/overworld/npc_movement.asm
+++ b/engine/overworld/npc_movement.asm
@@ -114,7 +114,10 @@ WillObjectBumpIntoTile:
ret
.data_6f5b
- db DOWN_MASK, UP_MASK, RIGHT_MASK, LEFT_MASK
+ db DOWN_MASK ; DOWN
+ db UP_MASK ; UP
+ db RIGHT_MASK ; LEFT
+ db LEFT_MASK ; RIGHT
Function6f5f:
ld hl, OBJECT_STANDING_TILE
@@ -137,19 +140,22 @@ Function6f5f:
ret
.data_6f7b
- db UP_MASK, DOWN_MASK, LEFT_MASK, RIGHT_MASK
+ db UP_MASK ; DOWN
+ db DOWN_MASK ; UP
+ db LEFT_MASK ; LEFT
+ db RIGHT_MASK ; RIGHT
Function6f7f:
ld d, a
and $f0
cp HI_NYBBLE_SIDE_WALLS
- jr z, .done
- cp HI_NYBBLE_UNUSED_C0
- jr z, .done
+ jr z, .continue
+ cp HI_NYBBLE_SIDE_BUOYS
+ jr z, .continue
xor a
ret
-.done
+.continue
ld a, d
and 7
ld e, a
@@ -161,8 +167,14 @@ Function6f7f:
ret
.data_6f99
- db 8, 4, 1, 2
- db 10, 6, 9, 5
+ db RIGHT_MASK ; COLL_RIGHT_WALL/BUOY
+ db LEFT_MASK ; COLL_LEFT_WALL/BUOY
+ db DOWN_MASK ; COLL_UP_WALL/BUOY
+ db UP_MASK ; COLL_DOWN_WALL/BUOY
+ db UP_MASK | RIGHT_MASK ; COLL_DOWN_RIGHT_WALL/BUOY
+ db UP_MASK | LEFT_MASK ; COLL_DOWN_LEFT_WALL/BUOY
+ db DOWN_MASK | RIGHT_MASK ; COLL_UP_RIGHT_WALL/BUOY
+ db DOWN_MASK | LEFT_MASK ; COLL_UP_LEFT_WALL/BUOY
Function6fa1:
ld hl, OBJECT_DIRECTION_WALKING
@@ -493,7 +505,7 @@ Unreferenced_Function7113:
cp d
jr nz, .check_current_coords
ldh a, [hObjectStructIndexBuffer]
- cp $0
+ cp PLAYER_OBJECT
jr z, .next
jr .yes