mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
Removed the create functions in the ColorShifter classes.
This commit is contained in:
@ -739,8 +739,11 @@ void CPlayerInterface::battleUnitsChanged(const std::vector<UnitChanges> & units
|
|||||||
if(unit->alive() && animation->isDead())
|
if(unit->alive() && animation->isDead())
|
||||||
animation->setType(CCreatureAnim::HOLDING);
|
animation->setType(CCreatureAnim::HOLDING);
|
||||||
|
|
||||||
if(unit->isClone())
|
if (unit->isClone())
|
||||||
animation->shiftColor(ColorShifterDeepBlue::create());
|
{
|
||||||
|
std::unique_ptr<ColorShifterDeepBlue> shifter(new ColorShifterDeepBlue());
|
||||||
|
animation->shiftColor(shifter.get());
|
||||||
|
}
|
||||||
|
|
||||||
//TODO: handle more cases
|
//TODO: handle more cases
|
||||||
}
|
}
|
||||||
|
@ -161,12 +161,6 @@ public:
|
|||||||
class ColorShifterLightBlue : public ColorShifter
|
class ColorShifterLightBlue : public ColorShifter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static ColorShifterLightBlue * create()
|
|
||||||
{
|
|
||||||
std::unique_ptr<ColorShifterLightBlue> shifter(new ColorShifterLightBlue());
|
|
||||||
return shifter.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
SDL_Color shiftColor(SDL_Color clr) const override
|
SDL_Color shiftColor(SDL_Color clr) const override
|
||||||
{
|
{
|
||||||
clr.b = clr.b + (255 - clr.b) / 2;
|
clr.b = clr.b + (255 - clr.b) / 2;
|
||||||
@ -177,12 +171,6 @@ public:
|
|||||||
class ColorShifterDeepBlue : public ColorShifter
|
class ColorShifterDeepBlue : public ColorShifter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static ColorShifterDeepBlue * create()
|
|
||||||
{
|
|
||||||
std::unique_ptr<ColorShifterDeepBlue> shifter(new ColorShifterDeepBlue());
|
|
||||||
return shifter.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
SDL_Color shiftColor(SDL_Color clr) const override
|
SDL_Color shiftColor(SDL_Color clr) const override
|
||||||
{
|
{
|
||||||
clr.b = 255;
|
clr.b = 255;
|
||||||
@ -193,12 +181,6 @@ public:
|
|||||||
class ColorShifterDeepRed : public ColorShifter
|
class ColorShifterDeepRed : public ColorShifter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static ColorShifterDeepRed * create()
|
|
||||||
{
|
|
||||||
std::unique_ptr<ColorShifterDeepRed> shifter(new ColorShifterDeepRed());
|
|
||||||
return shifter.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
SDL_Color shiftColor(SDL_Color clr) const override
|
SDL_Color shiftColor(SDL_Color clr) const override
|
||||||
{
|
{
|
||||||
clr.r = 255;
|
clr.r = 255;
|
||||||
|
Reference in New Issue
Block a user