summaryrefslogtreecommitdiff
path: root/gfx.h
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-02-08 22:22:42 +0000
committertron <tron@openttd.org>2005-02-08 22:22:42 +0000
commit092e72d60db91b631099d1844eba1b909e279756 (patch)
tree73dd253044f97e09dbf5a1fb4d5e7cbd51f0eb5d /gfx.h
parent297223cc218895c2e8c2455b6ea35d00f78ee47c (diff)
downloadopenttd-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.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/gfx.h b/gfx.h
index 1feb46975..bbeb7b614 100644
--- a/gfx.h
+++ b/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;