1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2025-01-03 15:39:46 +01:00

More misc cleanup

This commit is contained in:
AllyTally 2023-05-22 16:18:07 -03:00 committed by Misa Elizabeth Kai
parent 8b1dcecd5a
commit b533731108

View file

@ -2967,7 +2967,7 @@ SDL_Color Graphics::getcol( int t )
{ {
// Player Normal // Player Normal
case 0: case 0:
return getRGB(160 - help.glow/2 - (GETCOL_RANDOM * 20), 200 - help.glow/2, 220 - help.glow); return getRGB(160 - help.glow/2 - (int) (GETCOL_RANDOM * 20), 200 - help.glow/2, 220 - help.glow);
// Player Hurt // Player Hurt
case 1: case 1:
return getRGB(196 - (GETCOL_RANDOM * 64), 10, 10); return getRGB(196 - (GETCOL_RANDOM * 64), 10, 10);
@ -2985,7 +2985,7 @@ SDL_Color Graphics::getcol( int t )
return getRGB(trinketr, trinketg, trinketb); return getRGB(trinketr, trinketg, trinketb);
case 4: // Inactive savepoint case 4: // Inactive savepoint
{ {
const int temp = (help.glow / 2) + (GETCOL_RANDOM * 8); const int temp = (help.glow / 2) + (int) (GETCOL_RANDOM * 8);
return getRGB(80 + temp, 80 + temp, 80 + temp); return getRGB(80 + temp, 80 + temp, 80 + temp);
} }
case 5: // Active savepoint case 5: // Active savepoint
@ -2993,9 +2993,9 @@ SDL_Color Graphics::getcol( int t )
case 6: // Enemy : Red case 6: // Enemy : Red
return getRGB(250 - help.glow / 2, 60 - help.glow / 2, 60 - help.glow / 2); return getRGB(250 - help.glow / 2, 60 - help.glow / 2, 60 - help.glow / 2);
case 7: // Enemy : Green case 7: // Enemy : Green
return getRGB(100 - help.glow/2 - (GETCOL_RANDOM * 30), 250 - help.glow/2, 100 - help.glow/2 - (GETCOL_RANDOM * 30)); return getRGB(100 - help.glow / 2 - (int) (GETCOL_RANDOM * 30), 250 - help.glow / 2, 100 - help.glow / 2 - (int) (GETCOL_RANDOM * 30));
case 8: // Enemy : Purple case 8: // Enemy : Purple
return getRGB(250 - help.glow/2, 20, 128 - help.glow/2 + (GETCOL_RANDOM * 30)); return getRGB(250 - help.glow / 2, 20, 128 - help.glow / 2 + (int) (GETCOL_RANDOM * 30));
case 9: // Enemy : Yellow case 9: // Enemy : Yellow
return getRGB(250 - help.glow / 2, 250 - help.glow / 2, 20); return getRGB(250 - help.glow / 2, 250 - help.glow / 2, 20);
case 10: // Warp point (white) case 10: // Warp point (white)
@ -3007,17 +3007,16 @@ SDL_Color Graphics::getcol( int t )
// Crew Members // Crew Members
// green // green
case 13: case 13:
return getRGB(120 - help.glow/4 - (GETCOL_RANDOM * 20), 220 - help.glow/4, 120 - help.glow/4); return getRGB(120 - help.glow / 4 - (int) (GETCOL_RANDOM * 20), 220 - help.glow / 4, 120 - help.glow / 4);
// Yellow // Yellow
case 14: case 14:
return getRGB(220 - help.glow/4 - (GETCOL_RANDOM * 20), 210 - help.glow/4, 120 - help.glow/4); return getRGB(220 - help.glow / 4 - (int) (GETCOL_RANDOM * 20), 210 - help.glow / 4, 120 - help.glow / 4);
// pink // pink
case 15: case 15:
return getRGB(255 - help.glow / 8, 70 - help.glow / 4, 70 - help.glow / 4); return getRGB(255 - help.glow / 8, 70 - help.glow / 4, 70 - help.glow / 4);
// Blue // Blue
case 16: case 16:
return getRGB(75, 75, 255 - help.glow/4 - (GETCOL_RANDOM * 20)); return getRGB(75, 75, 255 - help.glow / 4 - (int) (GETCOL_RANDOM * 20));
case 17: // Enemy : Orange case 17: // Enemy : Orange
return getRGB(250 - help.glow / 2, 130 - help.glow / 2, 20); return getRGB(250 - help.glow / 2, 130 - help.glow / 2, 20);
@ -3027,14 +3026,14 @@ SDL_Color Graphics::getcol( int t )
return getRGB(60 - help.glow / 8, 60 - help.glow / 8, 60 - help.glow / 8); return getRGB(60 - help.glow / 8, 60 - help.glow / 8, 60 - help.glow / 8);
// Purple // Purple
case 20: case 20:
return getRGB(220 - help.glow/4 - (GETCOL_RANDOM * 20), 120 - help.glow/4, 210 - help.glow/4); return getRGB(220 - help.glow / 4 - (int) (GETCOL_RANDOM * 20), 120 - help.glow/4, 210 - help.glow/4);
case 21: // Enemy : Light Gray case 21: // Enemy : Light Gray
return getRGB(180 - help.glow/2, 180 - help.glow/2, 180 - help.glow/2); return getRGB(180 - help.glow/2, 180 - help.glow/2, 180 - help.glow/2);
case 22: // Enemy : Indicator Gray case 22: // Enemy : Indicator Gray
return getRGB(230 - help.glow/2, 230 - help.glow/2, 230 - help.glow/2); return getRGB(230 - help.glow/2, 230 - help.glow/2, 230 - help.glow/2);
case 23: // Enemy : Indicator Gray case 23: // Enemy : Indicator Gray
return getRGB(255 - help.glow/2 - (GETCOL_RANDOM * 40) , 255 - help.glow/2 - (GETCOL_RANDOM * 40), 255 - help.glow/2 - (GETCOL_RANDOM * 40)); return getRGB(255 - help.glow / 2 - (int) (GETCOL_RANDOM * 40), 255 - help.glow/2 - (int) (GETCOL_RANDOM * 40), 255 - help.glow/2 - (int) (GETCOL_RANDOM * 40));
// Trophies // Trophies
// cyan // cyan
@ -3161,7 +3160,7 @@ SDL_Color Graphics::huetilegetcol()
return getRGB(234, 234, 10); return getRGB(234, 234, 10);
} }
return getRGB(250 - int(fRandom() * 32), 250 - int(fRandom() * 32), 10); return getRGB(250 - (int) (fRandom() * 32), 250 - (int) (fRandom() * 32), 10);
} }
SDL_Color Graphics::bigchunkygetcol(int t) SDL_Color Graphics::bigchunkygetcol(int t)
@ -3174,7 +3173,7 @@ SDL_Color Graphics::bigchunkygetcol(int t)
case 1: case 1:
return getRGB(random * 64, 10, 10); return getRGB(random * 64, 10, 10);
case 2: case 2:
return getRGB(160 - help.glow / 2 - random * 20, 200 - help.glow / 2, 220 - help.glow); return getRGB(160 - help.glow / 2 - (int) (random * 20), 200 - help.glow / 2, 220 - help.glow);
} }
const SDL_Color color = {0, 0, 0, 0}; const SDL_Color color = {0, 0, 0, 0};
return color; return color;
@ -3319,7 +3318,7 @@ void Graphics::textboxbuttons(void)
void Graphics::textboxcommsrelay(void) void Graphics::textboxcommsrelay(void)
{ {
/* Special treatment for the gamestate textboxes in Comms Relay */ // Special treatment for the gamestate textboxes in Comms Relay
if (!INBOUNDS_VEC(m, textboxes)) if (!INBOUNDS_VEC(m, textboxes))
{ {
vlog_error("textboxcommsrelay() out-of-bounds!"); vlog_error("textboxcommsrelay() out-of-bounds!");
@ -3332,15 +3331,25 @@ void Graphics::textboxcommsrelay(void)
int Graphics::crewcolour(const int t) int Graphics::crewcolour(const int t)
{ {
//given crewmate t, return colour in setcol // Given crewmate t, return colour
if (t == 0) return CYAN; switch (t)
if (t == 1) return PURPLE; {
if (t == 2) return YELLOW; case 0:
if (t == 3) return RED; return CYAN;
if (t == 4) return GREEN; case 1:
if (t == 5) return BLUE; return PURPLE;
case 2:
return YELLOW;
case 3:
return RED;
case 4:
return GREEN;
case 5:
return BLUE;
default:
return 0; return 0;
} }
}
void Graphics::flashlight(void) void Graphics::flashlight(void)
{ {