summaryrefslogtreecommitdiff
path: root/src/newgrf_house.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-05-29 16:56:22 +0000
committerfrosch <frosch@openttd.org>2011-05-29 16:56:22 +0000
commita241a4ce97ffe3f519ecf656ad10c518d646d423 (patch)
treeb6319bc947c6ae62a4822ed0368228f3e5f4e2ca /src/newgrf_house.cpp
parent5b449145f7983d44d73195b8a18e4a2da721ee71 (diff)
downloadopenttd-a241a4ce97ffe3f519ecf656ad10c518d646d423.tar.xz
(svn r22518) -Feature: [NewGRF] Advanced sprite layouts with register modifiers.
Diffstat (limited to 'src/newgrf_house.cpp')
-rw-r--r--src/newgrf_house.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp
index f9fb4b16b..1f525bd8e 100644
--- a/src/newgrf_house.cpp
+++ b/src/newgrf_house.cpp
@@ -412,7 +412,7 @@ uint16 GetHouseCallback(CallbackID callback, uint32 param1, uint32 param2, House
static void DrawTileLayout(const TileInfo *ti, const TileLayoutSpriteGroup *group, byte stage, HouseID house_id)
{
- const DrawTileSprites *dts = &group->dts;
+ const DrawTileSprites *dts = group->ProcessRegisters(&stage);
const HouseSpec *hs = HouseSpec::Get(house_id);
PaletteID palette = hs->random_colour[TileHash2Bit(ti->x, ti->y)] + PALETTE_RECOLOUR_START;
@@ -428,6 +428,7 @@ static void DrawTileLayout(const TileInfo *ti, const TileLayoutSpriteGroup *grou
PaletteID pal = dts->ground.pal;
if (HasBit(image, SPRITE_MODIFIER_CUSTOM_SPRITE)) image += stage;
+ if (HasBit(pal, SPRITE_MODIFIER_CUSTOM_SPRITE)) pal += stage;
if (GB(image, 0, SPRITE_WIDTH) != 0) {
DrawGroundSprite(image, GroundSpritePaletteTransform(image, pal, palette));