diff options
author | smatz <smatz@openttd.org> | 2008-06-18 16:48:58 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-06-18 16:48:58 +0000 |
commit | 29985b768c5c9f5a92dc67e9b70626f3e6b9ff06 (patch) | |
tree | 74ebc46ae805dadccfc1057266b9f5f85873da3f /src/station_cmd.cpp | |
parent | cc2f9187cced720c32f5d0000407f912af042b0b (diff) | |
download | openttd-29985b768c5c9f5a92dc67e9b70626f3e6b9ff06.tar.xz |
(svn r13565) -Change [FS#2077]: when invisibility is set, sprite sequences are now drawn until first non-opaque sprite is found (bit 14 not set)
This is to balance performance, code complexity and NewGRF requirements
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index be9b30f16..42ed6291f 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2221,12 +2221,13 @@ static void DrawTile_Station(TileInfo *ti) DrawTramCatenary(ti, axis == AXIS_X ? ROAD_X : ROAD_Y); } - /* End now if buildings are invisible */ - if (IsInvisibilitySet(TO_BUILDINGS)) return; - const DrawTileSeqStruct *dtss; foreach_draw_tile_seq(dtss, t->seq) { SpriteID image = dtss->image.sprite; + + /* Stop drawing sprite sequence once we meet a sprite that doesn't have to be opaque */ + if (IsInvisibilitySet(TO_BUILDINGS) && !HasBit(image, SPRITE_MODIFIER_OPAQUE)) return; + if (relocation == 0 || HasBit(image, SPRITE_MODIFIER_USE_OFFSET)) { image += total_offset; } else { |