# sprite.h File Reference

Base for drawing complex sprites. More...

`#include "gfx_type.h"`

Go to the source code of this file.

## Data Structures
struct | DrawTileSeqStruct
| A tile child sprite and palette to draw for stations etc, with 3D bounding box. More...
struct | DrawTileSprites
| Ground palette sprite of a tile, together with its child sprites. More...
struct | DrawBuildingsTileStruct
| This structure is the same for both Industries and Houses. More...
## Defines
#define | GENERAL_SPRITE_COLOUR(colour) ((colour) + PALETTE_RECOLOUR_START)
#define | COMPANY_SPRITE_COLOUR(owner) (GENERAL_SPRITE_COLOUR(_company_colours[owner]))
#define | IS_CUSTOM_SPRITE(sprite) ((sprite) >= SPR_SIGNALS_BASE)
| Whether a sprite comes from the original graphics files or a new grf file (either supplied by OpenTTD or supplied by the user).
#define | foreach_draw_tile_seq(idx, list) for (idx = list; ((byte) idx->delta_x) != 0x80; idx++)
| Iterate through all DrawTileSeqStructs in DrawTileSprites.
## Functions
bool | SkipSpriteData (byte type, uint16 num)
| Skip the given amount of sprite graphics data.

## Detailed Description

Base for drawing complex sprites.

Definition in file sprite.h.

## Define Documentation

#define foreach_draw_tile_seq | ( | idx,
|  | list |  | ) | for (idx = list; ((byte) idx->delta_x) != 0x80; idx++)

Iterate through all DrawTileSeqStructs in DrawTileSprites.

Definition at line 66 of file sprite.h.

Referenced by DrawStationTile().

#define IS_CUSTOM_SPRITE | ( | sprite |  | ) | ((sprite) >= SPR_SIGNALS_BASE)

Whether a sprite comes from the original graphics files or a new grf file (either supplied by OpenTTD or supplied by the user).

Parameters:

  | sprite | The sprite to check

Returns:
  True if it is a new sprite, or false if it is original.

Definition at line 27 of file sprite.h.

## Function Documentation

bool SkipSpriteData | ( | byte | type,
|  | uint16 | num |
| ) |  |  |

Skip the given amount of sprite graphics data.

Parameters:

  | type | the type of sprite (compressed etc)
  | num | the amount of sprites to skip

Returns:
  true if the data could be correctly skipped.

Definition at line 91 of file spritecache.cpp.

Referenced by ReadSpriteHeaderSkipData().