Files
@ r7553:1f8dacb4cfbd
Branch filter:
Location: cpp/openttd-patchpack/source/src/spritecache.h - annotation
r7553:1f8dacb4cfbd
769 B
text/x-c
(svn r11078) -Add: added 32bpp-optimized, which is almost twice as fast as 32bpp-simple (based on the work of frosch)
-Add: let 32bpp-anim use 32bpp-optimizeds, so he profits from the speed-up too
-Add: let 32bpp-anim use 32bpp-optimizeds, so he profits from the speed-up too
r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r6420:01087f989fd1 r6420:01087f989fd1 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r6248:b940b09d7ab8 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r6248:b940b09d7ab8 r5475:3f5cd13d1b63 r6803:f739da58f36c r6803:f739da58f36c r6869:6c5d9e3e963a r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r6869:6c5d9e3e963a r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r6869:6c5d9e3e963a r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r6247:96e840dbefcc r6247:96e840dbefcc r5475:3f5cd13d1b63 r6908:7e03190d606c r5587:034e5e185dc2 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 | /* $Id$ */
/** @file spritecache.h */
#ifndef SPRITECACHE_H
#define SPRITECACHE_H
struct Sprite {
byte height;
uint16 width;
int16 x_offs;
int16 y_offs;
byte data[VARARRAY_SIZE];
};
extern uint _sprite_cache_size;
const void *GetRawSprite(SpriteID sprite, bool real_sprite);
bool SpriteExists(SpriteID sprite);
static inline const Sprite *GetSprite(SpriteID sprite)
{
return (Sprite*)GetRawSprite(sprite, true);
}
static inline const byte *GetNonSprite(SpriteID sprite)
{
return (byte*)GetRawSprite(sprite, false);
}
void GfxInitSpriteMem();
void IncreaseSpriteLRU();
bool LoadNextSprite(int load_index, byte file_index, uint file_sprite_id);
void DupSprite(SpriteID old_spr, SpriteID new_spr);
void SkipSprites(uint count);
#endif /* SPRITECACHE_H */
|