Tint every grount/structure tile when using new highlights

This commit is contained in:
Pavel Stupnikov
2020-02-05 00:44:34 +03:00
parent a3890d4e5f
commit abbc38728e
12 changed files with 154 additions and 120 deletions
+6 -13
View File
@@ -419,22 +419,15 @@ void DrawBorderSprites(const TileInfo *ti, citymania::ZoningBorder border, Sprit
*/
void DrawTileZoning(const TileInfo *ti) {
// AddSortableSpriteToDraw((SPR_FLAT_BARE_LAND|(1U << PALETTE_MODIFIER_TRANSPARENT)) + _tileh_to_sprite[ti->tileh],
// SPR_RECOLOUR_RED, ti->x, ti->y, 0x10, 0x10, 1, ti->z);
// AddSortableSpriteToDraw(SPR_FLAT_BARE_LAND + _tileh_to_sprite[ti->tileh], SPR_RECOLOUR_RED, ti->x, ti->y, 0x10, 0x10, 1, ti->z + 7, false);
if(_zoning.outer == CHECKNOTHING && _zoning.inner == CHECKNOTHING) return; //nothing to do
if (_game_mode != GM_NORMAL || ti->tile >= MapSize() || IsTileType(ti->tile, MP_VOID)) return; //check invalid
if (_zoning.outer != CHECKNOTHING){
if (_zoning.outer == CHECKTOWNZONES) {
// auto p = citymania::GetTownZoneBorder(ti->tile);
// if (p.first && p.second) {
// DrawBorderSprites(ti, p.first, GetTownZoneBorderColor(p.second));
// }
} else if (_zoning.outer == CHECKBULUNSER || _zoning.outer == CHECKINDUNSER) {
// handled in house drawing
} else if (_zoning.outer == CHECKSTACATCH) {
// auto b = citymania::GetAnyStationCatchmentBorder(ti->tile);
// DrawBorderSprites(ti, b, SPR_PALETTE_ZONING_LIGHT_BLUE);
if (_zoning.outer == CHECKTOWNZONES ||
_zoning.outer == CHECKBULUNSER ||
_zoning.outer == CHECKINDUNSER ||
_zoning.outer == CHECKSTACATCH ||
_zoning.outer == CHECKTOWNGROWTHTILES) {
// handled by citymania zoning
} else {
DrawZoningSprites(SPR_SELECT_TILE, TileZoningSpriteEvaluation(ti->tile, _local_company, _zoning.outer), ti);
}