19 #define GENERAL_SPRITE_COLOUR(colour) ((colour) + PALETTE_RECOLOUR_START) 20 #define COMPANY_SPRITE_COLOUR(owner) (GENERAL_SPRITE_COLOUR(_company_colours[owner])) 39 this->delta_x = (int8)0x80;
45 return (byte)this->delta_x == 0x80;
51 return (byte)this->delta_z != 0x80;
81 #define foreach_draw_tile_seq(idx, list) for (idx = list; !idx->IsTerminator(); idx++) 93 DrawCommonTileSeq(ti, dts, to, total_offset, newgrf_offset, default_palette,
false);
154 return (pal != 0 ? pal : default_pal);
173 return (pal != 0 ? pal : default_pal);
uint32 PaletteID
The number of the palette.
static void DrawOrigTileSeqInGUI(int x, int y, const DrawTileSprites *dts, PaletteID default_palette)
Draw TTD sprite sequence in GUI.
Tile information, used while rendering the tile.
static void DrawNewGRFTileSeq(const struct TileInfo *ti, const DrawTileSprites *dts, TransparencyOption to, uint32 stage, PaletteID default_palette)
Draw NewGRF industrytile or house sprite layout.
static void DrawNewGRFTileSeqInGUI(int x, int y, const DrawTileSprites *dts, uint32 stage, PaletteID default_palette)
Draw NewGRF object in GUI.
Combination of a palette sprite and a 'real' sprite.
void MakeTerminator()
Make this struct a sequence terminator.
void DrawCommonTileSeq(const TileInfo *ti, const DrawTileSprites *dts, TransparencyOption to, int32 orig_offset, uint32 newgrf_offset, PaletteID default_palette, bool child_offset_is_unsigned)
Draws a tile sprite sequence.
const DrawTileSeqStruct * seq
Array of child sprites. Terminated with a terminator entry.
static void DrawRailTileSeqInGUI(int x, int y, const DrawTileSprites *dts, int32 total_offset, uint32 newgrf_offset, PaletteID default_palette)
Draw tile sprite sequence in GUI with railroad specifics.
bool IsTerminator() const
Check whether this is a sequence terminator.
Ground palette sprite of a tile, together with its sprite layout.
void DrawCommonTileSeqInGUI(int x, int y, const DrawTileSprites *dts, int32 orig_offset, uint32 newgrf_offset, PaletteID default_palette, bool child_offset_is_unsigned)
Draws a tile sprite sequence in the GUI.
static PaletteID GroundSpritePaletteTransform(SpriteID image, PaletteID pal, PaletteID default_pal)
Applies PALETTE_MODIFIER_COLOUR to a palette entry of a ground sprite.
This structure is the same for both Industries and Houses.
bool IsParentSprite() const
Check whether this is a parent sprite with a boundingbox.
static void DrawRailTileSeq(const struct TileInfo *ti, const DrawTileSprites *dts, TransparencyOption to, int32 total_offset, uint32 newgrf_offset, PaletteID default_palette)
Draw tile sprite sequence on tile with railroad specifics.
static void DrawOrigTileSeq(const struct TileInfo *ti, const DrawTileSprites *dts, TransparencyOption to, PaletteID default_palette)
Draw TTD sprite sequence on tile.
PalSpriteID ground
Palette and sprite for the ground.
this bit is set when a recolouring process is in action
uint32 SpriteID
The number of a sprite, without mapping bits and colourtables.
Functions related to transparency.
when a sprite is to be displayed transparently, this bit needs to be set.
int8 delta_z
0x80 identifies child sprites
static PaletteID SpriteLayoutPaletteTransform(SpriteID image, PaletteID pal, PaletteID default_pal)
Applies PALETTE_MODIFIER_TRANSPARENT and PALETTE_MODIFIER_COLOUR to a palette entry of a sprite layou...
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
int8 delta_x
0x80 is sequence terminator
A tile child sprite and palette to draw for stations etc, with 3D bounding box.
This file contains all sprite-related enums and defines.
TransparencyOption
Transparency option bits: which position in _transparency_opt stands for which transparency.