Codechange: rename byte to uint8_t (#12308)

This commit is contained in:
Patric Stout
2024-03-16 23:59:32 +01:00
committed by GitHub
parent bd7120bae4
commit a3cfd23cf9
355 changed files with 1654 additions and 1656 deletions

View File

@@ -403,7 +403,7 @@ uint32_t GetTerrainType(TileIndex tile, TileContext context)
* @param axis Axis of a railways station.
* @return The tile at the offset.
*/
TileIndex GetNearbyTile(byte parameter, TileIndex tile, bool signed_offsets, Axis axis)
TileIndex GetNearbyTile(uint8_t parameter, TileIndex tile, bool signed_offsets, Axis axis)
{
int8_t x = GB(parameter, 0, 4);
int8_t y = GB(parameter, 4, 4);
@@ -435,7 +435,7 @@ uint32_t GetNearbyTileInformation(TileIndex tile, bool grf_version8)
auto [tileh, z] = GetTilePixelSlope(tile);
/* Return 0 if the tile is a land tile */
byte terrain_type = (HasTileWaterClass(tile) ? (GetWaterClass(tile) + 1) & 3 : 0) << 5 | GetTerrainType(tile) << 2 | (tile_type == MP_WATER ? 1 : 0) << 1;
uint8_t terrain_type = (HasTileWaterClass(tile) ? (GetWaterClass(tile) + 1) & 3 : 0) << 5 | GetTerrainType(tile) << 2 | (tile_type == MP_WATER ? 1 : 0) << 1;
if (grf_version8) z /= TILE_HEIGHT;
return tile_type << 24 | ClampTo<uint8_t>(z) << 16 | terrain_type << 8 | tileh;
}