mirror of
https://github.com/dwsJason/xrick2gs.git
synced 2024-06-06 11:29:29 +00:00
Adjust gameplay colors, so that the screen can be faded / in out, by changing the SCBS
This commit is contained in:
parent
f6ea147ed4
commit
f8fca3627c
|
@ -111,6 +111,24 @@ void savePixelsGSc1(MYBMP *pBitmap, const char* pFilename)
|
||||||
green>>=4;
|
green>>=4;
|
||||||
blue>>=4;
|
blue>>=4;
|
||||||
|
|
||||||
|
{
|
||||||
|
// Generate a ramp of colors, so SCB = 0, is black
|
||||||
|
// SCB = 15 is faded in
|
||||||
|
float scale = palnum / 15.0f;
|
||||||
|
|
||||||
|
if (palnum < 15)
|
||||||
|
{
|
||||||
|
float fr = scale * red;
|
||||||
|
float fg = scale * green;
|
||||||
|
float fb = scale * blue;
|
||||||
|
|
||||||
|
red = fr;
|
||||||
|
green = fg;
|
||||||
|
blue = fb;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
pixel |= red << 8;
|
pixel |= red << 8;
|
||||||
pixel |= green << 4;
|
pixel |= green << 4;
|
||||||
pixel |= blue;
|
pixel |= blue;
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user