|
@@ -375,13 +375,13 @@ static bool IsWateredTile(TileIndex tile
|
|
|
void DrawCanalWater(TileIndex tile)
|
|
|
{
|
|
|
uint wa;
|
|
|
|
|
|
/* Test for custom graphics, else use the default */
|
|
|
SpriteID dikes_base = GetCanalSprite(CF_DIKES, tile);
|
|
|
if (dikes_base == 0) dikes_base = SPR_CANALS_BASE + 57;
|
|
|
if (dikes_base == 0) dikes_base = SPR_CANAL_DIKES_BASE;
|
|
|
|
|
|
/* determine the edges around with water. */
|
|
|
wa = IsWateredTile(TILE_ADDXY(tile, -1, 0)) << 0;
|
|
|
wa += IsWateredTile(TILE_ADDXY(tile, 0, 1)) << 1;
|
|
|
wa += IsWateredTile(TILE_ADDXY(tile, 1, 0)) << 2;
|
|
|
wa += IsWateredTile(TILE_ADDXY(tile, 0, -1)) << 3;
|
|
@@ -430,15 +430,15 @@ static void DrawWaterStuff(const TileInf
|
|
|
{
|
|
|
SpriteID image;
|
|
|
SpriteID water_base = GetCanalSprite(CF_WATERSLOPE, ti->tile);
|
|
|
SpriteID locks_base = GetCanalSprite(CF_LOCKS, ti->tile);
|
|
|
|
|
|
/* If no custom graphics, use defaults */
|
|
|
if (water_base == 0) water_base = SPR_CANALS_BASE + 5;
|
|
|
if (water_base == 0) water_base = SPR_CANALS_BASE;
|
|
|
if (locks_base == 0) {
|
|
|
locks_base = SPR_CANALS_BASE + 9;
|
|
|
locks_base = SPR_SHIPLIFT_BASE;
|
|
|
} else {
|
|
|
/* If using custom graphics, ignore the variation on height */
|
|
|
base = 0;
|
|
|
}
|
|
|
|
|
|
image = wdts++->image;
|