diff options
author | frosch <frosch@openttd.org> | 2010-01-17 01:01:56 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-01-17 01:01:56 +0000 |
commit | d9d75c83d5b0839d335db453b4482fcaf306bac7 (patch) | |
tree | ad207b20db255982fe6d12d77b480c3d918ad5be /src/newgrf_commons.cpp | |
parent | 707cf045f8703700887757ecfa4e309b61e2fd4f (diff) | |
download | openttd-d9d75c83d5b0839d335db453b4482fcaf306bac7.tar.xz |
(svn r18842) -Codechange: Rename SPRITE_MODIFIER_USE_OFFSET to SPRITE_MODIFIER_CUSTOM_SPRITE, invert its meaning, and also use it for industry/house layouts instead of IS_CUSTOM_SPRITE().
Diffstat (limited to 'src/newgrf_commons.cpp')
-rw-r--r-- | src/newgrf_commons.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp index f5be80d3b..5d6abd15a 100644 --- a/src/newgrf_commons.cpp +++ b/src/newgrf_commons.cpp @@ -339,14 +339,15 @@ void DrawTileSeq(const TileInfo *ti, const DrawTileSprites *dts, TransparencyOpt if (GB(dtss->image.sprite, 0, SPRITE_WIDTH) == 0) continue; SpriteID image = dtss->image.sprite; - SpriteID pal = dtss->image.pal; /* 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 (IS_CUSTOM_SPRITE(image)) image += stage; + if (HasBit(image, SPRITE_MODIFIER_CUSTOM_SPRITE)) { + image += stage; + } - pal = SpriteLayoutPaletteTransform(image, pal, default_palette); + SpriteID pal = SpriteLayoutPaletteTransform(image, dtss->image.pal, default_palette); if ((byte)dtss->delta_z != 0x80) { AddSortableSpriteToDraw( |