changeset 837:5333dd4a99e4

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 13 Jul 2014 17:42:40 +0300
parents 85442780089f
children f2ac9877263e
files tools/gfxconv.c
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/tools/gfxconv.c	Sun Jul 13 17:41:47 2014 +0300
+++ b/tools/gfxconv.c	Sun Jul 13 17:42:40 2014 +0300
@@ -12,13 +12,13 @@
 #include "libgfx.h"
 #include "lib64gfx.h"
 
-//#define UNFINISHED 1
 
 #define DM_MAX_COLORS 256
 
-#define ASC_NBITS    8
-#define ASC_NCOLORS  4
-static const char dmASCIIPalette[ASC_NCOLORS] = ".:X#";
+#define DM_ASC_NBITS    8
+#define DM_ASC_NCOLORS  4
+static const char dmASCIIPalette[DM_ASC_NCOLORS] = ".:X#";
+
 
 enum
 {
@@ -110,6 +110,7 @@
 
 char    *optInFilename = NULL,
         *optOutFilename = NULL;
+
 int     optInFormat = FFMT_AUTO,
         optOutFormat = FFMT_ASCII,
         optInSubFormat = IMGFMT_PNG,
@@ -207,6 +208,7 @@
     dmArgsPrintHelp(stdout, optList, optListN);
 
     printf(
+    "\n"
     "Palette / color remapping (-R)\n"
     "------------------------------\n"
     "Indexed palette/color remapping can be performed via the -R option, either\n"
@@ -232,6 +234,7 @@
     "The numbers are palette indexes, and the order is for bit(pair)-values\n"
     "00, 01, 10, 11 (multi color) and 0, 1 (single color). NOTICE! 255 is the\n"
     "special color that can be used for transparency.\n"
+    "\n"
     );
 }
 
@@ -684,7 +687,7 @@
     
     if (multicolor)
     {
-        for (i = ASC_NBITS; i; i -= 2)
+        for (i = DM_ASC_NBITS; i; i -= 2)
         {
             int val = (byte & (3ULL << (i - 2))) >> (i - 2);
             char ch;
@@ -706,7 +709,7 @@
     }
     else
     {
-        for (i = ASC_NBITS; i; i--)
+        for (i = DM_ASC_NBITS; i; i--)
         {
             int val = (byte & (1ULL << (i - 1))) >> (i - 1);
             char ch;