summaryrefslogtreecommitdiff
path: root/src/sprite.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-02-19 13:16:34 +0000
committerfrosch <frosch@openttd.org>2011-02-19 13:16:34 +0000
commit57dc3ed716b50fa2e0db5fb691fb70c0766826f4 (patch)
tree5a55a7fcfdd5db2ee08dc31052f1da5fcd72efe7 /src/sprite.cpp
parent72e027e4d6ff168ab9f77d1001f877c55071c59c (diff)
downloadopenttd-57dc3ed716b50fa2e0db5fb691fb70c0766826f4.tar.xz
(svn r22106) -Codechange: Add DrawTileSeqStruct::MakeTerminator(), DrawTileSeqStruct::IsTerminator(), DrawTileSeqStruct::IsParentSprite() to simplify stuff.
Diffstat (limited to 'src/sprite.cpp')
-rw-r--r--src/sprite.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sprite.cpp b/src/sprite.cpp
index df4eec8ef..2e453941a 100644
--- a/src/sprite.cpp
+++ b/src/sprite.cpp
@@ -43,7 +43,7 @@ void DrawCommonTileSeq(const TileInfo *ti, const DrawTileSprites *dts, Transpare
PaletteID pal = SpriteLayoutPaletteTransform(image, dtss->image.pal, default_palette);
- if ((byte)dtss->delta_z != 0x80) {
+ if (dtss->IsParentSprite()) {
parent_sprite_encountered = true;
AddSortableSpriteToDraw(
image, pal,
@@ -94,7 +94,7 @@ void DrawCommonTileSeqInGUI(int x, int y, const DrawTileSprites *dts, int32 orig
PaletteID pal = SpriteLayoutPaletteTransform(image, dtss->image.pal, default_palette);
- if ((byte)dtss->delta_z != 0x80) {
+ if (dtss->IsParentSprite()) {
Point pt = RemapCoords(dtss->delta_x, dtss->delta_y, dtss->delta_z);
DrawSprite(image, pal, x + pt.x, y + pt.y);