diff options
author | rubidium <rubidium@openttd.org> | 2007-02-08 14:04:02 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-02-08 14:04:02 +0000 |
commit | 6bbbedc8ccdeff63a05111151d7ffd0af2f436d7 (patch) | |
tree | 1600d16e7aa97f9ac48f054bda1f0ea84f4c4137 /src | |
parent | ea55a04b69963084b94c0ea537cfda9dfacf3ae5 (diff) | |
download | openttd-6bbbedc8ccdeff63a05111151d7ffd0af2f436d7.tar.xz |
(svn r8635) -Fix: draw canal edges under buoys that are in a canal.
Diffstat (limited to 'src')
-rw-r--r-- | src/station_cmd.cpp | 5 | ||||
-rw-r--r-- | src/table/station_land.h | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 528352256..49cfa5ca3 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1977,6 +1977,9 @@ const DrawTileSprites *GetStationTileLayout(byte gfx) 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 @@ static void DrawTile_Station(TileInfo *ti) 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; diff --git a/src/table/station_land.h b/src/table/station_land.h index eaa9cff92..e356ce71b 100644 --- a/src/table/station_land.h +++ b/src/table/station_land.h @@ -384,6 +384,12 @@ static const DrawTileSeqStruct _station_display_datas_81[] = { 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 @@ static const DrawTileSprites _station_display_datas[] = { { 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 }, |