1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-20 13:09:15 +00:00

(svn r1852) Start cleaning up sprite handling:

- Complement the sprite header struct with a variable sized array for the sprite data and rename it to Sprite.
- Use the correct type Sprite* instead of casting all the time (this causes some "assignment from incompatible pointer type" warnings, nothing serious, will be resolved soon)
This commit is contained in:
tron
2005-02-08 22:22:42 +00:00
parent 297223cc21
commit 092e72d60d
3 changed files with 26 additions and 24 deletions

12
gfx.h
View File

@@ -17,13 +17,15 @@ struct DrawPixelInfo {
};
typedef struct SpriteHdr {
typedef struct Sprite {
byte info;
byte height;
uint16 width;
int16 x_offs, y_offs;
} SpriteHdr;
assert_compile(sizeof(SpriteHdr) == 8);
uint16 width; // LE!
int16 x_offs; // LE!
int16 y_offs; // LE!
byte data[VARARRAY_SIZE];
} Sprite;
assert_compile(sizeof(Sprite) == 8);
typedef struct CursorVars {
Point pos, size, offs, delta;