1
0
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:
tron
2005-02-10 12:14:38 +00:00
parent 2a151d9354
commit 94c75f33bb
7 changed files with 33 additions and 27 deletions

View File

@@ -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);