changeset 925:23b14d62bf67

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 25 Feb 2015 15:30:53 +0200
parents 732787cccca8
children 3132868d1548
files tools/lib64gfx.c tools/lib64gfx.h
diffstat 2 files changed, 20 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64gfx.c	Wed Feb 25 15:23:09 2015 +0200
+++ b/tools/lib64gfx.c	Wed Feb 25 15:30:53 2015 +0200
@@ -110,7 +110,7 @@
                 const int b = buf[offs + (xc / 4)];
                 const int v = 6 - ((xc * 2) & 6);
                 const Uint8 c = colors[(b >> v) & 3];
-                
+
                 *d++ = c;
                 *d++ = c;
             }
@@ -131,14 +131,14 @@
                 const int b = buf[offs + (xc / 8)];
                 const int v = 7 - (xc & 7);
                 const Uint8 c = colors[(b >> v) & 1];
-                
+
                 *d++ = c;
             }
 
             dp += img->pitch;
         }
     }
-    
+
     return DMERR_OK;
 }
 
@@ -166,7 +166,7 @@
 
     if ((*mem = dmMalloc(C64_RAM_SIZE)) == NULL)
         return DMERR_MALLOC;
-    
+
     dst       = *mem;
     dstEnd    = *mem + C64_RAM_SIZE;
 
@@ -213,7 +213,7 @@
         dmCompareAddr16(buf, 0, fmt->addr) &&
         strncmp(ident, "DRAZLACE! 1.0", 13) == 0)
         return DM_PROBE_SCORE_MAX;
-    
+
     return DM_PROBE_SCORE_FALSE;
 }
 
@@ -234,14 +234,14 @@
     size_t i, n;
     if (len < AMICA_DM_PROBE_SIZE || !dmCompareAddr16(buf, 0, fmt->addr))
         return DM_PROBE_SCORE_FALSE;
-    
+
     // Interpaint Hi-Res gives a false positive
     if (len == 9002)
         return DM_PROBE_SCORE_FALSE;
-    
+
     for (n = 0, i = 2; i < len; i++)
         if (buf[i] == 0xC2) n++;
-    
+
     if (n > 50)
         return DM_PROBE_SCORE_GOOD;
     if (n > 25)
@@ -261,7 +261,7 @@
         goto out;
 
     res = dmC64DecodeGenericBMP(img, mem, dstEnd - mem + 1, fmt);
-    
+
 out:
     dmFree(mem);
     return res;
@@ -322,7 +322,7 @@
             { DT_DEC_FUNCTION, 0x2742, 0,  1, fmtDrazLaceSetLaceType, NULL },
         }
     },
-    
+
     {
         D64_FMT_MC, "drp", "DrazPaint (unpacked)", 0x5800, 10051,
         C64_SCR_WIDTH   , C64_SCR_HEIGHT,
@@ -354,7 +354,7 @@
             { DT_DEC_FUNCTION, 0x2742, 0,  1, fmtDrazLaceSetLaceType, NULL },
         }
     },
-    
+
     {
         D64_FMT_MC | D64_FMT_ILACE, "mci", "Truepaint (unpacked)", 0x9c00, 19434,
         C64_SCR_WIDTH   , C64_SCR_HEIGHT,
@@ -372,7 +372,7 @@
             { DT_DEC_FUNCTION, 0x0000, 0,  0, fmtTruePaintSetLaceType, NULL },
         }
     },
-    
+
     {
         D64_FMT_MC, "kla", "Koala Paint (unpacked)", 0x6000, 10003,
         C64_SCR_WIDTH   , C64_SCR_HEIGHT,
@@ -654,7 +654,7 @@
         return DMERR_INTERNAL;
     }
 
-    // Clear the image structure
+    // Clear the image structure, set basics
     memset(img, 0, sizeof(*img));
     img->type = fmt->type;
 
@@ -669,7 +669,7 @@
         // Check operation validity
         if ((res = dmC64SanityCheckEncDecOp(i, op)) != DMERR_OK)
             return res;
-        
+
         // Check size
         size = (op->size == 0) ? dmC64DefaultSizes[op->type] : op->size;
 
@@ -703,7 +703,7 @@
                     case DC_D023: img->d023 = *src; break;
                     case DC_D024: img->d024 = *src; break;
                     default:
-                        dmError("Unhandled DT_COLOR_REG mode %d in ", 
+                        dmError("Unhandled DT_COLOR_REG mode %d in ",
                         "op #%d, offs=%d ($%04x), bank=%d, size=%d ($%04x) @ %d ($%04x)\n",
                         op->size, i, op->offs, op->offs, op->bank, size, size, len, len);
                         return DMERR_INTERNAL;
@@ -720,7 +720,7 @@
                     case DC_D023: img->d023 = op->offs; break;
                     case DC_D024: img->d024 = op->offs; break;
                     default:
-                        dmError("Unhandled DT_COLOR_SET mode %d in ", 
+                        dmError("Unhandled DT_COLOR_SET mode %d in ",
                         "op #%d, offs=%d ($%04x), bank=%d, size=%d ($%04x) @ %d ($%04x)\n",
                         op->size, i, op->offs, op->offs, op->bank, size, size, len, len);
                         return DMERR_INTERNAL;
@@ -743,7 +743,7 @@
                         break;
 
                     default:
-                        dmError("Unhandled DT_CHAR_CONFIG mode %d in ", 
+                        dmError("Unhandled DT_CHAR_CONFIG mode %d in ",
                         "op #%d, bank=%d, size=%d ($%04x) @ %d ($%04x)\n",
                         op->offs, i, op->bank, size, size, len, len);
                         return DMERR_INTERNAL;
@@ -855,7 +855,7 @@
                     case DC_D023: *dst = img->d023; break;
                     case DC_D024: *dst = img->d024; break;
                     default:
-                        dmError("Unhandled DT_COLOR_REG mode %d in ", 
+                        dmError("Unhandled DT_COLOR_REG mode %d in ",
                         "op #%d, offs=%d ($%04x), bank=%d, size=%d ($%04x) @ %d ($%04x)\n",
                         op->size, i, op->offs, op->offs, op->bank, size, size, *plen, *plen);
                         return DMERR_INTERNAL;
@@ -959,7 +959,7 @@
                 const int chr = src->screen[0][scroffs];
                 const int v = 6 - ((xc * 2) & 6);
                 Uint8 c;
-            
+
                 switch ((src->charmem[chr][yb] >> v) & 3)
                 {
                     case 0: c = src->bgcolor; break;
--- a/tools/lib64gfx.h	Wed Feb 25 15:23:09 2015 +0200
+++ b/tools/lib64gfx.h	Wed Feb 25 15:30:53 2015 +0200
@@ -159,7 +159,7 @@
 
     DT_CHAR_DATA,
     DT_CHAR_CONFIG,
-    
+
     DT_LAST,
 };