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:
12
gfx.h
12
gfx.h
@@ -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;
|
||||
|
Reference in New Issue
Block a user