changeset 2076:39b008bd2c47

Rename MapPiece::{r,g,b} and MapColor::{r,g,b} to {cr,cg,cb}.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 21 Aug 2019 14:47:22 +0300
parents c065c2c2b86e
children 8fa055824aa7
files libmaputils.c libmaputils.h map2ppm.c
diffstat 3 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/libmaputils.c	Wed Aug 21 14:45:26 2019 +0300
+++ b/libmaputils.c	Wed Aug 21 14:47:22 2019 +0300
@@ -324,7 +324,7 @@
     assert(c < nmapColors);
 
     snprintf(buf, len, "#%02x%02x%02x",
-        mapColors[c].r, mapColors[c].g, mapColors[c].b);
+        mapColors[c].cr, mapColors[c].cg, mapColors[c].cb);
 
     return buf;
 }
@@ -433,7 +433,7 @@
         fprintf(outFile,
         "  %s.%c { %s: #%02x%02x%02x;%s%s }\n",
         tagName, 'a'+n, propName ? propName : "color",
-        mapColors[n].r, mapColors[n].g, mapColors[n].b,
+        mapColors[n].cr, mapColors[n].cg, mapColors[n].cb,
         mapColors[n].bold ? " font-weight: bold;" : "",
         extra ? extra : "");
     }
--- a/libmaputils.h	Wed Aug 21 14:45:26 2019 +0300
+++ b/libmaputils.h	Wed Aug 21 14:47:22 2019 +0300
@@ -25,7 +25,7 @@
 {
     char symbol;
     char *desc;
-    int  r, g, b;
+    int  cr, cg, cb;
     int  color;
     char oldSymbol;
 } MapPiece;
@@ -42,7 +42,7 @@
 
 typedef struct
 {
-    int r, g, b;
+    int cr, cg, cb;
     int ansi;
     int ansiAttr;
     BOOL bold;
--- a/map2ppm.c	Wed Aug 21 14:45:26 2019 +0300
+++ b/map2ppm.c	Wed Aug 21 14:47:22 2019 +0300
@@ -178,9 +178,9 @@
                     else
                     {
                         c = c & 63;
-                        qr = mapPieces[c].r;
-                        qg = mapPieces[c].g;
-                        qb = mapPieces[c].b;
+                        qr = mapPieces[c].cr;
+                        qg = mapPieces[c].cg;
+                        qb = mapPieces[c].cb;
                     }
                 }
             }
@@ -189,18 +189,18 @@
             {
                 if ((c = muGetMapPieceColor(c, optUseOldFormat, optCityFormat)) >= 0)
                 {
-                    qr = mapColors[c].r;
-                    qg = mapColors[c].g;
-                    qb = mapColors[c].b;
+                    qr = mapColors[c].cr;
+                    qg = mapColors[c].cg;
+                    qb = mapColors[c].cb;
                 }
             }
             else
             {
                 if ((c = muGetMapPieceIndex(c, optUseOldFormat, optCityFormat)) >= 0)
                 {
-                    qr = mapPieces[c].r;
-                    qg = mapPieces[c].g;
-                    qb = mapPieces[c].b;
+                    qr = mapPieces[c].cr;
+                    qg = mapPieces[c].cg;
+                    qb = mapPieces[c].cb;
                 }
             }