mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-29 17:39:09 +00:00
(svn r1854) Split GetSpritePtr() into GetSprite() for regular sprites (returning a Sprite*) and GetNonSprite() for "sprites" of type 0xFF (returning byte*)
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user