(svn r22518) -Feature: [NewGRF] Advanced sprite layouts with register modifiers.

This commit is contained in:
frosch
2011-05-29 16:56:22 +00:00
parent 5b449145f7
commit a241a4ce97
13 changed files with 559 additions and 67 deletions

View File

@@ -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