1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-17 09:22:42 +01:00

Feature: Snow-covered rocks are now visible.

This commit is contained in:
Peter Nelson
2025-02-20 19:22:43 +00:00
committed by Peter Nelson
parent 28a1267e57
commit 2a05a845df
13 changed files with 139 additions and 4 deletions

View File

@@ -106,7 +106,8 @@ static void DrawClearLandFence(const TileInfo *ti)
static void DrawTile_Clear(TileInfo *ti)
{
ClearGround ground = IsSnowTile(ti->tile) ? CLEAR_SNOW : GetClearGround(ti->tile);
ClearGround real_ground = GetClearGround(ti->tile);
ClearGround ground = IsSnowTile(ti->tile) ? CLEAR_SNOW : real_ground;
switch (ground) {
case CLEAR_GRASS:
@@ -126,7 +127,17 @@ static void DrawTile_Clear(TileInfo *ti)
DrawClearLandFence(ti);
break;
case CLEAR_SNOW:
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;