summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_weapons.c2
-rw-r--r--src/qcommon/q_math.c162
-rw-r--r--src/qcommon/q_shared.h191
3 files changed, 290 insertions, 65 deletions
diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c
index 5f15808..9aa9f9d 100644
--- a/src/cgame/cg_weapons.c
+++ b/src/cgame/cg_weapons.c
@@ -1257,7 +1257,7 @@ void CG_DrawItemSelect( rectDef_t *rect, vec4_t color )
color = colorRed;
break;
case 2:
- color = colorMdGrey;
+ color = colorGray;
break;
}
color[3] = 0.5;
diff --git a/src/qcommon/q_math.c b/src/qcommon/q_math.c
index daac629..2a641a9 100644
--- a/src/qcommon/q_math.c
+++ b/src/qcommon/q_math.c
@@ -36,43 +36,133 @@ vec3_t vec3_origin = {0,0,0};
vec3_t axisDefault[3] = { { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 } };
-vec4_t colorBlack = {0, 0, 0, 1};
-vec4_t colorRed = {1, 0, 0, 1};
-vec4_t colorGreen = {0, 1, 0, 1};
-vec4_t colorBlue = {0, 0, 1, 1};
-vec4_t colorYellow = {1, 1, 0, 1};
-vec4_t colorMagenta= {1, 0, 1, 1};
-vec4_t colorCyan = {0, 1, 1, 1};
-vec4_t colorWhite = {1, 1, 1, 1};
-vec4_t colorLtGrey = {0.75, 0.75, 0.75, 1};
-vec4_t colorMdGrey = {0.5, 0.5, 0.5, 1};
-vec4_t colorDkGrey = {0.25, 0.25, 0.25, 1};
-vec4_t colorOrange = {1, 0.65, 0, 1};
-vec4_t colorPurple = {0.5, 0, 0.5, 1};
-vec4_t colorTeal = {0, 0.31, 0.31, 1};
-vec4_t colorPink = {1, 0.75, 0.80, 1};
-vec4_t colorChocolate = {0.82, 0.41, 0.12, 1};
-vec4_t colorGold = {1, 0.84, 0, 1};
-vec4_t colorIndigo = {0.29, 0, 0.51, 1};
-
-vec4_t g_color_table[16] =
+vec4_t colorBlack = {0.000f, 0.000f, 0.000f, 1.000f};
+vec4_t colorRed = {1.000f, 0.000f, 0.000f, 1.000f};
+vec4_t colorGreen = {0.000f, 1.000f, 0.000f, 1.000f};
+vec4_t colorBlue = {0.000f, 0.000f, 1.000f, 1.000f};
+vec4_t colorYellow = {1.000f, 1.000f, 0.000f, 1.000f};
+vec4_t colorMagenta = {1.000f, 0.000f, 1.000f, 1.000f};
+vec4_t colorCyan = {0.000f, 1.000f, 1.000f, 1.000f};
+vec4_t colorWhite = {1.000f, 1.000f, 1.000f, 1.000f};
+vec4_t colorGray = {0.502f, 0.502f, 0.502f, 1.000f};
+vec4_t colorOrange = {1.000f, 0.686f, 0.000f, 1.000f};
+vec4_t colorRoseBud = {0.996f, 0.671f, 0.604f, 1.000f};
+vec4_t colorPaleGreen = {0.596f, 0.984f, 0.596f, 1.000f};
+vec4_t colorPaleGolden = {0.933f, 0.910f, 0.667f, 1.000f};
+vec4_t colorColumbiaBlue = {0.608f, 0.867f, 1.000f, 1.000f};
+vec4_t colorPaleTurquoise = {0.686f, 0.933f, 0.933f, 1.000f};
+vec4_t colorPaleVioletRed = {0.859f, 0.439f, 0.576f, 1.000f};
+vec4_t colorPalacePaleWhite = {0.910f, 0.898f, 0.863f, 1.000f};
+vec4_t colorOlive = {0.231f, 0.235f, 0.212f, 1.000f};
+vec4_t colorTomato = {1.000f, 0.388f, 0.278f, 1.000f};
+vec4_t colorLime = {0.749f, 1.000f, 0.000f, 1.000f};
+vec4_t colorLemon = {1.000f, 0.969f, 0.000f, 1.000f};
+vec4_t colorBlueBerry = {0.310f, 0.525f, 0.969f, 1.000f};
+vec4_t colorTurquoise = {0.251f, 0.878f, 0.816f, 1.000f};
+vec4_t colorWildWatermelon = {0.992f, 0.357f, 0.471f, 1.000f};
+vec4_t colorSaltpan = {0.933f, 0.953f, 0.898f, 1.000f};
+vec4_t colorGrayChateau = {0.624f, 0.639f, 0.655f, 1.000f};
+vec4_t colorRust = {0.718f, 0.255f, 0.055f, 1.000f};
+vec4_t colorCopperGreen = {0.431f, 0.553f, 0.443f, 1.000f};
+vec4_t colorGold = {1.000f, 0.843f, 0.000f, 1.000f};
+vec4_t colorSteelBlue = {0.275f, 0.510f, 0.706f, 1.000f};
+vec4_t colorSteelGray = {0.482f, 0.565f, 0.584f, 1.000f};
+vec4_t colorBronze = {0.804f, 0.498f, 0.196f, 1.000f};
+vec4_t colorSilver = {0.753f, 0.753f, 0.753f, 1.000f};
+vec4_t colorDarkGray = {0.663f, 0.663f, 0.663f, 1.000f};
+vec4_t colorDarkOrange = {1.000f, 0.549f, 0.000f, 1.000f};
+vec4_t colorDarkGreen = {0.000f, 0.392f, 0.000f, 1.000f};
+vec4_t colorRedOrange = {1.000f, 0.247f, 0.204f, 1.000f};
+vec4_t colorForestGreen = {0.133f, 0.545f, 0.133f, 1.000f};
+vec4_t colorBrightSun = {0.926f, 0.741f, 0.173f, 1.000f};
+vec4_t colorMediumSlateBlue = {0.482f, 0.408f, 0.933f, 1.000f};
+vec4_t colorCeleste = {0.698f, 1.000f, 1.000f, 1.000f};
+vec4_t colorIronstone = {0.525f, 0.314f, 0.251f, 1.000f};
+vec4_t colorTimberwolf = {0.859f, 0.843f, 0.824f, 1.000f};
+vec4_t colorOnyx = {0.059f, 0.059f, 0.059f, 1.000f};
+vec4_t colorRosewood = {0.396f, 0.000f, 0.043f, 1.000f};
+vec4_t colorKokoda = {0.482f, 0.471f, 0.353f, 1.000f};
+vec4_t colorPorsche = {0.875f, 0.616f, 0.357f, 1.000f};
+vec4_t colorCloudBurst = {0.208f, 0.369f, 0.310f, 1.000f};
+vec4_t colorBlueDiane = {0.208f, 0.318f, 0.310f, 1.000f};
+vec4_t colorRope = {0.557f, 0.349f, 0.235f, 1.000f};
+vec4_t colorBlonde = {0.980f, 0.941f, 0.745f, 1.000f};
+vec4_t colorSmokeyBlack = {0.063f, 0.047f, 0.031f, 1.000f};
+vec4_t colorAmericanRose = {1.000f, 0.012f, 0.243f, 1.000f};
+vec4_t colorNeonGreen = {0.224f, 1.000f, 0.078f, 1.000f};
+vec4_t colorNeonYellow = {0.980f, 0.929f, 0.153f, 1.000f};
+vec4_t colorUltramarine = {0.071f, 0.039f, 0.561f, 1.000f};
+vec4_t colorTurquoiseBlue = {0.000f, 1.000f, 0.937f, 1.000f};
+vec4_t colorDarkMagenta = {0.545f, 0.000f, 0.545f, 1.000f};
+vec4_t colorMagicMint = {0.667f, 0.941f, 0.820f, 1.000f};
+vec4_t colorLightGray = {0.827f, 0.827f, 0.827f, 1.000f};
+vec4_t colorLightSalmon = {1.000f, 0.600f, 0.600f, 1.000f};
+vec4_t colorLightGreen = {0.565f, 0.933f, 0.565f, 1.000f};
+
+vec4_t g_color_table[62] =
{
- {0.25f, 0.25f, 0.25f, 1.00f},
- {1.00f, 0.00f, 0.00f, 1.00f},
- {0.00f, 1.00f, 0.00f, 1.00f},
- {1.00f, 1.00f, 0.00f, 1.00f},
- {0.00f, 0.00f, 1.00f, 1.00f},
- {0.00f, 1.00f, 1.00f, 1.00f},
- {1.00f, 0.00f, 1.00f, 1.00f},
- {1.00f, 1.00f, 1.00f, 1.00f},
- {1.00f, 0.65f, 0.00f, 1.00f},
- {0.50f, 0.00f, 0.50f, 1.00f},
- {0.00f, 0.31f, 0.31f, 1.00f},
- {1.00f, 0.75f, 0.80f, 1.00f},
- {0.82f, 0.41f, 0.12f, 1.00f},
- {1.00f, 0.84f, 0.00f, 1.00f},
- {0.75f, 0.75f, 0.75f, 1.00f},
- {0.29f, 0.00f, 0.51f, 1.00f},
+ {0.250f, 0.250f, 0.250f, 1.000f},
+ {1.000f, 0.000f, 0.000f, 1.000f},
+ {0.000f, 1.000f, 0.000f, 1.000f},
+ {1.000f, 1.000f, 0.000f, 1.000f},
+ {0.000f, 0.000f, 1.000f, 1.000f},
+ {0.000f, 1.000f, 1.000f, 1.000f},
+ {1.000f, 0.000f, 1.000f, 1.000f},
+ {1.000f, 1.000f, 1.000f, 1.000f},
+ {0.502f, 0.502f, 0.502f, 1.000f},
+ {1.000f, 0.686f, 0.000f, 1.000f},
+ {0.996f, 0.671f, 0.604f, 1.000f},
+ {0.596f, 0.984f, 0.596f, 1.000f},
+ {0.933f, 0.910f, 0.667f, 1.000f},
+ {0.608f, 0.867f, 1.000f, 1.000f},
+ {0.686f, 0.933f, 0.933f, 1.000f},
+ {0.859f, 0.439f, 0.576f, 1.000f},
+ {0.910f, 0.898f, 0.863f, 1.000f},
+ {0.231f, 0.235f, 0.212f, 1.000f},
+ {1.000f, 0.388f, 0.278f, 1.000f},
+ {0.749f, 1.000f, 0.000f, 1.000f},
+ {1.000f, 0.969f, 0.000f, 1.000f},
+ {0.310f, 0.525f, 0.969f, 1.000f},
+ {0.251f, 0.878f, 0.816f, 1.000f},
+ {0.992f, 0.357f, 0.471f, 1.000f},
+ {0.933f, 0.953f, 0.898f, 1.000f},
+ {0.624f, 0.639f, 0.655f, 1.000f},
+ {0.718f, 0.255f, 0.055f, 1.000f},
+ {0.431f, 0.553f, 0.443f, 1.000f},
+ {1.000f, 0.843f, 0.000f, 1.000f},
+ {0.275f, 0.510f, 0.706f, 1.000f},
+ {0.482f, 0.565f, 0.584f, 1.000f},
+ {0.804f, 0.498f, 0.196f, 1.000f},
+ {0.753f, 0.753f, 0.753f, 1.000f},
+ {0.663f, 0.663f, 0.663f, 1.000f},
+ {1.000f, 0.549f, 0.000f, 1.000f},
+ {0.000f, 0.392f, 0.000f, 1.000f},
+ {1.000f, 0.247f, 0.204f, 1.000f},
+ {0.133f, 0.545f, 0.133f, 1.000f},
+ {0.926f, 0.741f, 0.173f, 1.000f},
+ {0.482f, 0.408f, 0.933f, 1.000f},
+ {0.698f, 1.000f, 1.000f, 1.000f},
+ {0.525f, 0.314f, 0.251f, 1.000f},
+ {0.859f, 0.843f, 0.824f, 1.000f},
+ {0.059f, 0.059f, 0.059f, 1.000f},
+ {0.396f, 0.000f, 0.043f, 1.000f},
+ {0.482f, 0.471f, 0.353f, 1.000f},
+ {0.875f, 0.616f, 0.357f, 1.000f},
+ {0.208f, 0.369f, 0.310f, 1.000f},
+ {0.208f, 0.318f, 0.310f, 1.000f},
+ {0.557f, 0.349f, 0.235f, 1.000f},
+ {0.980f, 0.941f, 0.745f, 1.000f},
+ {0.063f, 0.047f, 0.031f, 1.000f},
+ {1.000f, 0.012f, 0.243f, 1.000f},
+ {0.224f, 1.000f, 0.078f, 1.000f},
+ {0.980f, 0.929f, 0.153f, 1.000f},
+ {0.071f, 0.039f, 0.561f, 1.000f},
+ {0.000f, 1.000f, 0.937f, 1.000f},
+ {0.545f, 0.000f, 0.545f, 1.000f},
+ {0.667f, 0.941f, 0.820f, 1.000f},
+ {0.827f, 0.827f, 0.827f, 1.000f},
+ {1.000f, 0.600f, 0.600f, 1.000f},
+ {0.565f, 0.933f, 0.565f, 1.000f},
};
diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h
index 831fbce..06f1bb2 100644
--- a/src/qcommon/q_shared.h
+++ b/src/qcommon/q_shared.h
@@ -348,16 +348,60 @@ extern vec4_t colorYellow;
extern vec4_t colorMagenta;
extern vec4_t colorCyan;
extern vec4_t colorWhite;
-extern vec4_t colorLtGrey;
-extern vec4_t colorMdGrey;
-extern vec4_t colorDkGrey;
+extern vec4_t colorGray;
extern vec4_t colorOrange;
-extern vec4_t colorPurple;
-extern vec4_t colorTeal;
-extern vec4_t colorPink;
-extern vec4_t colorChocolate;
+extern vec4_t colorRoseBud;
+extern vec4_t colorPaleGreen;
+extern vec4_t colorPaleGolden;
+extern vec4_t colorColumbiaBlue;
+extern vec4_t colorPaleTurquoise;
+extern vec4_t colorPaleVioletRed;
+extern vec4_t colorPalacePaleWhite;
+extern vec4_t colorOlive;
+extern vec4_t colorTomato;
+extern vec4_t colorLime;
+extern vec4_t colorLemon;
+extern vec4_t colorBlueBerry;
+extern vec4_t colorTurquoise;
+extern vec4_t colorWildWatermelon;
+extern vec4_t colorSaltpan;
+extern vec4_t colorGrayChateau;
+extern vec4_t colorRust;
+extern vec4_t colorCopperGreen;
extern vec4_t colorGold;
-extern vec4_t colorIndigo;
+extern vec4_t colorSteelBlue;
+extern vec4_t colorSteelGray;
+extern vec4_t colorBronze;
+extern vec4_t colorSilver;
+extern vec4_t colorDarkGray;
+extern vec4_t colorDarkOrange;
+extern vec4_t colorDarkGreen;
+extern vec4_t colorRedOrange;
+extern vec4_t colorForestGreen;
+extern vec4_t colorBrightSun;
+extern vec4_t colorMediumSlateBlue;
+extern vec4_t colorCeleste;
+extern vec4_t colorIronstone;
+extern vec4_t colorTimberwolf;
+extern vec4_t colorOnyx;
+extern vec4_t colorRosewood;
+extern vec4_t colorKokoda;
+extern vec4_t colorPorsche;
+extern vec4_t colorCloudBurst;
+extern vec4_t colorBlueDiane;
+extern vec4_t colorRope;
+extern vec4_t colorBlonde;
+extern vec4_t colorSmokeyBlack;
+extern vec4_t colorAmericanRose;
+extern vec4_t colorNeonGreen;
+extern vec4_t colorNeonYellow;
+extern vec4_t colorUltramarine;
+extern vec4_t colorTurquoiseBlue;
+extern vec4_t colorDarkMagenta;
+extern vec4_t colorMagicMint;
+extern vec4_t colorLightGray;
+extern vec4_t colorLightSalmon;
+extern vec4_t colorLightGreen;
#define Q_COLOR_ESCAPE '^'
#define Q_IsColorString(p) ( p && *(p) == Q_COLOR_ESCAPE && *((p)+1) && *((p)+1) != Q_COLOR_ESCAPE )
@@ -370,16 +414,61 @@ extern vec4_t colorIndigo;
#define COLOR_CYAN '5'
#define COLOR_MAGENTA '6'
#define COLOR_WHITE '7'
-#define COLOR_ORANGE '8'
-#define COLOR_PURPLE '9'
-#define COLOR_TEAL 'j'
-#define COLOR_PINK 'k'
-#define COLOR_CHOCOLATE 'l'
-#define COLOR_GOLD 'm'
-#define COLOR_SILVER 'n'
-#define COLOR_INDIGO 'o'
-#define ColorIndexForNumber(c) ((c) & 0x0F)
-#define ColorIndex(c) (ColorIndexForNumber((c) - '0'))
+#define COLOR_GRAY '8'
+#define COLOR_ORANGE '9'
+#define COLOR_ROSE_BUD 'a'
+#define COLOR_PALE_GREEN 'b'
+#define COLOR_PALE_GOLDEN 'c'
+#define COLOR_COLUMBIA_BLUE 'd'
+#define COLOR_PALE_TURQUOISE 'e'
+#define COLOR_PALE_VIOLET_RED 'f'
+#define COLOR_PALACE_PALE_WHITE 'g'
+#define COLOR_OLIVE 'h'
+#define COLOR_TOMATO 'i'
+#define COLOR_LIME 'j'
+#define COLOR_LEMON 'k'
+#define COLOR_BLUE_BERRY 'l'
+#define COLOR_TURQUOISE 'm'
+#define COLOR_WILD_WATERMELON 'n'
+#define COLOR_SALTPAN 'o'
+#define COLOR_GRAY_CHATEAU 'p'
+#define COLOR_RUST 'q'
+#define COLOR_COPPER_GREEN 'r'
+#define COLOR_GOLD 's'
+#define COLOR_STEEL_BLUE 't'
+#define COLOR_STEEL_GRAY 'u'
+#define COLOR_BRONZE 'v'
+#define COLOR_SILVER 'w'
+#define COLOR_DARK_GRAY 'x'
+#define COLOR_DARK_ORANGE 'y'
+#define COLOR_DARK_GREEN 'z'
+#define COLOR_RED_ORANGE 'A'
+#define COLOR_FOREST_GREEN 'B'
+#define COLOR_BRIGHT_SUN 'C'
+#define COLOR_MEDIUM_SLATE_BLUE 'D'
+#define COLOR_CELESTE 'E'
+#define COLOR_IRONSTONE 'F'
+#define COLOR_TIMBERWOLF 'G'
+#define COLOR_ONYX 'H'
+#define COLOR_ROSEWOOD 'I'
+#define COLOR_KOKODA 'J'
+#define COLOR_PORSCHE 'K'
+#define COLOR_CLOUD_BURST 'L'
+#define COLOR_BLUE_DIANE 'M'
+#define COLOR_ROPE 'N'
+#define COLOR_BLONDE 'O'
+#define COLOR_SMOKEY_BLACK 'P'
+#define COLOR_AMERICAN_ROSE 'Q'
+#define COLOR_NEON_GREEN 'R'
+#define COLOR_NEON_YELLOW 'S'
+#define COLOR_ULTRAMARINE 'T'
+#define COLOR_TURQUOISE_BLUE 'U'
+#define COLOR_DARK_MAGENTA 'V'
+#define COLOR_MAGIC_MINT 'W'
+#define COLOR_LIGHT_GRAY 'X'
+#define COLOR_LIGHT_SALMON 'Y'
+#define COLOR_LIGHT_GREEN 'Z'
+#define ColorIndex(c) (((((c) >= '0') && ((c) <= '9')) ? ((c) - '0') : ((((c) >= 'a') && ((c) <= 'z')) ? ((c) - 'a' + 10) : ((((c) >= 'A') && ((c) <= 'Z')) ? ((c) - 'A' + 36) : 7))))
#define S_COLOR_BLACK "^0"
#define S_COLOR_RED "^1"
@@ -389,16 +478,62 @@ extern vec4_t colorIndigo;
#define S_COLOR_CYAN "^5"
#define S_COLOR_MAGENTA "^6"
#define S_COLOR_WHITE "^7"
-#define S_COLOR_ORANGE "^8"
-#define S_COLOR_PURPLE "^9"
-#define S_COLOR_TEAL "^j"
-#define S_COLOR_PINK "^k"
-#define S_COLOR_CHOCOLATE "^l"
-#define S_COLOR_GOLD "^m"
-#define S_COLOR_SILVER "^n"
-#define S_COLOR_INDIGO "^o"
-
-extern vec4_t g_color_table[16];
+#define S_COLOR_GRAY '^8'
+#define S_COLOR_ORANGE '^9'
+#define S_COLOR_ROSE_BUD '^a'
+#define S_COLOR_PALE_GREEN '^b'
+#define S_COLOR_PALE_GOLDEN '^c'
+#define S_COLOR_COLUMBIA_BLUE '^d'
+#define S_COLOR_PALE_TURQUOISE '^e'
+#define S_COLOR_PALE_VIOLET_RED '^f'
+#define S_COLOR_PALACE_PALE_WHITE '^g'
+#define S_COLOR_OLIVE '^h'
+#define S_COLOR_TOMATO '^i'
+#define S_COLOR_LIME '^j'
+#define S_COLOR_LEMON '^k'
+#define S_COLOR_BLUE_BERRY '^l'
+#define S_COLOR_TURQUOISE '^m'
+#define S_COLOR_WILD_WATERMELON '^n'
+#define S_COLOR_SALTPAN '^o'
+#define S_COLOR_GRAY_CHATEAU '^p'
+#define S_COLOR_RUST '^q'
+#define S_COLOR_COPPER_GREEN '^r'
+#define S_COLOR_GOLD '^s'
+#define S_COLOR_STEEL_BLUE '^t'
+#define S_COLOR_STEEL_GRAY '^u'
+#define S_COLOR_BRONZE '^v'
+#define S_COLOR_SILVER '^w'
+#define S_COLOR_DARK_GRAY '^x'
+#define S_COLOR_DARK_ORANGE '^y'
+#define S_COLOR_DARK_GREEN '^z'
+#define S_COLOR_RED_ORANGE '^A'
+#define S_COLOR_FOREST_GREEN '^B'
+#define S_COLOR_BRIGHT_SUN '^C'
+#define S_COLOR_MEDIUM_SLATE_BLUE '^D'
+#define S_COLOR_CELESTE '^E'
+#define S_COLOR_IRONSTONE '^F'
+#define S_COLOR_TIMBERWOLF '^G'
+#define S_COLOR_ONYX '^H'
+#define S_COLOR_ROSEWOOD '^I'
+#define S_COLOR_KOKODA '^J'
+#define S_COLOR_PORSCHE '^K'
+#define S_COLOR_CLOUD_BURST '^L'
+#define S_COLOR_BLUE_DIANE '^M'
+#define S_COLOR_ROPE '^N'
+#define S_COLOR_BLONDE '^O'
+#define S_COLOR_SMOKEY_BLACK '^P'
+#define S_COLOR_AMERICAN_ROSE '^Q'
+#define S_COLOR_NEON_GREEN '^R'
+#define S_COLOR_NEON_YELLOW '^S'
+#define S_COLOR_ULTRAMARINE '^T'
+#define S_COLOR_TURQUOISE_BLUE '^U'
+#define S_COLOR_DARK_MAGENTA '^V'
+#define S_COLOR_MAGIC_MINT '^W'
+#define S_COLOR_LIGHT_GRAY '^X'
+#define S_COLOR_LIGHT_SALMON '^Y'
+#define S_COLOR_LIGHT_GREEN '^Z'
+
+extern vec4_t g_color_table[62];
#define MAKERGB( v, r, g, b ) v[0]=r;v[1]=g;v[2]=b
#define MAKERGBA( v, r, g, b, a ) v[0]=r;v[1]=g;v[2]=b;v[3]=a