diff options
author | frosch <frosch@openttd.org> | 2011-05-29 16:56:22 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-05-29 16:56:22 +0000 |
commit | a241a4ce97ffe3f519ecf656ad10c518d646d423 (patch) | |
tree | b6319bc947c6ae62a4822ed0368228f3e5f4e2ca /src/newgrf_industrytiles.cpp | |
parent | 5b449145f7983d44d73195b8a18e4a2da721ee71 (diff) | |
download | openttd-a241a4ce97ffe3f519ecf656ad10c518d646d423.tar.xz |
(svn r22518) -Feature: [NewGRF] Advanced sprite layouts with register modifiers.
Diffstat (limited to 'src/newgrf_industrytiles.cpp')
-rw-r--r-- | src/newgrf_industrytiles.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index 9d38ab5af..397fecad7 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -176,12 +176,13 @@ static void NewIndustryTileResolver(ResolverObject *res, IndustryGfx gfx, TileIn static void IndustryDrawTileLayout(const TileInfo *ti, const TileLayoutSpriteGroup *group, byte rnd_colour, byte stage, IndustryGfx gfx) { - const DrawTileSprites *dts = &group->dts; + const DrawTileSprites *dts = group->ProcessRegisters(&stage); SpriteID image = dts->ground.sprite; 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) { /* If the ground sprite is the default flat water sprite, draw also canal/river borders |