diff options
author | smatz <smatz@openttd.org> | 2009-06-22 23:15:27 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-06-22 23:15:27 +0000 |
commit | d703f0c3b527f1c1f324875762293929c6fbb932 (patch) | |
tree | ff1d89bd4abc675ae5dfe258ec16363ac529b920 /src/gfx_type.h | |
parent | 4f0e62deb63afa2019c0e2d1d2ea4ca552743998 (diff) | |
download | openttd-d703f0c3b527f1c1f324875762293929c6fbb932.tar.xz |
(svn r16628) -Codechange: remove one gcc2 hack
Diffstat (limited to 'src/gfx_type.h')
-rw-r--r-- | src/gfx_type.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gfx_type.h b/src/gfx_type.h index 7796d19e0..57f1b3d42 100644 --- a/src/gfx_type.h +++ b/src/gfx_type.h @@ -138,14 +138,15 @@ struct DrawPixelInfo { }; /** Structure to access the alpha, red, green, and blue channels from a 32 bit number. */ -struct Colour { +union Colour { + uint32 data; ///< Conversion of the channel information to a 32 bit number. + struct { #if TTD_ENDIAN == TTD_BIG_ENDIAN - uint8 a, r, g, b; ///< colour channels in BE order + uint8 a, r, g, b; ///< colour channels in BE order #else - uint8 b, g, r, a; ///< colour channels in LE order + uint8 b, g, r, a; ///< colour channels in LE order #endif /* TTD_ENDIAN == TTD_BIG_ENDIAN */ - - operator uint32 () const { return *(uint32 *)this; } ///< Conversion of the channel information to a 32 bit number. + }; }; /** Available font sizes */ |