mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-16 08:52:40 +01:00
Codechange: Replace macros GENERAL_SPRITE_COLOUR and COMPANY_SPRITE_COLOUR with functions GetColourPalette and GetCompanyPalette.
This commit is contained in:
@@ -1417,7 +1417,7 @@ void DrawRoadTypeCatenary(const TileInfo *ti, RoadType rt, RoadBits rb)
|
||||
/* Catenary uses 1st company colour to help identify owner.
|
||||
* For tiles with OWNER_TOWN or OWNER_NONE, recolour CC to grey as a neutral colour. */
|
||||
Owner owner = GetRoadOwner(ti->tile, GetRoadTramType(rt));
|
||||
PaletteID pal = (owner == OWNER_NONE || owner == OWNER_TOWN ? GENERAL_SPRITE_COLOUR(COLOUR_GREY) : COMPANY_SPRITE_COLOUR(owner));
|
||||
PaletteID pal = (owner == OWNER_NONE || owner == OWNER_TOWN ? GetColourPalette(COLOUR_GREY) : GetCompanyPalette(owner));
|
||||
int z_wires = (ti->tileh == SLOPE_FLAT ? 0 : TILE_HEIGHT) + BB_HEIGHT_UNDER_BRIDGE;
|
||||
if (back != 0) {
|
||||
/* The "back" sprite contains the west, north and east pillars.
|
||||
@@ -1814,7 +1814,7 @@ static void DrawTile_Road(TileInfo *ti)
|
||||
case ROAD_TILE_DEPOT: {
|
||||
if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, FOUNDATION_LEVELED);
|
||||
|
||||
PaletteID palette = COMPANY_SPRITE_COLOUR(GetTileOwner(ti->tile));
|
||||
PaletteID palette = GetCompanyPalette(GetTileOwner(ti->tile));
|
||||
|
||||
RoadType road_rt = GetRoadTypeRoad(ti->tile);
|
||||
RoadType tram_rt = GetRoadTypeTram(ti->tile);
|
||||
@@ -1867,7 +1867,7 @@ static void DrawTile_Road(TileInfo *ti)
|
||||
*/
|
||||
void DrawRoadDepotSprite(int x, int y, DiagDirection dir, RoadType rt)
|
||||
{
|
||||
PaletteID palette = COMPANY_SPRITE_COLOUR(_local_company);
|
||||
PaletteID palette = GetCompanyPalette(_local_company);
|
||||
|
||||
const RoadTypeInfo *rti = GetRoadTypeInfo(rt);
|
||||
int relocation = GetCustomRoadSprite(rti, INVALID_TILE, ROTSG_DEPOT);
|
||||
|
||||
Reference in New Issue
Block a user