Codechange: Remove CLEAR_SNOW. (#15136)

Remove CLEAR_SNOW which is no longer used on the map and causes confusion.

IsSnowTile() is checked instead.
This commit is contained in:
Peter Nelson
2026-01-19 23:34:56 +00:00
committed by GitHub
parent 2bb6d3350f
commit f983a74f2e
4 changed files with 18 additions and 19 deletions
+14 -15
View File
@@ -115,10 +115,20 @@ static void DrawClearLandFence(const TileInfo *ti)
static void DrawTile_Clear(TileInfo *ti)
{
ClearGround real_ground = GetClearGround(ti->tile);
ClearGround ground = IsSnowTile(ti->tile) ? CLEAR_SNOW : real_ground;
if (IsSnowTile(ti->tile)) {
uint8_t density = GetClearDensity(ti->tile);
DrawGroundSprite(_clear_land_sprites_snow_desert[density] + SlopeToSpriteOffset(ti->tileh), PAL_NONE);
if (GetClearGround(ti->tile) == CLEAR_ROCKS) {
/* There 4 levels of snowy overlay rocks, each with 19 sprites. */
++density;
DrawGroundSprite(SPR_OVERLAY_ROCKS_BASE + (density * 19) + SlopeToSpriteOffset(ti->tileh), PAL_NONE);
}
switch (ground) {
DrawBridgeMiddle(ti, {});
return;
}
switch (GetClearGround(ti->tile)) {
case CLEAR_GRASS:
DrawClearLandTile(ti, GetClearDensity(ti->tile));
break;
@@ -141,17 +151,6 @@ static void DrawTile_Clear(TileInfo *ti)
DrawClearLandFence(ti);
break;
case CLEAR_SNOW: {
uint8_t density = GetClearDensity(ti->tile);
DrawGroundSprite(_clear_land_sprites_snow_desert[density] + SlopeToSpriteOffset(ti->tileh), PAL_NONE);
if (real_ground == CLEAR_ROCKS) {
/* There 4 levels of snowy overlay rocks, each with 19 sprites. */
++density;
DrawGroundSprite(SPR_OVERLAY_ROCKS_BASE + (density * 19) + SlopeToSpriteOffset(ti->tileh), PAL_NONE);
}
break;
}
case CLEAR_DESERT:
DrawGroundSprite(_clear_land_sprites_snow_desert[GetClearDensity(ti->tile)] + SlopeToSpriteOffset(ti->tileh), PAL_NONE);
break;
@@ -376,7 +375,7 @@ static void GetTileDesc_Clear(TileIndex tile, TileDesc &td)
{STR_LAI_CLEAR_DESCRIPTION_ROUGH_LAND, STR_LAI_CLEAR_DESCRIPTION_SNOWY_ROUGH_LAND},
{STR_LAI_CLEAR_DESCRIPTION_ROCKS, STR_LAI_CLEAR_DESCRIPTION_SNOWY_ROCKS},
{STR_LAI_CLEAR_DESCRIPTION_FIELDS, STR_EMPTY},
{STR_EMPTY, STR_EMPTY}, // CLEAR_SNOW does not appear in the map.
{STR_EMPTY, STR_EMPTY}, // unused entry does not appear in the map.
{STR_LAI_CLEAR_DESCRIPTION_DESERT, STR_EMPTY},
};