diff tools/gfxconv.c @ 1543:416d7b3ba3b2

Rename libgfx IMGFMT_* constants to DM_IMGFMT_*.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 12 May 2018 17:48:56 +0300
parents 776aa43b2c57
children 3b613fcbf3ff
line wrap: on
line diff
--- a/tools/gfxconv.c	Sat May 12 05:31:40 2018 +0300
+++ b/tools/gfxconv.c	Sat May 12 17:48:56 2018 +0300
@@ -67,27 +67,27 @@
     },
     {
         "PNG image file", "png", TRUE, TRUE,
-        FFMT_IMAGE  , IMGFMT_PNG,
+        FFMT_IMAGE  , DM_IMGFMT_PNG,
     },
     {
         "PPM image file", "ppm", FALSE, TRUE,
-        FFMT_IMAGE  , IMGFMT_PPM,
+        FFMT_IMAGE  , DM_IMGFMT_PPM,
     },
     {
         "PCX image file", "pcx", TRUE, TRUE,
-        FFMT_IMAGE  , IMGFMT_PCX,
+        FFMT_IMAGE  , DM_IMGFMT_PCX,
     },
     {
         "IFF ILBM file", "lbm", TRUE, FALSE,
-        FFMT_IMAGE  , IMGFMT_ILBM,
+        FFMT_IMAGE  , DM_IMGFMT_ILBM,
     },
     {
         "Bitplaned RAW (intl/non-intl) image file", "raw", FALSE, TRUE,
-        FFMT_IMAGE  , IMGFMT_RAW,
+        FFMT_IMAGE  , DM_IMGFMT_RAW,
     },
     {
         "IFFMaster RAW image file", "araw", FALSE, TRUE,
-        FFMT_IMAGE  , IMGFMT_ARAW,
+        FFMT_IMAGE  , DM_IMGFMT_ARAW,
     },
 
     {
@@ -122,8 +122,8 @@
 
 int     optInFormat = FFMT_AUTO,
         optOutFormat = FFMT_ASCII,
-        optInSubFormat = IMGFMT_PNG,
-        optOutSubFormat = IMGFMT_PNG,
+        optInSubFormat = DM_IMGFMT_PNG,
+        optOutSubFormat = DM_IMGFMT_PNG,
         optItemCount = -1,
         optPlanedWidth = 1,
         optForcedFormat = -1;
@@ -1154,27 +1154,27 @@
     switch (iformat)
     {
 #ifdef DM_USE_LIBPNG
-        case IMGFMT_PNG:
+        case DM_IMGFMT_PNG:
             spec->format = spec->paletted ? DM_IFMT_PALETTE : DM_IFMT_RGBA;
             dmOutputImageBitFormat(spec->format, info);
             res = dmWritePNGImage(filename, image, spec);
             break;
 #endif
 
-        case IMGFMT_PPM:
+        case DM_IMGFMT_PPM:
             spec->format = DM_IFMT_RGB;
             dmOutputImageBitFormat(spec->format, info);
             res = dmWritePPMImage(filename, image, spec);
             break;
 
-        case IMGFMT_PCX:
+        case DM_IMGFMT_PCX:
             spec->format = spec->paletted ? DM_IFMT_PALETTE : DM_IFMT_RGB;
             dmOutputImageBitFormat(spec->format, info);
             res = dmWritePCXImage(filename, image, spec);
             break;
 
-        case IMGFMT_RAW:
-        case IMGFMT_ARAW:
+        case DM_IMGFMT_RAW:
+        case DM_IMGFMT_ARAW:
             {
                 // Open data file for writing
                 FILE *fp;
@@ -1202,7 +1202,7 @@
                             palID[i] = '_';
                     }
 
-                    if (iformat == IMGFMT_ARAW)
+                    if (iformat == DM_IMGFMT_ARAW)
                     {
                         fprintf(fp,
                         "%s_width: dw.w %d\n"
@@ -1629,7 +1629,7 @@
         exit(1);
 
 #ifndef DM_USE_LIBPNG
-    if (optOutFormat == IMGFMT_PNG)
+    if (optOutFormat == DM_IMGFMT_PNG)
     {
         dmErrorMsg("PNG output format support not compiled in, sorry.\n");
         goto error;