diff --git a/constants/map_object_constants.asm b/constants/map_object_constants.asm index c84171941..93532220e 100644 --- a/constants/map_object_constants.asm +++ b/constants/map_object_constants.asm @@ -52,6 +52,11 @@ FIXED_FACING EQU 2 SLIDING EQU 3 EMOTE_OBJECT EQU 7 +; object_struct OBJECT_FLAGS2 bit flags +LOW_PRIORITY EQU 0 +HIGH_PRIORITY EQU 1 +OVERHEAD EQU 3 + ; map_object struct members (see macros/wram.asm) const_def diff --git a/engine/map_objects.asm b/engine/map_objects.asm index cc6f08ea0..dc39b3f16 100644 --- a/engine/map_objects.asm +++ b/engine/map_objects.asm @@ -233,7 +233,7 @@ Function462a: ; 462a UpdateTallGrassFlags: ; 463f ld hl, OBJECT_FLAGS2 add hl, bc - bit 3, [hl] ; is current tile grass? + bit OVERHEAD, [hl] jr z, .ok ld hl, OBJECT_NEXT_TILE add hl, bc @@ -260,13 +260,13 @@ SetTallGrassFlags: ; 4661 .set ld hl, OBJECT_FLAGS2 add hl, bc - set 3, [hl] + set OVERHEAD, [hl] ret .reset ld hl, OBJECT_FLAGS2 add hl, bc - res 3, [hl] + res OVERHEAD, [hl] ret ; 4679 @@ -2918,10 +2918,10 @@ InitSprites: ; 5991 ld e, PRIORITY_LOW ld hl, OBJECT_FLAGS2 add hl, bc - bit 0, [hl] + bit LOW_PRIORITY, [hl] jr nz, .add ld e, PRIORITY_NORM - bit 1, [hl] + bit HIGH_PRIORITY, [hl] jr z, .add ld e, PRIORITY_HIGH jr .add diff --git a/engine/movement.asm b/engine/movement.asm index 3ba48d60d..69fd7bc5e 100644 --- a/engine/movement.asm +++ b/engine/movement.asm @@ -838,7 +838,7 @@ JumpStep: ; 548a ld hl, OBJECT_FLAGS2 add hl, bc - res 3, [hl] + res OVERHEAD, [hl] ld hl, OBJECT_ACTION add hl, bc