(svn r26463) -Fix (r10190ish): Add special handling for PALETTE_CRASH to work for non-8bpp-mapped sprites.
This commit is contained in:
@@ -112,6 +112,19 @@ public:
|
||||
return Colour(r * nom / denom, g * nom / denom, b * nom / denom);
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a colour dark grey, for specialized 32bpp remapping.
|
||||
* @param r red component
|
||||
* @param g green component
|
||||
* @param b blue component
|
||||
* @return the brightness value of the new colour, now dark grey.
|
||||
*/
|
||||
static inline uint8 MakeDark(uint8 r, uint8 g, uint8 b)
|
||||
{
|
||||
/* Magic-numbers are ~66% of those used in MakeGrey() */
|
||||
return ((r * 13063) + (g * 25647) + (b * 4981)) / 65536;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a colour grey - based.
|
||||
* @param colour the colour to make grey.
|
||||
|
Reference in New Issue
Block a user