summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-23 23:03:27 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-23 23:03:27 +0300
commit49fff1aed195d44871caeeff063b1b8c76628e02 (patch)
tree5a2d8a617c089a1e8b6c50daa05ee32cb7c5ec90
parent9c9a1a4a4e2af42246f56aa73a5212ece9af9493 (diff)
downloadmanaplus-49fff1aed195d44871caeeff063b1b8c76628e02.tar.gz
manaplus-49fff1aed195d44871caeeff063b1b8c76628e02.tar.bz2
manaplus-49fff1aed195d44871caeeff063b1b8c76628e02.tar.xz
manaplus-49fff1aed195d44871caeeff063b1b8c76628e02.zip
Remove default parameter from color.
-rw-r--r--src/dirs.cpp2
-rw-r--r--src/gui/color.h2
-rw-r--r--src/gui/palette.cpp16
-rw-r--r--src/gui/theme.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_colors.cpp13
-rw-r--r--src/progs/dyecmd/gui/viewport.cpp2
-rw-r--r--src/progs/manaplus/gui/viewport.cpp2
7 files changed, 20 insertions, 19 deletions
diff --git a/src/dirs.cpp b/src/dirs.cpp
index 004e1fdb4..54f28aed1 100644
--- a/src/dirs.cpp
+++ b/src/dirs.cpp
@@ -82,7 +82,7 @@ static void updateProgress(int cnt)
{
const int progress = cnt + loadingProgressCounter;
const int h = mainGraphics->mHeight;
- mainGraphics->setColor(Color(255, 255, 255));
+ mainGraphics->setColor(Color(255, 255, 255, 255));
const int maxSize = mainGraphics->mWidth - 100;
const int width = maxSize * progress / 50;
mainGraphics->fillRectangle(Rect(50, h - 100, width, 50));
diff --git a/src/gui/color.h b/src/gui/color.h
index c4a1aab01..71f688fda 100644
--- a/src/gui/color.h
+++ b/src/gui/color.h
@@ -118,7 +118,7 @@ class Color final
constexpr Color(const unsigned int ar,
const unsigned int ag,
const unsigned int ab,
- const unsigned int aa = 255) :
+ const unsigned int aa) :
r(ar),
g(ag),
b(ab),
diff --git a/src/gui/palette.cpp b/src/gui/palette.cpp
index 7fcf153fe..6a24a03b3 100644
--- a/src/gui/palette.cpp
+++ b/src/gui/palette.cpp
@@ -32,18 +32,18 @@
#include "debug.h"
-const Color Palette::BLACK = Color(0, 0, 0);
+const Color Palette::BLACK = Color(0, 0, 0, 255);
Palette::Palettes Palette::mInstances;
const Color Palette::RAINBOW_COLORS[7] =
{
- Color(255, 0, 0),
- Color(255, 153, 0),
- Color(255, 255, 0),
- Color(0, 153, 0),
- Color(0, 204, 204),
- Color(51, 0, 153),
- Color(153, 0, 153)
+ Color(255, 0, 0, 255),
+ Color(255, 153, 0, 255),
+ Color(255, 255, 0, 255),
+ Color(0, 153, 0, 255),
+ Color(0, 204, 204, 255),
+ Color(51, 0, 153, 255),
+ Color(153, 0, 153, 255)
};
const int Palette::RAINBOW_COLOR_COUNT = 7;
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index cbc0d654c..6d9c572ba 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -172,7 +172,7 @@ Color Theme::getProgressColor(const ProgressColorIdT type,
}
}
- return Color(color[0], color[1], color[2]);
+ return Color(color[0], color[1], color[2], 255U);
}
Skin *Theme::load(const std::string &filename,
diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp
index 224bc9799..f6f8dc386 100644
--- a/src/gui/widgets/tabs/setup_colors.cpp
+++ b/src/gui/widgets/tabs/setup_colors.cpp
@@ -477,15 +477,16 @@ void Setup_Colors::updateColor() const
if (grad == GradientType::STATIC)
{
userPalette->setColor(type,
- CAST_S32(mRedSlider->getValue()),
- CAST_S32(mGreenSlider->getValue()),
- CAST_S32(mBlueSlider->getValue()));
+ CAST_S32(mRedSlider->getValue()),
+ CAST_S32(mGreenSlider->getValue()),
+ CAST_S32(mBlueSlider->getValue()));
}
else if (grad == GradientType::PULSE)
{
userPalette->setTestColor(type, Color(
- CAST_S32(mRedSlider->getValue()),
- CAST_S32(mGreenSlider->getValue()),
- CAST_S32(mBlueSlider->getValue())));
+ CAST_S32(mRedSlider->getValue()),
+ CAST_S32(mGreenSlider->getValue()),
+ CAST_S32(mBlueSlider->getValue()),
+ 255U));
}
}
diff --git a/src/progs/dyecmd/gui/viewport.cpp b/src/progs/dyecmd/gui/viewport.cpp
index 30e89518e..b25ec796e 100644
--- a/src/progs/dyecmd/gui/viewport.cpp
+++ b/src/progs/dyecmd/gui/viewport.cpp
@@ -94,7 +94,7 @@ void Viewport::draw(Graphics *const graphics)
BLOCK_START("Viewport::draw 1")
static int lastTick = tick_time;
- graphics->setColor(Color(64, 64, 64));
+ graphics->setColor(Color(64, 64, 64, 255));
graphics->fillRectangle(
Rect(0, 0, getWidth(), getHeight()));
diff --git a/src/progs/manaplus/gui/viewport.cpp b/src/progs/manaplus/gui/viewport.cpp
index 2ae57f170..a4ca4959b 100644
--- a/src/progs/manaplus/gui/viewport.cpp
+++ b/src/progs/manaplus/gui/viewport.cpp
@@ -134,7 +134,7 @@ void Viewport::draw(Graphics *const graphics)
if ((mMap == nullptr) || (localPlayer == nullptr))
{
- graphics->setColor(Color(64, 64, 64));
+ graphics->setColor(Color(64, 64, 64, 255));
graphics->fillRectangle(
Rect(0, 0, getWidth(), getHeight()));
BLOCK_END("Viewport::draw 1")