mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-31 22:19:44 +01:00
More misc cleanup
This commit is contained in:
parent
8b1dcecd5a
commit
b533731108
1 changed files with 84 additions and 75 deletions
|
@ -2967,7 +2967,7 @@ SDL_Color Graphics::getcol( int t )
|
|||
{
|
||||
// Player Normal
|
||||
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
|
||||
case 1:
|
||||
return getRGB(196 - (GETCOL_RANDOM * 64), 10, 10);
|
||||
|
@ -2985,7 +2985,7 @@ SDL_Color Graphics::getcol( int t )
|
|||
return getRGB(trinketr, trinketg, trinketb);
|
||||
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);
|
||||
}
|
||||
case 5: // Active savepoint
|
||||
|
@ -2993,9 +2993,9 @@ SDL_Color Graphics::getcol( int t )
|
|||
case 6: // Enemy : Red
|
||||
return getRGB(250 - help.glow / 2, 60 - help.glow / 2, 60 - help.glow / 2);
|
||||
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
|
||||
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
|
||||
return getRGB(250 - help.glow / 2, 250 - help.glow / 2, 20);
|
||||
case 10: // Warp point (white)
|
||||
|
@ -3007,17 +3007,16 @@ SDL_Color Graphics::getcol( int t )
|
|||
// Crew Members
|
||||
// green
|
||||
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
|
||||
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
|
||||
case 15:
|
||||
return getRGB(255 - help.glow / 8, 70 - help.glow / 4, 70 - help.glow / 4);
|
||||
// Blue
|
||||
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
|
||||
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);
|
||||
// Purple
|
||||
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
|
||||
return getRGB(180 - help.glow/2, 180 - help.glow/2, 180 - help.glow/2);
|
||||
case 22: // Enemy : Indicator Gray
|
||||
return getRGB(230 - help.glow/2, 230 - help.glow/2, 230 - help.glow/2);
|
||||
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
|
||||
// cyan
|
||||
|
@ -3161,7 +3160,7 @@ SDL_Color Graphics::huetilegetcol()
|
|||
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)
|
||||
|
@ -3174,7 +3173,7 @@ SDL_Color Graphics::bigchunkygetcol(int t)
|
|||
case 1:
|
||||
return getRGB(random * 64, 10, 10);
|
||||
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};
|
||||
return color;
|
||||
|
@ -3319,7 +3318,7 @@ void Graphics::textboxbuttons(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))
|
||||
{
|
||||
vlog_error("textboxcommsrelay() out-of-bounds!");
|
||||
|
@ -3332,15 +3331,25 @@ void Graphics::textboxcommsrelay(void)
|
|||
|
||||
int Graphics::crewcolour(const int t)
|
||||
{
|
||||
//given crewmate t, return colour in setcol
|
||||
if (t == 0) return CYAN;
|
||||
if (t == 1) return PURPLE;
|
||||
if (t == 2) return YELLOW;
|
||||
if (t == 3) return RED;
|
||||
if (t == 4) return GREEN;
|
||||
if (t == 5) return BLUE;
|
||||
// Given crewmate t, return colour
|
||||
switch (t)
|
||||
{
|
||||
case 0:
|
||||
return CYAN;
|
||||
case 1:
|
||||
return PURPLE;
|
||||
case 2:
|
||||
return YELLOW;
|
||||
case 3:
|
||||
return RED;
|
||||
case 4:
|
||||
return GREEN;
|
||||
case 5:
|
||||
return BLUE;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void Graphics::flashlight(void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue