From 9ca05ca3fc068abd1d5ea053d8d7fe8d959f3edd Mon Sep 17 00:00:00 2001 From: Rangi Date: Mon, 6 Apr 2026 18:00:57 -0400 Subject: [PATCH] Correct some map object-related constant names and a comment --- constants/map_object_constants.asm | 4 ++-- engine/overworld/map_objects.asm | 24 ++++++++++++------------ engine/overworld/movement.asm | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/constants/map_object_constants.asm b/constants/map_object_constants.asm index 2bd2ee7f..fb12b40d 100644 --- a/constants/map_object_constants.asm +++ b/constants/map_object_constants.asm @@ -59,11 +59,11 @@ DEF OW_RIGHT EQU RIGHT << 2 shift_const LOW_PRIORITY ; 0 shift_const HIGH_PRIORITY ; 1 shift_const BOULDER_MOVING ; 2 - shift_const OVERHEAD ; 3 + shift_const IN_GRASS ; 3 shift_const USE_OBP1 ; 4 shift_const FROZEN ; 5 shift_const OFF_SCREEN ; 6 - shift_const OBJ_FLAGS2_7 ; 7 + shift_const UNDER_TILES ; 7 ; object_struct OBJECT_PALETTE bit flags const_def 5 diff --git a/engine/overworld/map_objects.asm b/engine/overworld/map_objects.asm index 605fe3b6..522b9e7d 100644 --- a/engine/overworld/map_objects.asm +++ b/engine/overworld/map_objects.asm @@ -226,7 +226,7 @@ CopyLastCoordsToCoords: UpdateTallGrassFlags: ld hl, OBJECT_FLAGS2 add hl, bc - bit OVERHEAD_F, [hl] + bit IN_GRASS_F, [hl] jr z, .ok ld hl, OBJECT_TILE_COLLISION add hl, bc @@ -252,13 +252,13 @@ SetTallGrassFlags: .set ld hl, OBJECT_FLAGS2 add hl, bc - set OVERHEAD_F, [hl] + set IN_GRASS_F, [hl] ret .reset ld hl, OBJECT_FLAGS2 add hl, bc - res OVERHEAD_F, [hl] + res IN_GRASS_F, [hl] ret UselessAndA: @@ -1143,7 +1143,7 @@ StepFunction_NPCJump: call GetNextTile ld hl, OBJECT_FLAGS2 add hl, bc - res OVERHEAD_F, [hl] + res IN_GRASS_F, [hl] call ObjectStep_IncAnonJumptableIndex ret @@ -1182,7 +1182,7 @@ StepFunction_PlayerJump: call CopyCoordsTileToLastCoordsTile ld hl, OBJECT_FLAGS2 add hl, bc - res OVERHEAD_F, [hl] + res IN_GRASS_F, [hl] ld hl, wPlayerStepFlags set PLAYERSTEP_STOP_F, [hl] set PLAYERSTEP_MIDAIR_F, [hl] @@ -1248,7 +1248,7 @@ StepFunction_TeleportFrom: ld [hl], 16 ld hl, OBJECT_FLAGS2 add hl, bc - res OVERHEAD_F, [hl] + res IN_GRASS_F, [hl] call ObjectStep_IncAnonJumptableIndex .DoSpinRise: ld hl, OBJECT_ACTION @@ -2831,10 +2831,10 @@ InitSprites: ld hl, OBJECT_FLAGS2 add hl, bc ld e, [hl] - bit OBJ_FLAGS2_7_F, e - jr z, .not_priority + bit UNDER_TILES_F, e + jr z, .not_under_tiles or OAM_PRIO -.not_priority +.not_under_tiles bit USE_OBP1_F, e jr z, .not_obp_num or OAM_PAL1 @@ -2847,10 +2847,10 @@ InitSprites: or d ld d, a xor a - bit OVERHEAD_F, e - jr z, .not_overhead + bit IN_GRASS_F, e + jr z, .not_in_grass or OAM_PRIO -.not_overhead +.not_in_grass ldh [hCurSpriteOAMFlags], a ld hl, OBJECT_SPRITE_TILE add hl, bc diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm index 0796025a..e90aa985 100644 --- a/engine/overworld/movement.asm +++ b/engine/overworld/movement.asm @@ -746,7 +746,7 @@ JumpStep: ld hl, OBJECT_FLAGS2 add hl, bc - res OVERHEAD_F, [hl] + res IN_GRASS_F, [hl] ld hl, OBJECT_ACTION add hl, bc