summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-03-14 23:34:18 -0600
committerIra Rice <irarice@gmail.com>2009-03-14 23:34:18 -0600
commit4b459b50521f5d7a0518e229a20f14ed2f1d22f9 (patch)
tree123ecce327d13d000faf8341a7aa0efddc23b33c /src/gui
parent4a5c8c418703a65c8f6576a6dcdbb2529c26764d (diff)
downloadmana-4b459b50521f5d7a0518e229a20f14ed2f1d22f9.tar.gz
mana-4b459b50521f5d7a0518e229a20f14ed2f1d22f9.tar.bz2
mana-4b459b50521f5d7a0518e229a20f14ed2f1d22f9.tar.xz
mana-4b459b50521f5d7a0518e229a20f14ed2f1d22f9.zip
Improved pulsating algorithm to look better for impure colors.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/palette.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/palette.cpp b/src/gui/palette.cpp
index 5b98f403..d3e06902 100644
--- a/src/gui/palette.cpp
+++ b/src/gui/palette.cpp
@@ -296,9 +296,9 @@ void Palette::advanceGradient ()
const gcn::Color* col = &mGradVector[i]->testColor;
- mGradVector[i]->color.r = (colVal) % (col->r + 1);
- mGradVector[i]->color.g = (colVal) % (col->g + 1);
- mGradVector[i]->color.b = (colVal) % (col->b + 1);
+ mGradVector[i]->color.r = ((colVal * col->r) / 255) % (col->r + 1);
+ mGradVector[i]->color.g = ((colVal * col->g) / 255) % (col->g + 1);
+ mGradVector[i]->color.b = ((colVal * col->b) / 255) % (col->b + 1);
}
if (mGradVector[i]->grad == SPECTRUM)
{