1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-11-04 18:29:41 +01:00

Remove duplicate color-clamping code from Graphics::bigrprint()

For some reason, there's some color-clamping code in this function
directly after already-existing color-clamping code. This code dates
back to 2.2. And also, there's a smaller lower-bound of -1 for the red
channel, despite the fact that this smaller value doesn't matter because
the red would get clamped to 0 by the first code anyway.

So even if this was put here for some strange reason, it doesn't matter
because it doesn't do anything anyway.
This commit is contained in:
Misa 2020-09-08 13:09:14 -07:00 committed by Ethan Lee
parent a6a8173e20
commit efc9d4ea80

View file

@ -3000,14 +3000,6 @@ void Graphics::bigrprint(int x, int y, std::string& t, int r, int g, int b, bool
x -= (len(t)); x -= (len(t));
if (r < -1) r = -1;
if (g < 0) g = 0;
if (b < 0) b = 0;
if (r > 255) r = 255;
if (g > 255) g = 255;
if (b > 255) b = 255;
ct.colour = getRGB(r, g, b);
if (cen) if (cen)
{ {
x = std::max(160 - (int((len(t)/ 2.0)*sc)), 0 ); x = std::max(160 - (int((len(t)/ 2.0)*sc)), 0 );