changeset 476:3256cd39f5be

Fix remapping issues.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 07 Nov 2012 01:22:35 +0200
parents c0dedfef3edf
children 0fd0e301b6fc
files gfxconv.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gfxconv.c	Wed Nov 07 01:12:51 2012 +0200
+++ b/gfxconv.c	Wed Nov 07 01:22:35 2012 +0200
@@ -778,6 +778,7 @@
                     dpal[map->to] = n;
                     spal[n] = TRUE;
                     found = TRUE;
+                    break;
                 }
             }
             
@@ -821,7 +822,7 @@
     dmMsg(3, "Creating new palette.\n");
     for (index = 0; index < image->ncolors; index++)
     {
-        dmMsg(4, "%d -> %d\n", index, dpal[index]);
+        dmMsg(4, "%d -> %d\n", dpal[index], index);
         if (dpal[index] >= 0 && dpal[index] < image->ncolors)
         {
             memcpy(&npal[index], &(image->pal[dpal[index]]), sizeof(DMColor));
@@ -829,7 +830,7 @@
     }
 
     // Remap image
-    dmMsg(3, "Remapping image.\n");
+    dmMsg(1, "Remapping image ...\n");
     for (yc = 0; yc < image->height; yc++)
     {
         Uint8 *dp = image->data + image->pitch * yc;