]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/color.qh
Mark [[eraseable]] most of the common functions in the lib directory. Since many...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / color.qh
index d1fdc2c3bcf39d82b3249c9c10f457b395e02a7a..7de70e8314e9dbe47cc6a9472257a415c1230f1d 100644 (file)
@@ -3,6 +3,7 @@
 #include "string.qh"
 
 #define colormapPaletteColor(c, isPants) colormapPaletteColor_(c, isPants, time)
+[[eraseable]]
 vector colormapPaletteColor_(int c, bool isPants, float t)
 {
        switch (c)
@@ -35,6 +36,7 @@ vector colormapPaletteColor_(int c, bool isPants, float t)
        }
 }
 
+[[eraseable]]
 float rgb_mi_ma_to_hue(vector rgb, float mi, float ma)
 {
        if (mi == ma)
@@ -56,6 +58,7 @@ float rgb_mi_ma_to_hue(vector rgb, float mi, float ma)
        }
 }
 
+[[eraseable]]
 vector hue_mi_ma_to_rgb(float hue, float mi, float ma)
 {
        vector rgb;
@@ -110,6 +113,7 @@ vector hue_mi_ma_to_rgb(float hue, float mi, float ma)
        return rgb;
 }
 
+[[eraseable]]
 vector rgb_to_hsv(vector rgb)
 {
        float mi, ma;
@@ -127,11 +131,13 @@ vector rgb_to_hsv(vector rgb)
        return hsv;
 }
 
+[[eraseable]]
 vector hsv_to_rgb(vector hsv)
 {
        return hue_mi_ma_to_rgb(hsv.x, hsv.z * (1 - hsv.y), hsv.z);
 }
 
+[[eraseable]]
 vector rgb_to_hsl(vector rgb)
 {
        float mi, ma;
@@ -151,6 +157,7 @@ vector rgb_to_hsl(vector rgb)
        return hsl;
 }
 
+[[eraseable]]
 vector hsl_to_rgb(vector hsl)
 {
        float mi, ma, maminusmi;
@@ -166,6 +173,7 @@ vector hsl_to_rgb(vector hsl)
        return hue_mi_ma_to_rgb(hsl.x, mi, ma);
 }
 
+[[eraseable]]
 string rgb_to_hexcolor(vector rgb)
 {
        return strcat(