summaryrefslogtreecommitdiff
path: root/src/newgrf_commons.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-01-17 15:05:25 +0000
committerfrosch <frosch@openttd.org>2010-01-17 15:05:25 +0000
commit24e0945bc462ea0687689880caf0d830455934e2 (patch)
tree489fd14a952047f356b8258eb6f5f799d23d5c47 /src/newgrf_commons.cpp
parent830af8ee77bbbedb23f4caa53c8b47c20235f1b2 (diff)
downloadopenttd-24e0945bc462ea0687689880caf0d830455934e2.tar.xz
(svn r18846) -Codechange: Merge DrawTileSeq into DrawCommonTileSeq.
Diffstat (limited to 'src/newgrf_commons.cpp')
-rw-r--r--src/newgrf_commons.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp
index 5d6abd15a..cf8683498 100644
--- a/src/newgrf_commons.cpp
+++ b/src/newgrf_commons.cpp
@@ -19,7 +19,6 @@
#include "newgrf_commons.h"
#include "station_map.h"
#include "tree_map.h"
-#include "viewport_func.h"
#include "core/mem_func.hpp"
/** Constructor of generic class
@@ -323,43 +322,3 @@ uint32 GetNearbyTileInformation(TileIndex tile)
byte terrain_type = GetTerrainType(tile) << 2 | (tile_type == MP_WATER ? 1 : 0) << 1;
return tile_type << 24 | z << 16 | terrain_type << 8 | tileh;
}
-
-/**
- * Draws a building 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 stage The construction stage (0-3)
- * @param default_palette The default recolour sprite to use (typically company colour resp. random industry/house colour)
- */
-void DrawTileSeq(const TileInfo *ti, const DrawTileSprites *dts, TransparencyOption to, byte stage, SpriteID default_palette)
-{
- const DrawTileSeqStruct *dtss;
- foreach_draw_tile_seq(dtss, dts->seq) {
- if (GB(dtss->image.sprite, 0, SPRITE_WIDTH) == 0) continue;
-
- 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 (HasBit(image, SPRITE_MODIFIER_CUSTOM_SPRITE)) {
- image += stage;
- }
-
- 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 industries and houses delta_x and delta_y are unsigned */
- AddChildSpriteScreen(image, pal, (byte)dtss->delta_x, (byte)dtss->delta_y, !HasBit(image, SPRITE_MODIFIER_OPAQUE) && IsTransparencySet(to));
- }
- }
-}