diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/qcommon/q_math.c | 35 | ||||
-rw-r--r-- | src/qcommon/q_shared.h | 48 |
2 files changed, 61 insertions, 22 deletions
diff --git a/src/qcommon/q_math.c b/src/qcommon/q_math.c index 196d2f5..daac629 100644 --- a/src/qcommon/q_math.c +++ b/src/qcommon/q_math.c @@ -47,17 +47,32 @@ 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 g_color_table[8] = +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] = { - {0.0, 0.0, 0.0, 1.0}, - {1.0, 0.0, 0.0, 1.0}, - {0.0, 1.0, 0.0, 1.0}, - {1.0, 1.0, 0.0, 1.0}, - {0.0, 0.0, 1.0, 1.0}, - {0.0, 1.0, 1.0, 1.0}, - {1.0, 0.0, 1.0, 1.0}, - {1.0, 1.0, 1.0, 1.0}, + {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}, }; diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h index b84e476..831fbce 100644 --- a/src/qcommon/q_shared.h +++ b/src/qcommon/q_shared.h @@ -351,6 +351,13 @@ extern vec4_t colorWhite; extern vec4_t colorLtGrey; extern vec4_t colorMdGrey; extern vec4_t colorDkGrey; +extern vec4_t colorOrange; +extern vec4_t colorPurple; +extern vec4_t colorTeal; +extern vec4_t colorPink; +extern vec4_t colorChocolate; +extern vec4_t colorGold; +extern vec4_t colorIndigo; #define Q_COLOR_ESCAPE '^' #define Q_IsColorString(p) ( p && *(p) == Q_COLOR_ESCAPE && *((p)+1) && *((p)+1) != Q_COLOR_ESCAPE ) @@ -363,18 +370,35 @@ extern vec4_t colorDkGrey; #define COLOR_CYAN '5' #define COLOR_MAGENTA '6' #define COLOR_WHITE '7' -#define ColorIndex(c) ( ( (c) - '0' ) & 7 ) - -#define S_COLOR_BLACK "^0" -#define S_COLOR_RED "^1" -#define S_COLOR_GREEN "^2" -#define S_COLOR_YELLOW "^3" -#define S_COLOR_BLUE "^4" -#define S_COLOR_CYAN "^5" -#define S_COLOR_MAGENTA "^6" -#define S_COLOR_WHITE "^7" - -extern vec4_t g_color_table[8]; +#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 S_COLOR_BLACK "^0" +#define S_COLOR_RED "^1" +#define S_COLOR_GREEN "^2" +#define S_COLOR_YELLOW "^3" +#define S_COLOR_BLUE "^4" +#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 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 |