diff options
author | Marcus Huderle <huderlem@gmail.com> | 2018-06-16 18:31:23 -0500 |
---|---|---|
committer | Marcus Huderle <huderlem@gmail.com> | 2018-06-19 18:52:24 -0500 |
commit | ad0bb29c4b5802a526722ab15a63396c437dc943 (patch) | |
tree | bfda08573471b17151fc4c3cc38ba5d3498b25d6 /src/field_control_avatar.c | |
parent | 544b5b61d42e355ef44c65dc84e53d5f73d7c0e1 (diff) |
Label various overworld-related things
Diffstat (limited to 'src/field_control_avatar.c')
-rw-r--r-- | src/field_control_avatar.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 273378c14..a973b80ca 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -356,7 +356,7 @@ u8 *GetInteractedLinkPlayerScript(struct MapPosition *position, u8 metatileBehav if (!MetatileBehavior_IsCounter(MapGridGetMetatileBehaviorAt(position->x, position->y))) eventObjectId = GetEventObjectIdByXYZ(position->x, position->y, position->height); else - eventObjectId = GetEventObjectIdByXYZ(position->x + gUnknown_0821664C[direction].x, position->y + gUnknown_0821664C[direction].y, position->height); + eventObjectId = GetEventObjectIdByXYZ(position->x + gDirectionToVectors[direction].x, position->y + gDirectionToVectors[direction].y, position->height); if (eventObjectId == 16 || gEventObjects[eventObjectId].localId == 0xFF) return NULL; @@ -385,7 +385,7 @@ static u8 *GetInteractedEventObjectScript(struct MapPosition *position, u8 metat return NULL; // Look for an event object on the other side of the counter. - eventObjectId = GetEventObjectIdByXYZ(position->x + gUnknown_0821664C[direction].x, position->y + gUnknown_0821664C[direction].y, position->height); + eventObjectId = GetEventObjectIdByXYZ(position->x + gDirectionToVectors[direction].x, position->y + gDirectionToVectors[direction].y, position->height); if (eventObjectId == 16 || gEventObjects[eventObjectId].localId == 0xFF) return NULL; } @@ -680,7 +680,7 @@ static bool8 mapheader_run_first_tag2_script_list_match_conditionally(struct Map if (IsArrowWarpMetatileBehavior(metatileBehavior, direction) == TRUE && warpEventId != -1) { - walkrun_find_lowest_active_bit_in_bitfield(); + StoreInitialPlayerAvatarState(); sub_8068C30(&gMapHeader, warpEventId, position); sub_8080E88(); return TRUE; @@ -694,7 +694,7 @@ bool8 TryStartWarpEventScript(struct MapPosition *position, u16 metatileBehavior if (warpEventId != -1 && IsWarpMetatileBehavior(metatileBehavior) == TRUE) { - walkrun_find_lowest_active_bit_in_bitfield(); + StoreInitialPlayerAvatarState(); sub_8068C30(&gMapHeader, warpEventId, position); if (MetatileBehavior_IsEscalator(metatileBehavior) == TRUE) { @@ -798,7 +798,7 @@ static bool8 map_warp_consider_2_to_inside(struct MapPosition *position, u16 met warpEventId = FindWarpEventByPosition(&gMapHeader, position); if (warpEventId != -1 && IsWarpMetatileBehavior(metatileBehavior) == TRUE) { - walkrun_find_lowest_active_bit_in_bitfield(); + StoreInitialPlayerAvatarState(); sub_8068C30(&gMapHeader, warpEventId, position); sub_8080EF0(); return TRUE; @@ -894,7 +894,7 @@ bool8 dive_warp(struct MapPosition *position, u16 metatileBehavior) { if (SetDiveWarpEmerge(position->x - 7, position->y - 7)) { - walkrun_find_lowest_active_bit_in_bitfield(); + StoreInitialPlayerAvatarState(); sp13E_warp_to_last_warp(); PlaySE(SE_W291); return TRUE; @@ -904,7 +904,7 @@ bool8 dive_warp(struct MapPosition *position, u16 metatileBehavior) { if (SetDiveWarpDive(position->x - 7, position->y - 7)) { - walkrun_find_lowest_active_bit_in_bitfield(); + StoreInitialPlayerAvatarState(); sp13E_warp_to_last_warp(); PlaySE(SE_W291); return TRUE; |