diff options
author | tron <tron@openttd.org> | 2005-02-08 22:22:42 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-02-08 22:22:42 +0000 |
commit | 092e72d60db91b631099d1844eba1b909e279756 (patch) | |
tree | 73dd253044f97e09dbf5a1fb4d5e7cbd51f0eb5d /gfx.h | |
parent | 297223cc218895c2e8c2455b6ea35d00f78ee47c (diff) | |
download | openttd-092e72d60db91b631099d1844eba1b909e279756.tar.xz |
(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)
Diffstat (limited to 'gfx.h')
-rw-r--r-- | gfx.h | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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; |