summaryrefslogtreecommitdiff
path: root/src/table
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-06-18 21:19:04 +0000
committersmatz <smatz@openttd.org>2008-06-18 21:19:04 +0000
commit7a7ff65ac53cab72eddf2838000fbf95f5de9f42 (patch)
tree4997235d0f8568325d0c8f7c1412cca55e69496d /src/table
parentbc12e5453cca334705fe9d280a015e6c58a83dd6 (diff)
downloadopenttd-7a7ff65ac53cab72eddf2838000fbf95f5de9f42.tar.xz
(svn r13571) -Codechange: define channels in struct Colour in different order on LE and BE machines
Diffstat (limited to 'src/table')
-rw-r--r--src/table/palettes.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/table/palettes.h b/src/table/palettes.h
index 51e5dc571..6aa98c765 100644
--- a/src/table/palettes.h
+++ b/src/table/palettes.h
@@ -2,11 +2,18 @@
/** @file palettes.h The colour translation of the GRF palettes. */
-#define M(r, g, b) { r, g, b }
+#include "../core/endian_type.hpp"
+
+#if TTD_ENDIAN == TTD_BIG_ENDIAN
+ #define M(r, g, b) { 0xff, r, g, b }
+#else
+ #define M(r, g, b) { b, g, r, 0xff }
+#endif /* TTD_ENDIAN == TTD_BIG_ENDIAN */
+
static const Colour _palettes[][256] = {
/* palette 1 (TTD Windows) */
{
- M( 0, 0, 0), M(212, 0, 212), M(212, 0, 212), M(212, 0, 212),
+ { 0, 0, 0, 0 }, M(212, 0, 212), M(212, 0, 212), M(212, 0, 212),
M(212, 0, 212), M(212, 0, 212), M(212, 0, 212), M(212, 0, 212),
M(212, 0, 212), M(212, 0, 212), M(168, 168, 168), M(184, 184, 184),
M(200, 200, 200), M(216, 216, 216), M(232, 232, 232), M(252, 252, 252),
@@ -74,7 +81,7 @@ static const Colour _palettes[][256] = {
/* palette 2 (mixed TTD DOS + TTD Windows palette */
{
- M( 0, 0, 0), M( 16, 16, 16), M( 32, 32, 32), M( 48, 48, 48),
+ { 0, 0, 0, 0 }, M( 16, 16, 16), M( 32, 32, 32), M( 48, 48, 48),
M( 65, 64, 65), M( 82, 80, 82), M( 98, 101, 98), M(115, 117, 115),
M(131, 133, 131), M(148, 149, 148), M(168, 168, 168), M(184, 184, 184),
M(200, 200, 200), M(216, 216, 216), M(232, 232, 232), M(252, 252, 252),