mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-31 03:12:41 +00:00
7fff0a71f2
- Fix: Do not look in every direction for tunnels when building one, one direction is enough (r10258) - Fix: Take the age of the front vehicle for station rating (r10246) - Fix: Terraforming wipes out canals. Now you always have to remove the canal before terraforming, instead of "just" removing the canal [FS#594] (r10240) - Fix: Only 2 trains could crash at one time as collision checking stopped on the first hit. This could technically cause desyncs in network games as the collision hash order is not guaranteed [FS#892] (r10222) - Fix: Land under foundations was terraform when it shouldn't be terraformed [FS#882, FS#890] (r10219) - Fix: Some NewGRFs use the same (unused in the "current" climate) sprite IDs. Normally this gives some artefacts, but when one NewGRF expects it to be a sprite and another NewGRF overwrites it with a non-sprite nasty things happen (drawing a non-sprite crashes OTTD) [FS#838] (r10109)
36 lines
698 B
C
36 lines
698 B
C
/* $Id$ */
|
|
|
|
#ifndef SPRITECACHE_H
|
|
#define SPRITECACHE_H
|
|
|
|
typedef struct Sprite {
|
|
byte info;
|
|
byte height;
|
|
uint16 width;
|
|
int16 x_offs;
|
|
int16 y_offs;
|
|
byte data[VARARRAY_SIZE];
|
|
} Sprite;
|
|
|
|
const void *GetRawSprite(SpriteID sprite, bool real_sprite);
|
|
bool SpriteExists(SpriteID sprite);
|
|
|
|
static inline const Sprite *GetSprite(SpriteID sprite)
|
|
{
|
|
return GetRawSprite(sprite, true);
|
|
}
|
|
|
|
static inline const byte *GetNonSprite(SpriteID sprite)
|
|
{
|
|
return GetRawSprite(sprite, false);
|
|
}
|
|
|
|
void GfxInitSpriteMem(void);
|
|
void IncreaseSpriteLRU(void);
|
|
|
|
bool LoadNextSprite(int load_index, byte file_index);
|
|
void DupSprite(SpriteID old, SpriteID new);
|
|
void SkipSprites(uint count);
|
|
|
|
#endif /* SPRITECACHE_H */
|