diff options
author | tron <tron@openttd.org> | 2005-02-10 12:14:38 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-02-10 12:14:38 +0000 |
commit | 94c75f33bb896b32866fd062242067d773b0f7b1 (patch) | |
tree | b487a5d141332ab7f42372d6735d5951cc75524e /spritecache.h | |
parent | 2a151d93546db1d867a7cc0691a5c0e5973a4b98 (diff) | |
download | openttd-94c75f33bb896b32866fd062242067d773b0f7b1.tar.xz |
(svn r1854) Split GetSpritePtr() into GetSprite() for regular sprites (returning a Sprite*) and GetNonSprite() for "sprites" of type 0xFF (returning byte*)
Diffstat (limited to 'spritecache.h')
-rw-r--r-- | spritecache.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spritecache.h b/spritecache.h index d6a4373aa..b4becda45 100644 --- a/spritecache.h +++ b/spritecache.h @@ -1,13 +1,24 @@ #ifndef SPRITECACHE_H #define SPRITECACHE_H +typedef struct Sprite { + byte info; + byte height; + uint16 width; // LE! + int16 x_offs; // LE! + int16 y_offs; // LE! + byte data[VARARRAY_SIZE]; +} Sprite; +assert_compile(sizeof(Sprite) == 8); + typedef struct { int xoffs, yoffs; int xsize, ysize; } SpriteDimension; const SpriteDimension *GetSpriteDimension(SpriteID sprite); -byte *GetSpritePtr(SpriteID sprite); +Sprite *GetSprite(SpriteID sprite); +byte *GetNonSprite(SpriteID sprite); void GfxInitSpriteMem(byte *ptr, uint32 size); void GfxLoadSprites(void); |