# HG changeset patch # User Matti Hamalainen # Date 1352244155 -7200 # Node ID 3256cd39f5beb4f838d7cce6ab59785f526044a2 # Parent c0dedfef3edf3b22f91687e62a12a292671ccecd Fix remapping issues. diff -r c0dedfef3edf -r 3256cd39f5be gfxconv.c --- 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;