]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
gfxutil: rename to gamma_table to avoid conflict with function pointer
authorFrode Solheim <frode@fs-uae.net>
Wed, 16 Jul 2025 11:52:06 +0000 (13:52 +0200)
committerFrode Solheim <frode@fs-uae.net>
Wed, 16 Jul 2025 11:52:06 +0000 (13:52 +0200)
gfxutil.cpp

index e80d3ac39bf4e3af9715fda0c848fcd3ac3aff25..fcaf04eb4ed64b2ae5e94619e76e26f729191a55 100644 (file)
@@ -134,7 +134,7 @@ static float video_gamma (float value, float gamma, float bri, float con)
        return ret;
 }
 
-static uae_u32 gamma[256 * 3][3];
+static uae_u32 gamma_table[256 * 3][3];
 static int lf, hf;
 
 static void video_calc_gammatable(int monid)
@@ -186,7 +186,7 @@ static void video_calc_gammatable(int monid)
                        if (v > max)
                                v = max;
 
-                       gamma[i][j] = (uae_u32)(v + 0.5);
+                       gamma_table[i][j] = (uae_u32)(v + 0.5);
                }
        }
 }
@@ -310,9 +310,9 @@ void alloc_colors_rgb (int rw, int gw, int bw, int rs, int gs, int bs, int aw, i
                }
                j += 256;
 
-               rc[i] = doColor(gamma[j][0], rw, rs) | doAlpha(alpha, aw, as);
-               gc[i] = doColor(gamma[j][1], gw, gs) | doAlpha(alpha, aw, as);
-               bc[i] = doColor(gamma[j][2], bw, bs) | doAlpha(alpha, aw, as);
+               rc[i] = doColor(gamma_table[j][0], rw, rs) | doAlpha(alpha, aw, as);
+               gc[i] = doColor(gamma_table[j][1], gw, gs) | doAlpha(alpha, aw, as);
+               bc[i] = doColor(gamma_table[j][2], bw, bs) | doAlpha(alpha, aw, as);
 
                if (byte_swap) {
                        if (bpp <= 16) {
@@ -352,9 +352,9 @@ void alloc_colors64k(int monid, int rw, int gw, int bw, int rs, int gs, int bs,
                        g = (g * (255 - BLACKERTHANBLACKADJ) / 255) + BLACKERTHANBLACKADJ;
                        b = (b * (255 - BLACKERTHANBLACKADJ) / 255) + BLACKERTHANBLACKADJ;
                }
-               r = gamma[r + j][0];
-               g = gamma[g + j][1];
-               b = gamma[b + j][2];
+               r = gamma_table[r + j][0];
+               g = gamma_table[g + j][1];
+               b = gamma_table[b + j][2];
                xcolors[i] = doMask(r, rw, rs) | doMask(g, gw, gs) | doMask(b, bw, bs) | doAlpha(alpha, aw, as);
                if (byte_swap) {
                        if (bpp <= 16) {