mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-29 15:23:02 +05:00
This code can be reused (and gets reused very fine)
This commit is contained in:
parent
88664b2279
commit
b22bed5802
1 changed files with 9 additions and 13 deletions
|
@ -664,25 +664,21 @@ void DrawMoonWithPhases(uint8_t moonColor, float* screenPos, float sizeX, float
|
||||||
//D3DPERF_EndEvent();
|
//D3DPERF_EndEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CRGBA* CRGBA::BlendGangColour(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
|
||||||
|
{
|
||||||
|
const double colourIntensity = std::min( static_cast<double>(pCurrZoneInfo->ZoneColour.a) / 120.0, 1.0 );
|
||||||
|
*this = CRGBA(BlendSqr( HudColour[3], CRGBA(r, g, b), colourIntensity ), a);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
static bool bColouredZoneNames;
|
static bool bColouredZoneNames;
|
||||||
CRGBA* CRGBA::BlendGangColour_Dynamic(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
|
CRGBA* CRGBA::BlendGangColour_Dynamic(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
|
||||||
{
|
{
|
||||||
if ( bColouredZoneNames )
|
if ( bColouredZoneNames )
|
||||||
{
|
{
|
||||||
const double colourIntensity = std::min( static_cast<double>(pCurrZoneInfo->ZoneColour.a) / 120.0, 1.0 );
|
return BlendGangColour(r, g, b, a);
|
||||||
*this = CRGBA(BlendSqr( HudColour[3], CRGBA(r, g, b), colourIntensity ), a);
|
|
||||||
}
|
}
|
||||||
else
|
*this = HudColour[3];
|
||||||
{
|
|
||||||
*this = HudColour[3];
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
CRGBA* CRGBA::BlendGangColour(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
|
|
||||||
{
|
|
||||||
const double colourIntensity = std::min( static_cast<double>(pCurrZoneInfo->ZoneColour.a) / 120.0, 1.0 );
|
|
||||||
*this = CRGBA(BlendSqr( HudColour[3], CRGBA(r, g, b), colourIntensity ), a);
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue