diff options
Diffstat (limited to 'src/gui/palette.cpp')
-rw-r--r-- | src/gui/palette.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/gui/palette.cpp b/src/gui/palette.cpp index d3e06902..b1e165aa 100644 --- a/src/gui/palette.cpp +++ b/src/gui/palette.cpp @@ -3,7 +3,7 @@ * Copyright (C) 2008 Douglas Boffey <dougaboffey@netscape.net> * Copyright (C) 2009 The Mana World Development Team * - * This file is part of Aethyra. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -45,12 +45,12 @@ const gcn::Color Palette::RAINBOW_COLORS[7] = { /** Number of Elemets of RAINBOW_COLORS */ const int Palette::RAINBOW_COLOR_COUNT = 7; -std::string Palette::getConfigName(const std::string& typeName) +std::string Palette::getConfigName(const std::string &typeName) { std::string res = "Color" + typeName; int pos = 5; - for (unsigned int i = 0; i < typeName.length(); i++) + for (size_t i = 0; i < typeName.length(); i++) { if (i == 0 || typeName[i] == '_') { @@ -70,14 +70,13 @@ std::string Palette::getConfigName(const std::string& typeName) return res; } -DEFENUMNAMES(ColorType, COLOR_TYPE); +DEFENUMNAMES(ColorType, COLOR_TYPE) const int Palette::GRADIENT_DELAY = 40; Palette::Palette() : mRainbowTime(tick_time), - mColVector(ColVector(TYPE_COUNT)), - mGradVector() + mColVector(ColVector(TYPE_COUNT)) { std::string indent = " "; addColor(TEXT, 0x000000, STATIC, _("Text")); @@ -177,7 +176,7 @@ void Palette::setGradient(ColorType type, GradientType grad) ColorElem *elem = &mColVector[type]; if (elem->grad != STATIC && grad == STATIC) { - for (unsigned int i = 0; i < mGradVector.size(); i++) + for (size_t i = 0; i < mGradVector.size(); i++) { if (mGradVector[i] == elem) { @@ -278,7 +277,7 @@ void Palette::advanceGradient () int advance = get_elapsed_time(mRainbowTime) / 5; double startColVal, destColVal; - for (unsigned int i = 0; i < mGradVector.size(); i++) + for (size_t i = 0; i < mGradVector.size(); i++) { mGradVector[i]->gradientIndex = (mGradVector[i]->gradientIndex + advance) % @@ -346,4 +345,3 @@ void Palette::advanceGradient () mRainbowTime = tick_time; } } - |