diff --git a/grf/cmclient/cmclient-header.nml b/grf/cmclient/cmclient-header.nml index 744341d80c..246259289c 100644 --- a/grf/cmclient/cmclient-header.nml +++ b/grf/cmclient/cmclient-header.nml @@ -6,7 +6,15 @@ grf { min_compatible_version: 1; } -replace inner_highlight(10000, "sprites/innerhighlight00.png") { +replace toolbar(10000, "sprites/toolbar.png") { + [ 0, 0, 20, 14, 0, 0] +} + +alternative_sprites(toolbar, ZOOM_LEVEL_IN_2X, BIT_DEPTH_8BPP) { + [ 32, 0, 40, 40, 0, 0, "sprites/toolbar.png"] +} + +replace inner_highlight(10001, "sprites/innerhighlight00.png") { [ 18, 8, 64, 31, -31, 7] [ 98, 8, 64, 31, -31, 7] [178, 8, 64, 23, -31, 7] @@ -89,7 +97,7 @@ replace inner_highlight(10000, "sprites/innerhighlight00.png") { } } -replace border_highlight(10029, "sprites/borderhighlight.png") { +replace border_highlight(10030, "sprites/borderhighlight.png") { [ 10, 10, 64, 31, -31, 7] [ 84, 10, 64, 31, -31, 7] [ 158, 10, 64, 31, -31, 7] diff --git a/grf/cmclient/cmclient.nml b/grf/cmclient/cmclient.nml index 21b9e1bb8e..5d4061a6a0 100644 --- a/grf/cmclient/cmclient.nml +++ b/grf/cmclient/cmclient.nml @@ -6,7 +6,15 @@ grf { min_compatible_version: 1; } -replace inner_highlight(10000, "sprites/innerhighlight00.png") { +replace toolbar(10000, "sprites/toolbar.png") { + [ 0, 0, 20, 14, 0, 0] +} + +alternative_sprites(toolbar, ZOOM_LEVEL_IN_2X, BIT_DEPTH_8BPP) { + [ 32, 0, 40, 40, 0, 0, "sprites/toolbar.png"] +} + +replace inner_highlight(10001, "sprites/innerhighlight00.png") { [ 18, 8, 64, 31, -31, 7] [ 98, 8, 64, 31, -31, 7] [178, 8, 64, 23, -31, 7] @@ -89,7 +97,7 @@ replace inner_highlight(10000, "sprites/innerhighlight00.png") { } } -replace border_highlight(10029, "sprites/borderhighlight.png") { +replace border_highlight(10030, "sprites/borderhighlight.png") { [ 10, 10, 64, 31, -31, 7] [ 84, 10, 64, 31, -31, 7] [ 158, 10, 64, 31, -31, 7] diff --git a/grf/cmclient/sprites/toolbar.png b/grf/cmclient/sprites/toolbar.png new file mode 100644 index 0000000000..b98fe27df0 Binary files /dev/null and b/grf/cmclient/sprites/toolbar.png differ diff --git a/src/citymania/cm_blueprint.cpp b/src/citymania/cm_blueprint.cpp index 14a45d4d64..2871f55df3 100644 --- a/src/citymania/cm_blueprint.cpp +++ b/src/citymania/cm_blueprint.cpp @@ -215,9 +215,9 @@ std::multimap Blueprint::GetTiles(TileIndex tile for (auto &o: this->items) { auto otile = AddTileIndexDiffCWrap(tile, o.tdiff); - auto palette = PALETTE_TINT_WHITE; + auto palette = CM_PALETTE_TINT_WHITE; if (o.type != Item::Type::RAIL_SIGNAL && !CanBuild(GetBlueprintCommand(tile, o))) - palette = PALETTE_TINT_RED_DEEP; + palette = CM_PALETTE_TINT_RED_DEEP; switch(o.type) { case Item::Type::RAIL_TRACK: { @@ -244,8 +244,8 @@ std::multimap Blueprint::GetTiles(TileIndex tile case Item::Type::RAIL_STATION_PART: { auto layout_ptr = AllocaM(byte, (int)o.u.rail.station_part.numtracks * o.u.rail.station_part.plat_len); GetStationLayout(layout_ptr, o.u.rail.station_part.numtracks, o.u.rail.station_part.plat_len, nullptr); - if (palette == PALETTE_TINT_WHITE && can_build_station_sign.find(o.u.rail.station_part.id) == can_build_station_sign.end()) - palette = PALETTE_TINT_ORANGE_DEEP; + if (palette == CM_PALETTE_TINT_WHITE && can_build_station_sign.find(o.u.rail.station_part.id) == can_build_station_sign.end()) + palette = CM_PALETTE_TINT_ORANGE_DEEP; IterateStation(otile, o.u.rail.station_part.axis, o.u.rail.station_part.numtracks, o.u.rail.station_part.plat_len, [&](TileIndex tile) { byte layout = *layout_ptr++; @@ -255,7 +255,7 @@ std::multimap Blueprint::GetTiles(TileIndex tile break; } case Item::Type::RAIL_SIGNAL: - add_tile(otile, ObjectTileHighlight::make_rail_signal(PALETTE_TINT_WHITE, o.u.rail.signal.pos, o.u.rail.signal.type, o.u.rail.signal.variant)); + add_tile(otile, ObjectTileHighlight::make_rail_signal(CM_PALETTE_TINT_WHITE, o.u.rail.signal.pos, o.u.rail.signal.type, o.u.rail.signal.variant)); break; case Item::Type::RAIL_STATION: break; @@ -590,7 +590,7 @@ void SetBlueprintHighlight(const TileInfo *ti, TileHighlight &th) { return; if (_active_blueprint.second->HasSourceTile(ti->tile)) { - th.ground_pal = th.structure_pal = PALETTE_TINT_BLUE; + th.ground_pal = th.structure_pal = CM_PALETTE_TINT_BLUE; } } diff --git a/src/citymania/cm_highlight.cpp b/src/citymania/cm_highlight.cpp index bcf4e36e56..b50843a47a 100644 --- a/src/citymania/cm_highlight.cpp +++ b/src/citymania/cm_highlight.cpp @@ -240,7 +240,7 @@ void ObjectHighlight::PlaceExtraDepotRail(TileIndex tile, DiagDirection dir, Tra if (GetRailTileType(tile) != RAIL_TILE_NORMAL) return; if ((GetTrackBits(tile) & DiagdirReachesTracks(dir)) == 0) return; - this->tiles.insert(std::make_pair(tile, ObjectTileHighlight::make_rail_track(PALETTE_TINT_WHITE, track))); + this->tiles.insert(std::make_pair(tile, ObjectTileHighlight::make_rail_track(CM_PALETTE_TINT_WHITE, track))); } /** Additional pieces of track to add at the entrance of a depot. */ @@ -288,7 +288,7 @@ void ObjectHighlight::UpdateTiles() { _cur_railtype, dir, CMD_BUILD_TRAIN_DEPOT - ) ? PALETTE_TINT_WHITE : PALETTE_TINT_RED_DEEP); + ) ? CM_PALETTE_TINT_WHITE : CM_PALETTE_TINT_RED_DEEP); this->tiles.insert(std::make_pair(this->tile, ObjectTileHighlight::make_rail_depot(palette, dir))); auto tile = this->tile + TileOffsByDiagDir(dir); @@ -313,7 +313,7 @@ void ObjectHighlight::UpdateTiles() { | ((uint32)plat_len << 16), NEW_STATION << 16, CMD_BUILD_RAIL_STATION - ) ? PALETTE_TINT_WHITE : PALETTE_TINT_RED_DEEP); + ) ? CM_PALETTE_TINT_WHITE : CM_PALETTE_TINT_RED_DEEP); auto layout_ptr = AllocaM(byte, (int)numtracks * plat_len); GetStationLayout(layout_ptr, numtracks, plat_len, nullptr); // TODO statspec @@ -340,7 +340,7 @@ void ObjectHighlight::UpdateTiles() { (uint32)(ta.w | ta.h << 8), (this->is_truck ? 1 : 0) | (this->ddir >= DIAGDIR_END ? 2 : 0) | (((uint)this->ddir % 4) << 3) | (NEW_STATION << 16), CMD_BUILD_ROAD_STOP - ) ? PALETTE_TINT_WHITE : PALETTE_TINT_RED_DEEP); + ) ? CM_PALETTE_TINT_WHITE : CM_PALETTE_TINT_RED_DEEP); TileIndex tile; for (TileIndex tile : ta) { this->tiles.insert(std::make_pair(tile, ObjectTileHighlight::make_road_stop(palette, this->roadtype, this->ddir, this->is_truck))); @@ -354,7 +354,7 @@ void ObjectHighlight::UpdateTiles() { this->roadtype << 2 | this->ddir, 0, CMD_BUILD_ROAD_DEPOT - ) ? PALETTE_TINT_WHITE : PALETTE_TINT_RED_DEEP); + ) ? CM_PALETTE_TINT_WHITE : CM_PALETTE_TINT_RED_DEEP); this->tiles.insert(std::make_pair(this->tile, ObjectTileHighlight::make_road_depot(palette, this->roadtype, this->ddir))); break; } @@ -365,7 +365,7 @@ void ObjectHighlight::UpdateTiles() { this->airport_type | ((uint)this->airport_layout << 8), 1 | (NEW_STATION << 16), CMD_BUILD_AIRPORT - ) ? PALETTE_TINT_WHITE : PALETTE_TINT_RED_DEEP); + ) ? CM_PALETTE_TINT_WHITE : CM_PALETTE_TINT_RED_DEEP); const AirportSpec *as = AirportSpec::Get(this->airport_type); if (!as->IsAvailable() || this->airport_layout >= as->num_table) break; @@ -403,36 +403,36 @@ void ObjectHighlight::MarkDirty() { SpriteID GetTintBySelectionColour(SpriteID colour, bool deep=false) { switch(colour) { - case SPR_PALETTE_ZONING_RED: return (deep ? PALETTE_TINT_RED_DEEP : PALETTE_TINT_RED); - case SPR_PALETTE_ZONING_ORANGE: return (deep ? PALETTE_TINT_ORANGE_DEEP : PALETTE_TINT_ORANGE); - case SPR_PALETTE_ZONING_GREEN: return (deep ? PALETTE_TINT_GREEN_DEEP : PALETTE_TINT_GREEN); - case SPR_PALETTE_ZONING_LIGHT_BLUE: return (deep ? PALETTE_TINT_CYAN_DEEP : PALETTE_TINT_CYAN); - case SPR_PALETTE_ZONING_YELLOW: return PALETTE_TINT_YELLOW; + case CM_SPR_PALETTE_ZONING_RED: return (deep ? CM_PALETTE_TINT_RED_DEEP : CM_PALETTE_TINT_RED); + case CM_SPR_PALETTE_ZONING_ORANGE: return (deep ? CM_PALETTE_TINT_ORANGE_DEEP : CM_PALETTE_TINT_ORANGE); + case CM_SPR_PALETTE_ZONING_GREEN: return (deep ? CM_PALETTE_TINT_GREEN_DEEP : CM_PALETTE_TINT_GREEN); + case CM_SPR_PALETTE_ZONING_LIGHT_BLUE: return (deep ? CM_PALETTE_TINT_CYAN_DEEP : CM_PALETTE_TINT_CYAN); + case CM_SPR_PALETTE_ZONING_YELLOW: return CM_PALETTE_TINT_YELLOW; // case SPR_PALETTE_ZONING__: return PALETTE_TINT_YELLOW_WHITE; - case SPR_PALETTE_ZONING_WHITE: return PALETTE_TINT_WHITE; + case CM_SPR_PALETTE_ZONING_WHITE: return CM_PALETTE_TINT_WHITE; default: return PAL_NONE; } } SpriteID GetSelectionColourByTint(SpriteID colour) { switch(colour) { - case PALETTE_TINT_RED_DEEP: - case PALETTE_TINT_RED: - return SPR_PALETTE_ZONING_RED; - case PALETTE_TINT_ORANGE_DEEP: - case PALETTE_TINT_ORANGE: - return SPR_PALETTE_ZONING_ORANGE; - case PALETTE_TINT_GREEN_DEEP: - case PALETTE_TINT_GREEN: - return SPR_PALETTE_ZONING_GREEN; - case PALETTE_TINT_CYAN_DEEP: - case PALETTE_TINT_CYAN: - return SPR_PALETTE_ZONING_LIGHT_BLUE; - case PALETTE_TINT_YELLOW: - return SPR_PALETTE_ZONING_YELLOW; + case CM_PALETTE_TINT_RED_DEEP: + case CM_PALETTE_TINT_RED: + return CM_SPR_PALETTE_ZONING_RED; + case CM_PALETTE_TINT_ORANGE_DEEP: + case CM_PALETTE_TINT_ORANGE: + return CM_SPR_PALETTE_ZONING_ORANGE; + case CM_PALETTE_TINT_GREEN_DEEP: + case CM_PALETTE_TINT_GREEN: + return CM_SPR_PALETTE_ZONING_GREEN; + case CM_PALETTE_TINT_CYAN_DEEP: + case CM_PALETTE_TINT_CYAN: + return CM_SPR_PALETTE_ZONING_LIGHT_BLUE; + case CM_PALETTE_TINT_YELLOW: + return CM_SPR_PALETTE_ZONING_YELLOW; // returnase SPR_PALETTE_ZONING__: return PALETTE_TINT_YELLOW_WHITE; - case PALETTE_TINT_WHITE: - return SPR_PALETTE_ZONING_WHITE; + case CM_PALETTE_TINT_WHITE: + return CM_SPR_PALETTE_ZONING_WHITE; default: return PAL_NONE; } } @@ -872,7 +872,7 @@ bool CanBuildIndustryOnTileCached(IndustryType type, TileIndex tile) { void DrawBorderSprites(const TileInfo *ti, ZoningBorder border, SpriteID color) { auto b = (uint8)border & 15; - auto tile_sprite = SPR_BORDER_HIGHLIGHT_BASE + _tileh_to_sprite[ti->tileh] * 19; + auto tile_sprite = CM_SPR_BORDER_HIGHLIGHT_BASE + _tileh_to_sprite[ti->tileh] * 19; if (b) { DrawSelectionSprite(tile_sprite + b - 1, color, ti, 7, FOUNDATION_PART_NORMAL); } @@ -899,7 +899,7 @@ SpriteID GetIndustryZoningPalette(TileIndex tile) { n_serviced++; } if (n_serviced < n_produced) - return (n_serviced == 0 ? PALETTE_TINT_RED_DEEP : PALETTE_TINT_ORANGE_DEEP); + return (n_serviced == 0 ? CM_PALETTE_TINT_RED_DEEP : CM_PALETTE_TINT_ORANGE_DEEP); return PAL_NONE; } @@ -919,11 +919,11 @@ static void SetStationSelectionHighlight(const TileInfo *ti, TileHighlight &th) return IsInsideSelectedRectangle(x, y); }); if (b.first != ZoningBorder::NONE) - th.add_border(b.first, SPR_PALETTE_ZONING_RED); + th.add_border(b.first, CM_SPR_PALETTE_ZONING_RED); } if (IsInsideSelectedRectangle(TileX(ti->tile) * TILE_SIZE, TileY(ti->tile) * TILE_SIZE)) { // th.ground_pal = GetTintBySelectionColour(color); - th.ground_pal = th.structure_pal = (_thd.make_square_red ? PALETTE_TINT_RED : PAL_NONE); + th.ground_pal = th.structure_pal = (_thd.make_square_red ? CM_PALETTE_TINT_RED : PAL_NONE); return; } } @@ -939,9 +939,9 @@ static void SetStationSelectionHighlight(const TileInfo *ti, TileHighlight &th) auto b = CalcTileBorders(ti->tile, coverage_getter); if (b.second) { // const SpriteID pal[] = {PAL_NONE, SPR_PALETTE_ZONING_WHITE, SPR_PALETTE_ZONING_LIGHT_BLUE}; - const SpriteID pal[] = {PAL_NONE, SPR_PALETTE_ZONING_WHITE, PAL_NONE}; + const SpriteID pal[] = {PAL_NONE, CM_SPR_PALETTE_ZONING_WHITE, PAL_NONE}; th.add_border(b.first, pal[b.second]); - const SpriteID pal2[] = {PAL_NONE, PALETTE_TINT_WHITE, PALETTE_TINT_BLUE}; + const SpriteID pal2[] = {PAL_NONE, CM_PALETTE_TINT_WHITE, CM_PALETTE_TINT_BLUE}; th.ground_pal = th.structure_pal = pal2[b.second]; } @@ -949,12 +949,12 @@ static void SetStationSelectionHighlight(const TileInfo *ti, TileHighlight &th) auto b = CalcTileBorders(ti->tile, [](TileIndex t) { return _highlight_join_area.Contains(t) ? 1 : 0; }); - th.add_border(b.first, SPR_PALETTE_ZONING_LIGHT_BLUE); + th.add_border(b.first, CM_SPR_PALETTE_ZONING_LIGHT_BLUE); if (b.second) { switch (th.ground_pal) { - case PALETTE_TINT_WHITE: th.ground_pal = th.structure_pal = PALETTE_TINT_CYAN_WHITE; break; - case PALETTE_TINT_BLUE: break; - default: th.ground_pal = th.structure_pal = PALETTE_TINT_CYAN; break; + case CM_PALETTE_TINT_WHITE: th.ground_pal = th.structure_pal = CM_PALETTE_TINT_CYAN_WHITE; break; + case CM_PALETTE_TINT_BLUE: break; + default: th.ground_pal = th.structure_pal = CM_PALETTE_TINT_CYAN; break; } } } @@ -1036,42 +1036,42 @@ TileHighlight GetTileHighlight(const TileInfo *ti) { auto color = PAL_NONE; switch (p.second) { default: break; // Tz0 - case 1: color = SPR_PALETTE_ZONING_WHITE; break; // Tz0 - case 2: color = SPR_PALETTE_ZONING_YELLOW; break; // Tz1 - case 3: color = SPR_PALETTE_ZONING_ORANGE; break; // Tz2 - case 4: color = SPR_PALETTE_ZONING_ORANGE; break; // Tz3 - case 5: color = SPR_PALETTE_ZONING_RED; break; // Tz4 - center + case 1: color = CM_SPR_PALETTE_ZONING_WHITE; break; // Tz0 + case 2: color = CM_SPR_PALETTE_ZONING_YELLOW; break; // Tz1 + case 3: color = CM_SPR_PALETTE_ZONING_ORANGE; break; // Tz2 + case 4: color = CM_SPR_PALETTE_ZONING_ORANGE; break; // Tz3 + case 5: color = CM_SPR_PALETTE_ZONING_RED; break; // Tz4 - center }; th.add_border(p.first, color); th.ground_pal = th.structure_pal = GetTintBySelectionColour(color); if (CB_Enabled()) - CalcCBTownLimitBorder(th, ti->tile, SPR_PALETTE_ZONING_RED, PAL_NONE); + CalcCBTownLimitBorder(th, ti->tile, CM_SPR_PALETTE_ZONING_RED, PAL_NONE); } else if (_zoning.outer == CHECKSTACATCH) { th.add_border(citymania::GetAnyStationCatchmentBorder(ti->tile), - SPR_PALETTE_ZONING_LIGHT_BLUE); + CM_SPR_PALETTE_ZONING_LIGHT_BLUE); } else if (_zoning.outer == CHECKTOWNGROWTHTILES) { // if (tgt == TGTS_NEW_HOUSE) th.sprite = SPR_IMG_HOUSE_NEW; switch (_game->get_town_growth_tile(ti->tile)) { // case TGTS_CB_HOUSE_REMOVED_NOGROW: case TownGrowthTileState::RH_REMOVED: - th.selection = SPR_PALETTE_ZONING_LIGHT_BLUE; + th.selection = CM_SPR_PALETTE_ZONING_LIGHT_BLUE; break; case TownGrowthTileState::RH_REBUILT: - th.selection = SPR_PALETTE_ZONING_WHITE; - th.structure_pal = PALETTE_TINT_WHITE; + th.selection = CM_SPR_PALETTE_ZONING_WHITE; + th.structure_pal = CM_PALETTE_TINT_WHITE; break; case TownGrowthTileState::NEW_HOUSE: - th.selection = SPR_PALETTE_ZONING_GREEN; - th.structure_pal = PALETTE_TINT_GREEN; + th.selection = CM_SPR_PALETTE_ZONING_GREEN; + th.structure_pal = CM_PALETTE_TINT_GREEN; break; case TownGrowthTileState::CS: - th.selection = SPR_PALETTE_ZONING_ORANGE; + th.selection = CM_SPR_PALETTE_ZONING_ORANGE; break; case TownGrowthTileState::HS: - th.selection = SPR_PALETTE_ZONING_YELLOW; + th.selection = CM_SPR_PALETTE_ZONING_YELLOW; break; case TownGrowthTileState::HR: - th.selection = SPR_PALETTE_ZONING_RED; + th.selection = CM_SPR_PALETTE_ZONING_RED; break; default: th.selection = PAL_NONE; } @@ -1082,15 +1082,15 @@ TileHighlight GetTileHighlight(const TileInfo *ti) { // TODO check cargos if (stations.GetStations()->empty()) - th.ground_pal = th.structure_pal = PALETTE_TINT_RED_DEEP; + th.ground_pal = th.structure_pal = CM_PALETTE_TINT_RED_DEEP; } } else if (_zoning.outer == CHECKINDUNSER) { auto pal = GetIndustryZoningPalette(ti->tile); - if (pal) th.ground_pal = th.structure_pal = PALETTE_TINT_RED_DEEP; + if (pal) th.ground_pal = th.structure_pal = CM_PALETTE_TINT_RED_DEEP; } else if (_zoning.outer == CHECKTOWNADZONES) { auto getter = [](TileIndex t) { return _mz[t].advertisement_zone; }; auto b = CalcTileBorders(ti->tile, getter); - const SpriteID pal[] = {PAL_NONE, SPR_PALETTE_ZONING_YELLOW, SPR_PALETTE_ZONING_ORANGE, SPR_PALETTE_ZONING_RED}; + const SpriteID pal[] = {PAL_NONE, CM_SPR_PALETTE_ZONING_YELLOW, CM_SPR_PALETTE_ZONING_ORANGE, CM_SPR_PALETTE_ZONING_RED}; th.add_border(b.first, pal[b.second]); auto check_tile = ti->tile; if (IsTileType (ti->tile, MP_STATION)) { @@ -1100,9 +1100,9 @@ TileHighlight GetTileHighlight(const TileInfo *ti) { auto z = getter(check_tile); if (z) th.ground_pal = th.structure_pal = GetTintBySelectionColour(pal[z]); } else if (_zoning.outer == CHECKCBACCEPTANCE) { - CalcCBAcceptanceBorders(th, ti->tile, SPR_PALETTE_ZONING_WHITE, PALETTE_TINT_WHITE); + CalcCBAcceptanceBorders(th, ti->tile, CM_SPR_PALETTE_ZONING_WHITE, CM_PALETTE_TINT_WHITE); } else if (_zoning.outer == CHECKCBTOWNLIMIT) { - CalcCBTownLimitBorder(th, ti->tile, SPR_PALETTE_ZONING_WHITE, PALETTE_TINT_WHITE); + CalcCBTownLimitBorder(th, ti->tile, CM_SPR_PALETTE_ZONING_WHITE, CM_PALETTE_TINT_WHITE); } else if (_zoning.outer == CHECKACTIVESTATIONS) { auto getter = [](TileIndex t) { if (!IsTileType (t, MP_STATION)) return 0; @@ -1113,7 +1113,7 @@ TileHighlight GetTileHighlight(const TileInfo *ti) { return 2; }; auto b = CalcTileBorders(ti->tile, getter); - const SpriteID pal[] = {PAL_NONE, SPR_PALETTE_ZONING_GREEN, SPR_PALETTE_ZONING_RED}; + const SpriteID pal[] = {PAL_NONE, CM_SPR_PALETTE_ZONING_GREEN, CM_SPR_PALETTE_ZONING_RED}; th.add_border(b.first, pal[b.second]); auto z = getter(ti->tile); if (z) th.ground_pal = th.structure_pal = GetTintBySelectionColour(pal[z]); @@ -1122,9 +1122,9 @@ TileHighlight GetTileHighlight(const TileInfo *ti) { if (_settings_client.gui.cm_show_industry_forbidden_tiles && _industry_forbidden_tiles != INVALID_INDUSTRYTYPE) { auto b = CalcTileBorders(ti->tile, [](TileIndex t) { return !CanBuildIndustryOnTileCached(_industry_forbidden_tiles, t); }); - th.add_border(b.first, SPR_PALETTE_ZONING_RED); + th.add_border(b.first, CM_SPR_PALETTE_ZONING_RED); if (!CanBuildIndustryOnTileCached(_industry_forbidden_tiles, ti->tile)) - th.ground_pal = th.structure_pal = PALETTE_TINT_RED; + th.ground_pal = th.structure_pal = CM_PALETTE_TINT_RED; } SetStationSelectionHighlight(ti, th); @@ -1407,31 +1407,31 @@ PaletteID GetTreeShadePal(TileIndex tile) { switch (slope) { case SLOPE_STEEP_N: case SLOPE_N: - return PALETTE_SHADE_S; + return CM_PALETTE_SHADE_S; case SLOPE_NE: - return PALETTE_SHADE_SW; + return CM_PALETTE_SHADE_SW; case SLOPE_E: case SLOPE_STEEP_E: - return PALETTE_SHADE_W; + return CM_PALETTE_SHADE_W; case SLOPE_SE: - return PALETTE_SHADE_NW; + return CM_PALETTE_SHADE_NW; case SLOPE_STEEP_S: case SLOPE_S: - return PALETTE_SHADE_N; + return CM_PALETTE_SHADE_N; case SLOPE_SW: - return PALETTE_SHADE_NE; + return CM_PALETTE_SHADE_NE; case SLOPE_STEEP_W: case SLOPE_W: - return PALETTE_SHADE_E; + return CM_PALETTE_SHADE_E; case SLOPE_NW: - return PALETTE_SHADE_SE; + return CM_PALETTE_SHADE_SE; default: return PAL_NONE; diff --git a/src/citymania/cm_zoning_cmd.cpp b/src/citymania/cm_zoning_cmd.cpp index 760f235ead..e97da18cdb 100644 --- a/src/citymania/cm_zoning_cmd.cpp +++ b/src/citymania/cm_zoning_cmd.cpp @@ -170,16 +170,16 @@ SpriteID TileZoneCheckOpinionEvaluation(TileIndex tile, Owner owner) { if (town == NULL) return INVALID_SPRITE_ID; // no town else if (HasBit(town->have_ratings, owner)) { // good : bad int16 rating = town->ratings[owner]; - if(rating <= RATING_APPALLING) return SPR_PALETTE_ZONING_RED; - if(rating <= RATING_POOR) return SPR_PALETTE_ZONING_ORANGE; - if(rating <= RATING_MEDIOCRE) return SPR_PALETTE_ZONING_YELLOW; - if(rating <= RATING_GOOD) return SPR_PALETTE_ZONING_WHITE; - if(rating <= RATING_VERYGOOD) return SPR_PALETTE_ZONING_PURPLE; - if(rating <= RATING_EXCELLENT) return SPR_PALETTE_ZONING_LIGHT_BLUE; - return SPR_PALETTE_ZONING_GREEN; + if(rating <= RATING_APPALLING) return CM_SPR_PALETTE_ZONING_RED; + if(rating <= RATING_POOR) return CM_SPR_PALETTE_ZONING_ORANGE; + if(rating <= RATING_MEDIOCRE) return CM_SPR_PALETTE_ZONING_YELLOW; + if(rating <= RATING_GOOD) return CM_SPR_PALETTE_ZONING_WHITE; + if(rating <= RATING_VERYGOOD) return CM_SPR_PALETTE_ZONING_PURPLE; + if(rating <= RATING_EXCELLENT) return CM_SPR_PALETTE_ZONING_LIGHT_BLUE; + return CM_SPR_PALETTE_ZONING_GREEN; } else { - return SPR_PALETTE_ZONING_BLACK; // no opinion + return CM_SPR_PALETTE_ZONING_BLACK; // no opinion } } @@ -190,12 +190,12 @@ SpriteID TileZoneCheckBuildEvaluation(TileIndex tile, Owner owner) { case MP_INDUSTRY: case MP_OBJECT: case MP_HOUSE: - return SPR_PALETTE_ZONING_RED; //can't build + return CM_SPR_PALETTE_ZONING_RED; //can't build case MP_STATION: case MP_TUNNELBRIDGE: case MP_ROAD: case MP_RAILWAY: { - if (GetTileOwner(tile) != owner) return SPR_PALETTE_ZONING_RED; //can't build + if (GetTileOwner(tile) != owner) return CM_SPR_PALETTE_ZONING_RED; //can't build else return INVALID_SPRITE_ID; } default: return INVALID_SPRITE_ID; @@ -226,7 +226,7 @@ SpriteID TileZoneCheckUnservedBuildingsEvaluation(TileIndex tile) { if (!stations.GetStations()->empty()) { return INVALID_SPRITE_ID; } - return SPR_PALETTE_ZONING_RED; + return CM_SPR_PALETTE_ZONING_RED; } return INVALID_SPRITE_ID; } @@ -242,7 +242,7 @@ SpriteID TileZoneCheckUnservedIndustriesEvaluation(TileIndex tile) { return INVALID_SPRITE_ID; } - return SPR_PALETTE_ZONING_RED; + return CM_SPR_PALETTE_ZONING_RED; } return INVALID_SPRITE_ID; } @@ -264,11 +264,11 @@ SpriteID TileZoneCheckTownZones(TileIndex tile) { } switch (tz) { - case HZB_TOWN_EDGE: return SPR_PALETTE_ZONING_LIGHT_BLUE; // Tz0 - case HZB_TOWN_OUTSKIRT: return SPR_PALETTE_ZONING_RED; // Tz1 - case HZB_TOWN_OUTER_SUBURB: return SPR_PALETTE_ZONING_YELLOW; // Tz2 - case HZB_TOWN_INNER_SUBURB: return SPR_PALETTE_ZONING_GREEN; // Tz3 - case HZB_TOWN_CENTRE: return SPR_PALETTE_ZONING_WHITE; // Tz4 - center + case HZB_TOWN_EDGE: return CM_SPR_PALETTE_ZONING_LIGHT_BLUE; // Tz0 + case HZB_TOWN_OUTSKIRT: return CM_SPR_PALETTE_ZONING_RED; // Tz1 + case HZB_TOWN_OUTER_SUBURB: return CM_SPR_PALETTE_ZONING_YELLOW; // Tz2 + case HZB_TOWN_INNER_SUBURB: return CM_SPR_PALETTE_ZONING_GREEN; // Tz3 + case HZB_TOWN_CENTRE: return CM_SPR_PALETTE_ZONING_WHITE; // Tz4 - center default: return INVALID_SPRITE_ID; // no town } return INVALID_SPRITE_ID; @@ -278,7 +278,7 @@ SpriteID TileZoneCheckTownZones(TileIndex tile) { SpriteID TileZoneCheckNewCBBorders(TileIndex tile) { for (Town *town : Town::Iterate()) { if (DistanceSquare(tile, town->xy) <= town->cache.squared_town_zone_radius[0] + 30) - return SPR_PALETTE_ZONING_BLACK; + return CM_SPR_PALETTE_ZONING_BLACK; } return INVALID_SPRITE_ID; } @@ -287,7 +287,7 @@ SpriteID TileZoneCheckNewCBBorders(TileIndex tile) { SpriteID TileZoneCheckCBBorders(TileIndex tile) { for (Town *town : Town::Iterate()) { if (DistanceMax(town->xy, tile) <= _settings_client.gui.cm_cb_distance) - return SPR_PALETTE_ZONING_LIGHT_BLUE; + return CM_SPR_PALETTE_ZONING_LIGHT_BLUE; } return INVALID_SPRITE_ID; // no town } @@ -297,7 +297,7 @@ SpriteID TileZoneCheckCBTownBorders(TileIndex tile) { for (Town *town : Town::Iterate()) { uint32 distMax = DistanceMax(town->xy, tile); if (distMax * distMax < town->cache.squared_town_zone_radius[0]){ - return SPR_PALETTE_ZONING_GREEN; + return CM_SPR_PALETTE_ZONING_GREEN; } } return INVALID_SPRITE_ID; @@ -310,9 +310,9 @@ SpriteID TileZoneCheckTownAdvertisementZones(TileIndex tile) { uint dist = DistanceManhattan(town->xy, tile); - if (dist <= 10) return SPR_PALETTE_ZONING_GREEN; - if (dist <= 15) return SPR_PALETTE_ZONING_YELLOW; - if (dist <= 20) return SPR_PALETTE_ZONING_LIGHT_BLUE; + if (dist <= 10) return CM_SPR_PALETTE_ZONING_GREEN; + if (dist <= 15) return CM_SPR_PALETTE_ZONING_YELLOW; + if (dist <= 20) return CM_SPR_PALETTE_ZONING_LIGHT_BLUE; return INVALID_SPRITE_ID; } @@ -320,12 +320,12 @@ SpriteID TileZoneCheckTownAdvertisementZones(TileIndex tile) { SpriteID TileZoneCheckTownsGrowthTiles(TileIndex tile) { switch (citymania::_game->get_town_growth_tile(tile)) { // case TGTS_CB_HOUSE_REMOVED_NOGROW: return SPR_PALETTE_ZONING_LIGHT_BLUE; - case citymania::TownGrowthTileState::RH_REMOVED: return SPR_PALETTE_ZONING_LIGHT_BLUE; - case citymania::TownGrowthTileState::RH_REBUILT: return SPR_PALETTE_ZONING_WHITE; - case citymania::TownGrowthTileState::NEW_HOUSE: return SPR_PALETTE_ZONING_GREEN; - case citymania::TownGrowthTileState::CS: return SPR_PALETTE_ZONING_ORANGE; - case citymania::TownGrowthTileState::HS: return SPR_PALETTE_ZONING_YELLOW; - case citymania::TownGrowthTileState::HR: return SPR_PALETTE_ZONING_RED; + case citymania::TownGrowthTileState::RH_REMOVED: return CM_SPR_PALETTE_ZONING_LIGHT_BLUE; + case citymania::TownGrowthTileState::RH_REBUILT: return CM_SPR_PALETTE_ZONING_WHITE; + case citymania::TownGrowthTileState::NEW_HOUSE: return CM_SPR_PALETTE_ZONING_GREEN; + case citymania::TownGrowthTileState::CS: return CM_SPR_PALETTE_ZONING_ORANGE; + case citymania::TownGrowthTileState::HS: return CM_SPR_PALETTE_ZONING_YELLOW; + case citymania::TownGrowthTileState::HR: return CM_SPR_PALETTE_ZONING_RED; default: return INVALID_SPRITE_ID; } } @@ -343,10 +343,10 @@ SpriteID TileZoneCheckActiveStations(TileIndex tile) { } if (st->time_since_load <= 20 || st->time_since_unload <= 20) { - return SPR_PALETTE_ZONING_GREEN; + return CM_SPR_PALETTE_ZONING_GREEN; } - return SPR_PALETTE_ZONING_RED; + return CM_SPR_PALETTE_ZONING_RED; } @@ -378,18 +378,18 @@ SpriteID TileZoningSpriteEvaluation(TileIndex tile, Owner owner, EvaluationMode SpriteID GetTownZoneBorderColor(uint8 zone) { switch (zone) { - default: return SPR_PALETTE_ZONING_WHITE; // Tz0 - case 2: return SPR_PALETTE_ZONING_YELLOW; // Tz1 - case 3: return SPR_PALETTE_ZONING_ORANGE; // Tz2 - case 4: return SPR_PALETTE_ZONING_ORANGE; // Tz3 - case 5: return SPR_PALETTE_ZONING_RED; // Tz4 - center + default: return CM_SPR_PALETTE_ZONING_WHITE; // Tz0 + case 2: return CM_SPR_PALETTE_ZONING_YELLOW; // Tz1 + case 3: return CM_SPR_PALETTE_ZONING_ORANGE; // Tz2 + case 4: return CM_SPR_PALETTE_ZONING_ORANGE; // Tz3 + case 5: return CM_SPR_PALETTE_ZONING_RED; // Tz4 - center }; switch (zone) { - default: return SPR_PALETTE_ZONING_LIGHT_BLUE; // Tz0 - case 2: return SPR_PALETTE_ZONING_RED; // Tz1 - case 3: return SPR_PALETTE_ZONING_YELLOW; // Tz2 - case 4: return SPR_PALETTE_ZONING_GREEN; // Tz3 - case 5: return SPR_PALETTE_ZONING_WHITE; // Tz4 - center + default: return CM_SPR_PALETTE_ZONING_LIGHT_BLUE; // Tz0 + case 2: return CM_SPR_PALETTE_ZONING_RED; // Tz1 + case 3: return CM_SPR_PALETTE_ZONING_YELLOW; // Tz2 + case 4: return CM_SPR_PALETTE_ZONING_GREEN; // Tz3 + case 5: return CM_SPR_PALETTE_ZONING_WHITE; // Tz4 - center }; } @@ -419,7 +419,7 @@ void DrawTileZoning(const TileInfo *ti) { } } if (_zoning.inner != CHECKNOTHING){ - DrawZoningSprites(SPR_INNER_HIGHLIGHT_BASE, TileZoningSpriteEvaluation(ti->tile, _local_company, _zoning.inner), ti); + DrawZoningSprites(CM_SPR_INNER_HIGHLIGHT_BASE, TileZoningSpriteEvaluation(ti->tile, _local_company, _zoning.inner), ti); } } diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp index 67d8baee51..0a44ad77d0 100644 --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -182,7 +182,7 @@ static void LoadSpriteTables() PAL_DOS != used_set->palette ); } - LoadGrfFile("cmclient-3.grf", SPR_INNER_HIGHLIGHT_BASE - 4, PAL_DOS != used_set->palette); + LoadGrfFile("cmclient-4.grf", CM_SPR_CITYMANIA_BASE - 4, PAL_DOS != used_set->palette); /* Initialize the unicode to sprite mapping table */ InitializeUnicodeGlyphMap(); diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 4308cab02e..419e400b49 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -1059,7 +1059,7 @@ static const NWidgetPart _nested_build_rail_widgets[] = { NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_RAT_BUILD_TUNNEL), SetFill(0, 1), SetMinimalSize(20, 22), SetDataTip(SPR_IMG_TUNNEL_RAIL, STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, CM_WID_RAT_BLUEPRINT), - SetFill(0, 1), SetMinimalSize(20, 22), SetDataTip(SPR_IMG_BUY_LAND, STR_CM_RAIL_TOOLBAR_TOOLTIP_BLUEPRINT), + SetFill(0, 1), SetMinimalSize(20, 22), SetDataTip(CM_SPR_RAIL_COPY_PASTE, STR_CM_RAIL_TOOLBAR_TOOLTIP_BLUEPRINT), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_RAT_REMOVE), SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_REMOVE, STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR), NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_RAT_CONVERT_RAIL), diff --git a/src/table/sprites.h b/src/table/sprites.h index a86134670b..bc2ae29c9c 100644 --- a/src/table/sprites.h +++ b/src/table/sprites.h @@ -310,48 +310,50 @@ static const SpriteID SPR_PALETTE_BASE = SPR_EMPTY_BOUNDING_BOX + EMPTY_BOUNDING static const uint16 PALETTE_SPRITE_COUNT = 1; /* zoning stuff */ -static const SpriteID SPR_INNER_HIGHLIGHT_BASE = SPR_PALETTE_BASE + PALETTE_SPRITE_COUNT; -static const SpriteID SPR_IMG_COMPANY_CARGO = SPR_INNER_HIGHLIGHT_BASE + 19; -static const SpriteID SPR_IMG_COMPANY_GOAL = SPR_INNER_HIGHLIGHT_BASE + 20; -static const SpriteID SPR_IMG_HOUSE_NEW = SPR_INNER_HIGHLIGHT_BASE + 21; -static const SpriteID SPR_PALETTE_ZONING_RED = SPR_INNER_HIGHLIGHT_BASE + 22; -static const SpriteID SPR_PALETTE_ZONING_GREEN = SPR_INNER_HIGHLIGHT_BASE + 23; -static const SpriteID SPR_PALETTE_ZONING_BLACK = SPR_INNER_HIGHLIGHT_BASE + 24; -static const SpriteID SPR_PALETTE_ZONING_LIGHT_BLUE = SPR_INNER_HIGHLIGHT_BASE + 25; -static const SpriteID SPR_PALETTE_ZONING_ORANGE = SPR_INNER_HIGHLIGHT_BASE + 26; -static const SpriteID SPR_PALETTE_ZONING_WHITE = SPR_INNER_HIGHLIGHT_BASE + 27; -static const SpriteID SPR_PALETTE_ZONING_YELLOW = SPR_INNER_HIGHLIGHT_BASE + 28; -static const SpriteID SPR_PALETTE_ZONING_PURPLE = SPR_INNER_HIGHLIGHT_BASE + 29; -static const SpriteID SPR_INNER_HIGHLIGHT_COUNT = 30; +static const SpriteID CM_SPR_CITYMANIA_BASE = SPR_PALETTE_BASE + PALETTE_SPRITE_COUNT; +static const SpriteID CM_SPR_RAIL_COPY_PASTE = CM_SPR_CITYMANIA_BASE; +static const SpriteID CM_SPR_INNER_HIGHLIGHT_BASE = CM_SPR_CITYMANIA_BASE + 2; +static const SpriteID CM_SPR_IMG_COMPANY_CARGO = CM_SPR_INNER_HIGHLIGHT_BASE + 19; +static const SpriteID CM_SPR_IMG_COMPANY_GOAL = CM_SPR_INNER_HIGHLIGHT_BASE + 20; +static const SpriteID CM_SPR_IMG_HOUSE_NEW = CM_SPR_INNER_HIGHLIGHT_BASE + 21; +static const SpriteID CM_SPR_PALETTE_ZONING_RED = CM_SPR_INNER_HIGHLIGHT_BASE + 22; +static const SpriteID CM_SPR_PALETTE_ZONING_GREEN = CM_SPR_INNER_HIGHLIGHT_BASE + 23; +static const SpriteID CM_SPR_PALETTE_ZONING_BLACK = CM_SPR_INNER_HIGHLIGHT_BASE + 24; +static const SpriteID CM_SPR_PALETTE_ZONING_LIGHT_BLUE = CM_SPR_INNER_HIGHLIGHT_BASE + 25; +static const SpriteID CM_SPR_PALETTE_ZONING_ORANGE = CM_SPR_INNER_HIGHLIGHT_BASE + 26; +static const SpriteID CM_SPR_PALETTE_ZONING_WHITE = CM_SPR_INNER_HIGHLIGHT_BASE + 27; +static const SpriteID CM_SPR_PALETTE_ZONING_YELLOW = CM_SPR_INNER_HIGHLIGHT_BASE + 28; +static const SpriteID CM_SPR_PALETTE_ZONING_PURPLE = CM_SPR_INNER_HIGHLIGHT_BASE + 29; +static const SpriteID CM_SPR_INNER_HIGHLIGHT_COUNT = 30; -static const SpriteID SPR_BORDER_HIGHLIGHT_BASE = SPR_INNER_HIGHLIGHT_BASE + SPR_INNER_HIGHLIGHT_COUNT + 1; -static const SpriteID SPR_BORDER_HIGHLIGHT_COUNT = 19 * 19; -static const SpriteID PALETTE_TINT_BASE = SPR_BORDER_HIGHLIGHT_BASE + SPR_BORDER_HIGHLIGHT_COUNT; -static const SpriteID PALETTE_TINT_RED_DEEP = PALETTE_TINT_BASE; -static const SpriteID PALETTE_TINT_ORANGE_DEEP = PALETTE_TINT_BASE + 1; -static const SpriteID PALETTE_TINT_GREEN_DEEP = PALETTE_TINT_BASE + 2; -static const SpriteID PALETTE_TINT_CYAN_DEEP = PALETTE_TINT_BASE + 3; -static const SpriteID PALETTE_TINT_RED = PALETTE_TINT_BASE + 4; -static const SpriteID PALETTE_TINT_ORANGE = PALETTE_TINT_BASE + 5; -static const SpriteID PALETTE_TINT_YELLOW = PALETTE_TINT_BASE + 6; -static const SpriteID PALETTE_TINT_YELLOW_WHITE = PALETTE_TINT_BASE + 7; -static const SpriteID PALETTE_TINT_WHITE = PALETTE_TINT_BASE + 8; -static const SpriteID PALETTE_TINT_GREEN = PALETTE_TINT_BASE + 9; -static const SpriteID PALETTE_TINT_CYAN = PALETTE_TINT_BASE + 10; -static const SpriteID PALETTE_TINT_CYAN_WHITE = PALETTE_TINT_BASE + 11; -static const SpriteID PALETTE_TINT_BLUE = PALETTE_TINT_BASE + 12; -static const SpriteID PALETTE_SHADE_N = PALETTE_TINT_BASE + 13; -static const SpriteID PALETTE_SHADE_NE = PALETTE_TINT_BASE + 14; -static const SpriteID PALETTE_SHADE_E = PALETTE_TINT_BASE + 15; -static const SpriteID PALETTE_SHADE_SE = PALETTE_TINT_BASE + 16; -static const SpriteID PALETTE_SHADE_S = PALETTE_TINT_BASE + 17; -static const SpriteID PALETTE_SHADE_SW = PALETTE_TINT_BASE + 18; -static const SpriteID PALETTE_SHADE_W = PALETTE_TINT_BASE + 19; -static const SpriteID PALETTE_SHADE_NW = PALETTE_TINT_BASE + 20; -static const SpriteID PALETTE_TINT_COUNT = 13 + 8; +static const SpriteID CM_SPR_BORDER_HIGHLIGHT_BASE = CM_SPR_INNER_HIGHLIGHT_BASE + CM_SPR_INNER_HIGHLIGHT_COUNT + 1; +static const SpriteID CM_SPR_BORDER_HIGHLIGHT_COUNT = 19 * 19; +static const SpriteID CM_PALETTE_TINT_BASE = CM_SPR_BORDER_HIGHLIGHT_BASE + CM_SPR_BORDER_HIGHLIGHT_COUNT; +static const SpriteID CM_PALETTE_TINT_RED_DEEP = CM_PALETTE_TINT_BASE; +static const SpriteID CM_PALETTE_TINT_ORANGE_DEEP = CM_PALETTE_TINT_BASE + 1; +static const SpriteID CM_PALETTE_TINT_GREEN_DEEP = CM_PALETTE_TINT_BASE + 2; +static const SpriteID CM_PALETTE_TINT_CYAN_DEEP = CM_PALETTE_TINT_BASE + 3; +static const SpriteID CM_PALETTE_TINT_RED = CM_PALETTE_TINT_BASE + 4; +static const SpriteID CM_PALETTE_TINT_ORANGE = CM_PALETTE_TINT_BASE + 5; +static const SpriteID CM_PALETTE_TINT_YELLOW = CM_PALETTE_TINT_BASE + 6; +static const SpriteID CM_PALETTE_TINT_YELLOW_WHITE = CM_PALETTE_TINT_BASE + 7; +static const SpriteID CM_PALETTE_TINT_WHITE = CM_PALETTE_TINT_BASE + 8; +static const SpriteID CM_PALETTE_TINT_GREEN = CM_PALETTE_TINT_BASE + 9; +static const SpriteID CM_PALETTE_TINT_CYAN = CM_PALETTE_TINT_BASE + 10; +static const SpriteID CM_PALETTE_TINT_CYAN_WHITE = CM_PALETTE_TINT_BASE + 11; +static const SpriteID CM_PALETTE_TINT_BLUE = CM_PALETTE_TINT_BASE + 12; +static const SpriteID CM_PALETTE_SHADE_N = CM_PALETTE_TINT_BASE + 13; +static const SpriteID CM_PALETTE_SHADE_NE = CM_PALETTE_TINT_BASE + 14; +static const SpriteID CM_PALETTE_SHADE_E = CM_PALETTE_TINT_BASE + 15; +static const SpriteID CM_PALETTE_SHADE_SE = CM_PALETTE_TINT_BASE + 16; +static const SpriteID CM_PALETTE_SHADE_S = CM_PALETTE_TINT_BASE + 17; +static const SpriteID CM_PALETTE_SHADE_SW = CM_PALETTE_TINT_BASE + 18; +static const SpriteID CM_PALETTE_SHADE_W = CM_PALETTE_TINT_BASE + 19; +static const SpriteID CM_PALETTE_SHADE_NW = CM_PALETTE_TINT_BASE + 20; +static const SpriteID CM_PALETTE_TINT_COUNT = 13 + 8; /* From where can we start putting NewGRFs? */ -static const SpriteID SPR_NEWGRFS_BASE = PALETTE_TINT_BASE + PALETTE_TINT_COUNT; +static const SpriteID SPR_NEWGRFS_BASE = CM_PALETTE_TINT_BASE + CM_PALETTE_TINT_COUNT; /* Manager face sprites */ static const SpriteID SPR_GRADIENT = 874; // background gradient behind manager face diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 825f4c791b..3174d857c7 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -2304,7 +2304,7 @@ static NWidgetBase *MakeMainToolbar(int *biggest_index) SPR_IMG_SUBSIDIES, // WID_TN_SUBSIDIES SPR_IMG_COMPANY_LIST, // WID_TN_STATIONS SPR_IMG_COMPANY_FINANCE, // WID_TN_FINANCES - SPR_IMG_COMPANY_CARGO, // WID_TN_CARGOS + CM_SPR_IMG_COMPANY_CARGO,// WID_TN_CARGOS SPR_IMG_COMPANY_GENERAL, // WID_TN_COMPANIES SPR_IMG_STORY_BOOK, // WID_TN_STORY SPR_IMG_GOAL, // WID_TN_GOAL