From bd983395006298e976ae1871ef092e87f3385506 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 | 26 +++++++++++++------------- engine/overworld/movement.asm | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/constants/map_object_constants.asm b/constants/map_object_constants.asm index 3c478b9b1..84cfba299 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 26860ce10..0bab08e53 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: @@ -1144,7 +1144,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 @@ -1183,7 +1183,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] @@ -1249,7 +1249,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 @@ -2898,17 +2898,17 @@ InitSprites: and ~(1 << 7) ldh [hCurSpriteTile], a xor a - bit 7, [hl] ; tiles $80+ are in VRAM bank 0 + bit 7, [hl] ; tiles $80+ are in VRAM bank 1 jr nz, .not_vram1 or OAM_BANK1 .not_vram1 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 @@ -2921,10 +2921,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_X add hl, bc diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm index c59ba2602..b0bc8d1b8 100644 --- a/engine/overworld/movement.asm +++ b/engine/overworld/movement.asm @@ -753,7 +753,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