diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2022-01-21 12:48:19 -0500 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2022-01-21 12:48:19 -0500 |
commit | 3d0326106ed683911da66eee1bf94becadc7a2db (patch) | |
tree | 3b0901917605374b05656eb14f8e06744765af63 /src/overworld.c | |
parent | fb81d9ad4a19b7d653e44787e5647bda794757fd (diff) |
Z coord / height -> elevation
Diffstat (limited to 'src/overworld.c')
-rw-r--r-- | src/overworld.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/overworld.c b/src/overworld.c index a18313d32..ba6eaa167 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -2692,7 +2692,7 @@ static void LoadCableClubPlayer(s32 linkPlayerId, s32 myPlayerId, struct CableCl GetLinkPlayerCoords(linkPlayerId, &x, &y); trainer->pos.x = x; trainer->pos.y = y; - trainer->pos.height = GetLinkPlayerElevation(linkPlayerId); + trainer->pos.elevation = GetLinkPlayerElevation(linkPlayerId); trainer->metatileBehavior = MapGridGetMetatileBehaviorAt(x, y); } @@ -2745,7 +2745,7 @@ static const u8 *TryInteractWithPlayer(struct CableClubPlayer *player) otherPlayerPos = player->pos; otherPlayerPos.x += gDirectionToVectors[player->facing].x; otherPlayerPos.y += gDirectionToVectors[player->facing].y; - otherPlayerPos.height = 0; + otherPlayerPos.elevation = 0; linkPlayerId = GetLinkPlayerIdAt(otherPlayerPos.x, otherPlayerPos.y); if (linkPlayerId != MAX_LINK_PLAYERS) @@ -2955,7 +2955,7 @@ static void InitLinkPlayerObjectEventPos(struct ObjectEvent *objEvent, s16 x, s1 objEvent->previousCoords.y = y; SetSpritePosToMapCoords(x, y, &objEvent->initialCoords.x, &objEvent->initialCoords.y); objEvent->initialCoords.x += 8; - ObjectEventUpdateZCoord(objEvent); + ObjectEventUpdateElevation(objEvent); } static void SetLinkPlayerObjectRange(u8 linkPlayerId, u8 dir) @@ -3095,7 +3095,7 @@ static bool8 FacingHandler_DpadMovement(struct LinkPlayerObjectEvent *linkPlayer { objEvent->directionSequenceIndex = 16; ShiftObjectEventCoords(objEvent, x, y); - ObjectEventUpdateZCoord(objEvent); + ObjectEventUpdateElevation(objEvent); return TRUE; } } @@ -3201,8 +3201,8 @@ static void SpriteCB_LinkPlayer(struct Sprite *sprite) struct ObjectEvent *objEvent = &gObjectEvents[linkPlayerObjEvent->objEventId]; sprite->x = objEvent->initialCoords.x; sprite->y = objEvent->initialCoords.y; - SetObjectSubpriorityByZCoord(objEvent->previousElevation, sprite, 1); - sprite->oam.priority = ZCoordToPriority(objEvent->previousElevation); + SetObjectSubpriorityByElevation(objEvent->previousElevation, sprite, 1); + sprite->oam.priority = ElevationToPriority(objEvent->previousElevation); if (linkPlayerObjEvent->movementMode == MOVEMENT_MODE_FREE) StartSpriteAnim(sprite, GetFaceDirectionAnimNum(linkDirection(objEvent))); |