summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-01-16 22:25:44 +0000
committerfrosch <frosch@openttd.org>2010-01-16 22:25:44 +0000
commitd27999e4463edfb46158687343cd0e4f339a81a1 (patch)
tree81958834fbc08b062066858b039cf8e4ecdb83ec /src/station_cmd.cpp
parent199091600a9040f25c99b20431b5a2e072d19049 (diff)
downloadopenttd-d27999e4463edfb46158687343cd0e4f339a81a1.tar.xz
(svn r18837) -Codechange: Rename DrawStationTileSeq() to DrawCommonTileSeq() and move it to separate file.
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp44
1 files changed, 1 insertions, 43 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 721bf9d2f..e3e041195 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -23,7 +23,6 @@
#include "industry.h"
#include "newgrf_cargo.h"
#include "newgrf_station.h"
-#include "newgrf_commons.h"
#include "pathfinder/yapf/yapf_cache.h"
#include "road_internal.h" /* For drawing catenary/checking road removal */
#include "variables.h"
@@ -2456,48 +2455,7 @@ static void DrawTile_Station(TileInfo *ti)
total_offset = 0;
}
- DrawStationTileSeq(ti, t, TO_BUILDINGS, total_offset, relocation, palette);
-}
-
-/**
- * Draws a station, waypoint or depot including all subsprites on a tile.
- * @param ti The tile to draw on
- * @param dts Sprite and subsprites to draw
- * @param to The transparancy bit that toggles drawing of these sprites
- * @param total_offset Sprite-Offset between the current railtype and normal rail
- * @param relocation Sprite-Offset for NewGRF defined stations
- * @param default_palette The default recolour sprite to use (typically company colour)
- */
-void DrawStationTileSeq(const TileInfo *ti, const DrawTileSprites *dts, TransparencyOption to, int32 total_offset, uint32 relocation, SpriteID default_palette)
-{
- const DrawTileSeqStruct *dtss;
- foreach_draw_tile_seq(dtss, dts->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) && !HasBit(image, SPRITE_MODIFIER_OPAQUE)) return;
-
- if (relocation == 0 || HasBit(image, SPRITE_MODIFIER_USE_OFFSET)) {
- image += total_offset;
- } else {
- image += relocation;
- }
-
- SpriteID pal = SpriteLayoutPaletteTransform(image, dtss->image.pal, default_palette);
-
- if ((byte)dtss->delta_z != 0x80) {
- AddSortableSpriteToDraw(
- image, pal,
- ti->x + dtss->delta_x, ti->y + dtss->delta_y,
- dtss->size_x, dtss->size_y,
- dtss->size_z, ti->z + dtss->delta_z,
- !HasBit(image, SPRITE_MODIFIER_OPAQUE) && IsTransparencySet(to)
- );
- } else {
- /* For stations and original spritelayouts delta_x and delta_y are signed */
- AddChildSpriteScreen(image, pal, dtss->delta_x, dtss->delta_y, !HasBit(image, SPRITE_MODIFIER_OPAQUE) && IsTransparencySet(to));
- }
- }
+ DrawCommonTileSeq(ti, t, TO_BUILDINGS, total_offset, relocation, palette);
}
void StationPickerDrawSprite(int x, int y, StationType st, RailType railtype, RoadType roadtype, int image)