From d23bd4836ef6b0f03b260636e2d94d0d9976f2c5 Mon Sep 17 00:00:00 2001 From: otta8634 Date: Sun, 22 Dec 2024 19:44:20 +0800 Subject: [PATCH] Change color constants to macros rather than const vectors Not much reason to use the latter. --- qcsrc/common/colors.qh | 124 ++++++++++++++++++++--------------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/qcsrc/common/colors.qh b/qcsrc/common/colors.qh index 4791770da..899a8e3ae 100644 --- a/qcsrc/common/colors.qh +++ b/qcsrc/common/colors.qh @@ -12,73 +12,73 @@ * Perhaps in future this file can be converted to something like gfx/menu/luma/skinvalues.txt */ -const vector COLOR_WEP_ARC = '1 1 1'; -const vector COLOR_WEP_BLASTER = '1 0.5 0.5'; -const vector COLOR_WEP_CRYLINK = '1 0.5 1'; -const vector COLOR_WEP_DEVASTATOR = '1 1 0'; -const vector COLOR_WEP_ELECTRO = '0 0.5 1'; -const vector COLOR_WEP_FIREBALL = '1 0.5 0'; -const vector COLOR_WEP_HAGAR = '1 1 0.5'; -const vector COLOR_WEP_HLAC = '0 1 0'; -const vector COLOR_WEP_HOOK = '0 0.5 0'; -const vector COLOR_WEP_MACHINEGUN = '1 1 0'; -const vector COLOR_WEP_MINELAYER = '0.75 1 0'; -const vector COLOR_WEP_MORTAR = '1 0 0'; -const vector COLOR_WEP_PORTO = '0.5 0.5 0.5'; -const vector COLOR_WEP_RIFLE = '0.5 1 0'; -const vector COLOR_WEP_SEEKER = '0.5 1 0'; -const vector COLOR_WEP_SHOCKWAVE = '0.5 0.25 0'; -const vector COLOR_WEP_SHOTGUN = '0.5 0.25 0'; -const vector COLOR_WEP_TUBA = '0 1 0'; -const vector COLOR_WEP_VAPORIZER = '0.5 1 1'; -const vector COLOR_WEP_VORTEX = '0.5 1 1'; -const vector COLOR_WEP_OKHMG = '0.5 0.5 0'; -const vector COLOR_WEP_OKMACHINEGUN = '1 1 0'; -const vector COLOR_WEP_OKNEX = '0.5 1 1'; -const vector COLOR_WEP_OKRPC = '0.5 0.5 0'; -const vector COLOR_WEP_OKSHOTGUN = '0.5 0.25 0'; +#define COLOR_WEP_ARC '1 1 1' +#define COLOR_WEP_BLASTER '1 0.5 0.5' +#define COLOR_WEP_CRYLINK '1 0.5 1' +#define COLOR_WEP_DEVASTATOR '1 1 0' +#define COLOR_WEP_ELECTRO '0 0.5 1' +#define COLOR_WEP_FIREBALL '1 0.5 0' +#define COLOR_WEP_HAGAR '1 1 0.5' +#define COLOR_WEP_HLAC '0 1 0' +#define COLOR_WEP_HOOK '0 0.5 0' +#define COLOR_WEP_MACHINEGUN '1 1 0' +#define COLOR_WEP_MINELAYER '0.75 1 0' +#define COLOR_WEP_MORTAR '1 0 0' +#define COLOR_WEP_PORTO '0.5 0.5 0.5' +#define COLOR_WEP_RIFLE '0.5 1 0' +#define COLOR_WEP_SEEKER '0.5 1 0' +#define COLOR_WEP_SHOCKWAVE '0.5 0.25 0' +#define COLOR_WEP_SHOTGUN '0.5 0.25 0' +#define COLOR_WEP_TUBA '0 1 0' +#define COLOR_WEP_VAPORIZER '0.5 1 1' +#define COLOR_WEP_VORTEX '0.5 1 1' +#define COLOR_WEP_OKHMG '0.5 0.5 0' +#define COLOR_WEP_OKMACHINEGUN '1 1 0' +#define COLOR_WEP_OKNEX '0.5 1 1' +#define COLOR_WEP_OKRPC '0.5 0.5 0' +#define COLOR_WEP_OKSHOTGUN '0.5 0.25 0' -const vector COLOR_ITEM_ARMOR = '0 1 0'; -const vector COLOR_ITEM_HEALTH = '1 0 0'; -const vector COLOR_ITEM_JETPACK = '0.5 0.5 0.5'; +#define COLOR_ITEM_ARMOR '0 1 0' +#define COLOR_ITEM_HEALTH '1 0 0' +#define COLOR_ITEM_JETPACK '0.5 0.5 0.5' -const vector COLOR_POWERUP_JETPACKREGEN = '1 0.5 0'; -const vector COLOR_POWERUP_EXTRALIFE = '1 0 0'; -const vector COLOR_POWERUP_INVISIBILITY = '0.5 0.5 1'; -const vector COLOR_POWERUP_SHIELD = '1 0 1'; -const vector COLOR_POWERUP_SPEED = '0.1 1 0.84'; -const vector COLOR_POWERUP_STRENGTH = '0 0 1'; +#define COLOR_POWERUP_JETPACKREGEN '1 0.5 0' +#define COLOR_POWERUP_EXTRALIFE '1 0 0' +#define COLOR_POWERUP_INVISIBILITY '0.5 0.5 1' +#define COLOR_POWERUP_SHIELD '1 0 1' +#define COLOR_POWERUP_SPEED '0.1 1 0.84' +#define COLOR_POWERUP_STRENGTH '0 0 1' -const vector COLOR_BUFF_AMMO = '0.76 1 0.1'; -const vector COLOR_BUFF_RESISTANCE = '0.36 0 0.07'; -const vector COLOR_BUFF_MEDIC = '1 0.12 0'; -const vector COLOR_BUFF_BASH = '1 0.39 0'; -const vector COLOR_BUFF_VAMPIRE = '1 0 0.24'; -const vector COLOR_BUFF_DISABILITY = '0.94 0.3 1'; -const vector COLOR_BUFF_VENGEANCE = '1 0.23 0.61'; -const vector COLOR_BUFF_JUMP = '0.24 0.78 1'; -const vector COLOR_BUFF_INFERNO = '1 0.62 0'; -const vector COLOR_BUFF_SWAPPER = '0.63 0.36 1'; -const vector COLOR_BUFF_MAGNET = '1 0.95 0.18'; -const vector COLOR_BUFF_LUCK = '1 0.23 0.44'; -const vector COLOR_BUFF_FLIGHT = '0.23 0.44 1'; +#define COLOR_BUFF_AMMO '0.76 1 0.1' +#define COLOR_BUFF_RESISTANCE '0.36 0 0.07' +#define COLOR_BUFF_MEDIC '1 0.12 0' +#define COLOR_BUFF_BASH '1 0.39 0' +#define COLOR_BUFF_VAMPIRE '1 0 0.24' +#define COLOR_BUFF_DISABILITY '0.94 0.3 1' +#define COLOR_BUFF_VENGEANCE '1 0.23 0.61' +#define COLOR_BUFF_JUMP '0.24 0.78 1' +#define COLOR_BUFF_INFERNO '1 0.62 0' +#define COLOR_BUFF_SWAPPER '0.63 0.36 1' +#define COLOR_BUFF_MAGNET '1 0.95 0.18' +#define COLOR_BUFF_LUCK '1 0.23 0.44' +#define COLOR_BUFF_FLIGHT '0.23 0.44 1' -const vector COLOR_NADE_NORMAL = '1 1 1'; -const vector COLOR_NADE_NAPALM = '2 0.5 0'; -const vector COLOR_NADE_ICE = '0 0.5 2'; -const vector COLOR_NADE_TRANSLOCATE = '1 0 1'; -const vector COLOR_NADE_SPAWN = '1 0.9 0'; -const vector COLOR_NADE_HEAL = '1 0 0'; -const vector COLOR_NADE_MONSTER = '0.25 0.75 0'; -const vector COLOR_NADE_ENTRAP = '0.15 0.85 0'; -const vector COLOR_NADE_VEIL = '0.65 0.85 0.65'; -const vector COLOR_NADE_AMMO = '0.66 0.33 0'; -const vector COLOR_NADE_DARKNESS = '0.23 0 0.23'; +#define COLOR_NADE_NORMAL '1 1 1' +#define COLOR_NADE_NAPALM '2 0.5 0' +#define COLOR_NADE_ICE '0 0.5 2' +#define COLOR_NADE_TRANSLOCATE '1 0 1' +#define COLOR_NADE_SPAWN '1 0.9 0' +#define COLOR_NADE_HEAL '1 0 0' +#define COLOR_NADE_MONSTER '0.25 0.75 0' +#define COLOR_NADE_ENTRAP '0.15 0.85 0' +#define COLOR_NADE_VEIL '0.65 0.85 0.65' +#define COLOR_NADE_AMMO '0.66 0.33 0' +#define COLOR_NADE_DARKNESS '0.23 0 0.23' -const vector COLOR_STATUSEFFECT_BURNING = '1 0.62 0'; -const vector COLOR_STATUSEFFECT_SPAWNSHIELD = '0.36 1 0.07'; -const vector COLOR_STATUSEFFECT_STUNNED = '0.67 0.84 1'; -const vector COLOR_STATUSEFFECT_WEBBED = '0.94 0.3 1'; +#define COLOR_STATUSEFFECT_BURNING '1 0.62 0' +#define COLOR_STATUSEFFECT_SPAWNSHIELD '0.36 1 0.07' +#define COLOR_STATUSEFFECT_STUNNED '0.67 0.84 1' +#define COLOR_STATUSEFFECT_WEBBED '0.94 0.3 1' // Useful macros for the guide #define COLORED_NAME(this) strcat(rgb_to_hexcolor(this.m_color), this.m_name, "^7") -- 2.39.2