(svn r8635) -Fix: draw canal edges under buoys that are in a canal.
--- a/src/station_cmd.cpp Thu Feb 08 14:02:12 2007 +0000
+++ b/src/station_cmd.cpp Thu Feb 08 14:04:02 2007 +0000
@@ -1977,6 +1977,9 @@
return &_station_display_datas[gfx];
}
+/* For drawing canal edges on buoys */
+extern void DrawCanalWater(TileIndex tile);
+
static void DrawTile_Station(TileInfo *ti)
{
const DrawTileSeqStruct *dtss;
@@ -2041,6 +2044,8 @@
if (GetRailType(ti->tile) == RAILTYPE_ELECTRIC && IsStationTileElectrifiable(ti->tile)) DrawCatenary(ti);
+ if (IsBuoyTile(ti->tile) && (ti->z != 0 || !IsTileOwner(ti->tile, OWNER_WATER))) DrawCanalWater(ti->tile);
+
foreach_draw_tile_seq(dtss, t->seq) {
SpriteID pal;
--- a/src/table/station_land.h Thu Feb 08 14:02:12 2007 +0000
+++ b/src/table/station_land.h Thu Feb 08 14:04:02 2007 +0000
@@ -384,6 +384,12 @@
TILE_SEQ_END()
};
+/* Buoy, which will _always_ drown under the ship */
+static const DrawTileSeqStruct _station_display_datas_82[] = {
+ { 4, -1, 0, 0, 0, 0, SPR_IMG_BOUY, PAL_NONE },
+ TILE_SEQ_END()
+};
+
// control tower with concrete underground and no fence
// concrete underground
static const DrawTileSeqStruct _station_display_datas_085[] = {
@@ -1036,7 +1042,7 @@
{ SPR_SHORE_TILEH_6, PAL_NONE, _station_display_datas_79 },
{ SPR_FLAT_WATER_TILE, PAL_NONE, _station_display_datas_80 },
{ SPR_FLAT_WATER_TILE, PAL_NONE, _station_display_datas_81 },
- { SPR_BUOY, PAL_NONE, _station_display_nothing },
+ { SPR_FLAT_WATER_TILE, PAL_NONE, _station_display_datas_82 },
{ SPR_AIRPORT_RUNWAY_END, PAL_NONE, _station_display_nothing },
{ SPR_AIRPORT_RUNWAY_EXIT_B, PAL_NONE, _station_display_nothing },
{ SPR_AIRPORT_APRON, PAL_NONE, _station_display_datas_085 },