summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-08-11 18:30:52 +0000
committerbelugas <belugas@openttd.org>2008-08-11 18:30:52 +0000
commitba3d49df40fc16061c2ecb15de1c38682c060fff (patch)
treeb5751fb93afcda8e9d8c0d3a845bafdd6d1c4cf7
parent9fa2cbd93e90f6e9ba4e37280f7fda16b188e130 (diff)
downloadopenttd-ba3d49df40fc16061c2ecb15de1c38682c060fff.tar.xz
(svn r14042) -Codechange: Rename some structure members to more obvious names. And add a few comments on the _extra_palette_values array.
-rw-r--r--src/gfx.cpp11
-rw-r--r--src/table/palettes.h47
2 files changed, 36 insertions, 22 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp
index fe1a4755b..e9cc6242f 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -1022,7 +1022,7 @@ void DoPaletteAnimations()
memcpy(old_val, d, c * sizeof(*old_val));
/* Dark blue water */
- s = (_settings_game.game_creation.landscape == LT_TOYLAND) ? ev->ac : ev->a;
+ s = (_settings_game.game_creation.landscape == LT_TOYLAND) ? ev->dark_water_TOY : ev->dark_water;
j = EXTR(320, 5);
for (i = 0; i != 5; i++) {
*d++ = s[j];
@@ -1031,7 +1031,7 @@ void DoPaletteAnimations()
}
/* Glittery water */
- s = (_settings_game.game_creation.landscape == LT_TOYLAND) ? ev->bc : ev->b;
+ s = (_settings_game.game_creation.landscape == LT_TOYLAND) ? ev->glitter_water_TOY : ev->glitter_water;
j = EXTR(128, 15);
for (i = 0; i != 5; i++) {
*d++ = s[j];
@@ -1039,7 +1039,8 @@ void DoPaletteAnimations()
if (j >= 15) j -= 15;
}
- s = ev->e;
+ /* Fizzy Drink bubbles animation */
+ s = ev->fizzy_drink;
j = EXTR2(512, 5);
for (i = 0; i != 5; i++) {
*d++ = s[j];
@@ -1091,7 +1092,7 @@ void DoPaletteAnimations()
/* Animate water for old DOS graphics */
if (_use_dos_palette) {
/* Dark blue water DOS */
- s = (_settings_game.game_creation.landscape == LT_TOYLAND) ? ev->ac : ev->a;
+ s = (_settings_game.game_creation.landscape == LT_TOYLAND) ? ev->dark_water_TOY : ev->dark_water;
j = EXTR(320, 5);
for (i = 0; i != 5; i++) {
*d++ = s[j];
@@ -1100,7 +1101,7 @@ void DoPaletteAnimations()
}
/* Glittery water DOS */
- s = (_settings_game.game_creation.landscape == LT_TOYLAND) ? ev->bc : ev->b;
+ s = (_settings_game.game_creation.landscape == LT_TOYLAND) ? ev->glitter_water_TOY : ev->glitter_water;
j = EXTR(128, 15);
for (i = 0; i != 5; i++) {
*d++ = s[j];
diff --git a/src/table/palettes.h b/src/table/palettes.h
index b906b1ebe..794d2d1e7 100644
--- a/src/table/palettes.h
+++ b/src/table/palettes.h
@@ -151,33 +151,46 @@ static const Colour _palettes[][256] = {
#define GET_PALETTE(x) _palettes[x]
struct ExtraPaletteValues {
- Colour a[15]; // dark blue water
- Colour ac[15]; // dark blue water Toyland
- Colour lighthouse[12]; // lighthouse & stadium
- Colour oil_ref[21]; // oil refinery
- Colour e[15]; // ???
- Colour b[45]; // glittery water
- Colour bc[45]; // glittery water Toyland
+ Colour dark_water[15]; ///< dark blue water
+ Colour dark_water_TOY[15]; ///< dark blue water Toyland
+ Colour lighthouse[12]; ///< lighthouse & stadium
+ Colour oil_ref[21]; ///< oil refinery
+ Colour fizzy_drink[15]; ///< fizzy drinks
+ Colour glitter_water[45]; ///< glittery water
+ Colour glitter_water_TOY[45]; ///< glittery water Toyland
};
static const ExtraPaletteValues _extra_palette_values = {
+ /* dark blue water */
{ M( 32, 68, 112), M( 36, 72, 116), M( 40, 76, 120), M( 44, 80, 124),
- M( 48, 84, 128) },
+ M( 48, 84, 128) },
+
+ /* dark blue water Toyland */
{ M( 28, 108, 124), M( 32, 112, 128), M( 36, 116, 132), M( 40, 120, 136),
- M( 44, 124, 140) },
+ M( 44, 124, 140) },
+
+ /* lighthouse & stadium */
{ M(240, 208, 0), M( 0, 0, 0), M( 0, 0, 0), M( 0, 0, 0) },
+
+ /* oil refinery */
{ M(252, 60, 0), M(252, 84, 0), M(252, 108, 0), M(252, 124, 0),
- M(252, 148, 0), M(252, 172, 0), M(252, 196, 0) },
+ M(252, 148, 0), M(252, 172, 0), M(252, 196, 0) },
+
+ /* fizzy drinks */
{ M( 76, 24, 8), M(108, 44, 24), M(144, 72, 52), M(176, 108, 84),
- M(212, 148, 128) },
+ M(212, 148, 128) },
+
+ /* glittery water */
{ M(216, 244, 252), M(172, 208, 224), M(132, 172, 196), M(100, 132, 168),
- M( 72, 100, 144), M( 72, 100, 144), M( 72, 100, 144), M( 72, 100, 144),
- M( 72, 100, 144), M( 72, 100, 144), M( 72, 100, 144), M( 72, 100, 144),
- M(100, 132, 168), M(132, 172, 196), M(172, 208, 224) },
+ M( 72, 100, 144), M( 72, 100, 144), M( 72, 100, 144), M( 72, 100, 144),
+ M( 72, 100, 144), M( 72, 100, 144), M( 72, 100, 144), M( 72, 100, 144),
+ M(100, 132, 168), M(132, 172, 196), M(172, 208, 224) },
+
+ /* glittery water Toyland */
{ M(216, 244, 252), M(180, 220, 232), M(148, 200, 216), M(116, 180, 196),
- M( 92, 164, 184), M( 92, 164, 184), M( 92, 164, 184), M( 92, 164, 184),
- M( 92, 164, 184), M( 92, 164, 184), M( 92, 164, 184), M( 92, 164, 184),
- M(116, 180, 196), M(148, 200, 216), M(180, 220, 232) }
+ M( 92, 164, 184), M( 92, 164, 184), M( 92, 164, 184), M( 92, 164, 184),
+ M( 92, 164, 184), M( 92, 164, 184), M( 92, 164, 184), M( 92, 164, 184),
+ M(116, 180, 196), M(148, 200, 216), M(180, 220, 232) }
};
#undef M