From 4ddcd017303435ac9dae6fca566119aeb1c099f1 Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Mon, 25 Jan 2010 19:15:25 +0000 Subject: [PATCH] Palette operations that displace colors (sort, x-swap, x-inv, maybe others) now move around the transparent color index accordingly. The idea is that these changes don't modify 'What you see' of the image, and if the transp color was unchanged, it would be a huge visual change. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1281 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- palette.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/palette.c b/palette.c index 1ea2ccc7..4236a006 100644 --- a/palette.c +++ b/palette.c @@ -234,6 +234,10 @@ void Remap_image_highlevel(byte * conversion_table) for (layer=0; layerPages->Nb_layers; layer++) Remap_general_lowlevel(conversion_table,Main_backups->Pages->Image[layer],Main_image_width,Main_image_height,Main_image_width); + // Remap transparent color + Main_backups->Pages->Transparent_color = + conversion_table[Main_backups->Pages->Transparent_color]; + // On calcule les limites à l'écran de l'image if (Main_image_height>=Menu_Y_before_window) end_y=Menu_Y_before_window;