Make constant values more explicit.

Fix mistake in z coordinate conversion
This commit is contained in:
duncanspumpkin 2019-12-21 12:22:59 +00:00
parent b34defa907
commit 521e5db4c2
3 changed files with 4 additions and 4 deletions

View File

@ -534,7 +534,7 @@ static void viewport_interaction_remove_footpath(TileElement* tileElement, Coord
{
if (tileElement2->GetType() == TILE_ELEMENT_TYPE_PATH && tileElement2->base_height == z)
{
footpath_remove({ mapCoords, z }, GAME_COMMAND_FLAG_APPLY);
footpath_remove({ mapCoords, z * 8 }, GAME_COMMAND_FLAG_APPLY);
break;
}
} while (!(tileElement2++)->IsLastForTile());

View File

@ -1002,7 +1002,7 @@ static void window_footpath_construct()
// already is lowered if we are building a downwards slope.
if (gFootpathConstructSlope == 2)
{
gFootpathConstructFromPosition.z += 2 * 8;
gFootpathConstructFromPosition.z += (2 * 8);
}
}
window_footpath_set_enabled_and_pressed_widgets();
@ -1228,7 +1228,7 @@ static void footpath_get_next_path_info(int32_t* type, CoordsXYZ& footpathLoc, i
*slope = gFootpathConstructDirection | TILE_ELEMENT_SLOPE_S_CORNER_UP;
if (gFootpathConstructSlope != 2)
{
footpathLoc.z -= 2 * 8;
footpathLoc.z -= (2 * 8);
*slope ^= TILE_ELEMENT_SLOPE_E_CORNER_UP;
}
}

View File

@ -190,7 +190,7 @@ money32 footpath_provisional_set(int32_t type, CoordsXYZ footpathLoc, int32_t sl
else
{
// Going up in the world!
virtual_floor_set_height(gFootpathProvisionalPosition.z + 2 * 8);
virtual_floor_set_height(gFootpathProvisionalPosition.z + (2 * 8));
}
}