Remove no-op function Palette_loaded.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2109 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
26458456a8
commit
d9f2cd2d40
@ -130,7 +130,6 @@ void Load_IMG(T_IO_Context * context)
|
||||
if (File_error==0)
|
||||
{
|
||||
memcpy(context->Palette,IMG_header.Palette,sizeof(T_Palette));
|
||||
Palette_loaded(context);
|
||||
|
||||
context->Width=IMG_header.Width;
|
||||
context->Height=IMG_header.Height;
|
||||
@ -680,7 +679,6 @@ void Load_IFF(T_IO_Context * context)
|
||||
Adapt_palette_HAM(context);
|
||||
Palette_64_to_256(context->Palette);
|
||||
}
|
||||
Palette_loaded(context);
|
||||
|
||||
// On lit l'octet de padding du CMAP si la taille est impaire
|
||||
if (nb_colors&1)
|
||||
@ -1444,7 +1442,6 @@ void Load_BMP(T_IO_Context * context)
|
||||
context->Palette[index].G=local_palette[index][1];
|
||||
context->Palette[index].B=local_palette[index][0];
|
||||
}
|
||||
Palette_loaded(context);
|
||||
|
||||
context->Width=header.Width;
|
||||
context->Height=header.Height;
|
||||
@ -2382,8 +2379,6 @@ void Load_GIF(T_IO_Context * context)
|
||||
previous_pos_x=IDB.Pos_X;
|
||||
previous_pos_y=IDB.Pos_Y;
|
||||
|
||||
Palette_loaded(context);
|
||||
|
||||
File_error=0;
|
||||
if (!Read_byte(GIF_file,&(initial_nb_bits)))
|
||||
File_error=1;
|
||||
@ -3215,7 +3210,6 @@ void Load_PCX(T_IO_Context * context)
|
||||
}
|
||||
}
|
||||
}
|
||||
Palette_loaded(context);
|
||||
|
||||
// Maintenant qu'on a lu la palette que ces crétins sont allés foutre
|
||||
// à la fin, on retourne juste après le header pour lire l'image.
|
||||
@ -3621,7 +3615,6 @@ void Load_SCx(T_IO_Context * context)
|
||||
|
||||
Palette_64_to_256(SCx_Palette);
|
||||
memcpy(context->Palette,SCx_Palette,size);
|
||||
Palette_loaded(context);
|
||||
|
||||
context->Width=SCx_header.Width;
|
||||
context->Height=SCx_header.Height;
|
||||
@ -4069,10 +4062,6 @@ void Load_PNG(T_IO_Context * context)
|
||||
free(palette);
|
||||
palette = NULL;
|
||||
}
|
||||
if (color_type != PNG_COLOR_TYPE_RGB && color_type != PNG_COLOR_TYPE_RGB_ALPHA)
|
||||
{
|
||||
Palette_loaded(context);
|
||||
}
|
||||
// Transparency (tRNS)
|
||||
if (png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, &trans_values))
|
||||
{
|
||||
|
||||
@ -23,7 +23,6 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Grafx2; if not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
#define _XOPEN_SOURCE 500
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
@ -267,28 +266,6 @@ void Fill_canvas(T_IO_Context *context, byte color)
|
||||
}
|
||||
}
|
||||
|
||||
void Palette_loaded(T_IO_Context *context)
|
||||
{
|
||||
// Update the current screen to the loaded palette
|
||||
switch (context->Type)
|
||||
{
|
||||
case CONTEXT_MAIN_IMAGE:
|
||||
case CONTEXT_PREVIEW:
|
||||
case CONTEXT_BRUSH:
|
||||
case CONTEXT_SURFACE:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (context->Type)
|
||||
{
|
||||
case CONTEXT_PREVIEW:
|
||||
case CONTEXT_MAIN_IMAGE:
|
||||
case CONTEXT_BRUSH:
|
||||
case CONTEXT_SURFACE:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Chargement des pixels dans le buffer 24b
|
||||
void Set_pixel_24b(T_IO_Context *context, short x_pos, short y_pos, byte r, byte g, byte b)
|
||||
{
|
||||
@ -549,7 +526,6 @@ void Pre_load(T_IO_Context *context, short width, short height, long file_size,
|
||||
case CONTEXT_PREVIEW:
|
||||
// Load palette
|
||||
Set_palette_fake_24b(context->Palette);
|
||||
Palette_loaded(context);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -672,10 +648,6 @@ void Load_image(T_IO_Context *context)
|
||||
Flush_update();
|
||||
if (Convert_24b_bitmap_to_256(Main_backups->Pages->Image[0].Pixels,context->Buffer_image_24b,context->Width,context->Height,context->Palette))
|
||||
File_error=2;
|
||||
else
|
||||
{
|
||||
Palette_loaded(context);
|
||||
}
|
||||
Hide_cursor();
|
||||
Cursor_shape=old_cursor_shape;
|
||||
Display_cursor();
|
||||
|
||||
@ -203,10 +203,6 @@ unsigned int Nb_known_formats(void);
|
||||
|
||||
/// Generic allocation and similar stuff, done at beginning of image load, as soon as size is known.
|
||||
void Pre_load(T_IO_Context *context, short width, short height, long file_size, int format, enum PIXEL_RATIO ratio, byte truecolor);
|
||||
/// Remaps the window. To call after palette (last) changes.
|
||||
void Palette_loaded(T_IO_Context *context);
|
||||
/// Generic cleanup done on end of loading (ex: color-conversion from the temporary 24b buffer)
|
||||
//void Post_load(T_IO_Context *context);
|
||||
/// Fill the entire current layer/frame of an image being loaded with a color.
|
||||
void Fill_canvas(T_IO_Context *context, byte color);
|
||||
|
||||
|
||||
@ -117,7 +117,6 @@ void Load_PAL(T_IO_Context * context)
|
||||
{
|
||||
Palette_64_to_256(palette_64);
|
||||
memcpy(context->Palette, palette_64, sizeof(T_Palette));
|
||||
Palette_loaded(context);
|
||||
}
|
||||
else
|
||||
File_error = 2;
|
||||
@ -142,7 +141,6 @@ void Load_PAL(T_IO_Context * context)
|
||||
context->Palette[i].G = g;
|
||||
context->Palette[i].B = b;
|
||||
}
|
||||
Palette_loaded(context);
|
||||
} else if(strncmp(filename, "RIFF", 4) == 0) {
|
||||
// Microsoft RIFF format.
|
||||
fseek(file, 8, SEEK_SET);
|
||||
@ -404,7 +402,6 @@ void Load_PKM(T_IO_Context * context)
|
||||
// Palette lue en 64
|
||||
memcpy(context->Palette,header.Palette,sizeof(T_Palette));
|
||||
Palette_64_to_256(context->Palette);
|
||||
Palette_loaded(context);
|
||||
|
||||
Compteur_de_donnees_packees=0;
|
||||
Compteur_de_pixels=0;
|
||||
@ -1134,7 +1131,6 @@ void Load_KCF(T_IO_Context * context)
|
||||
context->Palette[index].B=context->Palette[index+16].B;
|
||||
}
|
||||
|
||||
Palette_loaded(context);
|
||||
}
|
||||
else
|
||||
File_error=1;
|
||||
@ -1193,7 +1189,6 @@ void Load_KCF(T_IO_Context * context)
|
||||
context->Palette[index].B=context->Palette[index+16].B;
|
||||
}
|
||||
|
||||
Palette_loaded(context);
|
||||
}
|
||||
else
|
||||
File_error=1;
|
||||
@ -1564,7 +1559,6 @@ void Load_PI1(T_IO_Context * context)
|
||||
if (Config.Clear_palette)
|
||||
memset(context->Palette,0,sizeof(T_Palette));
|
||||
PI1_decode_palette(buffer+2,(byte *)context->Palette);
|
||||
Palette_loaded(context);
|
||||
|
||||
context->Width=320;
|
||||
context->Height=200;
|
||||
@ -1897,7 +1891,6 @@ void Load_PC1(T_IO_Context * context)
|
||||
if (Config.Clear_palette)
|
||||
memset(context->Palette,0,sizeof(T_Palette));
|
||||
PI1_decode_palette(buffercomp+2,(byte *)context->Palette);
|
||||
Palette_loaded(context);
|
||||
|
||||
context->Width=320;
|
||||
context->Height=200;
|
||||
@ -2088,7 +2081,6 @@ void Load_NEO(T_IO_Context * context)
|
||||
memset(context->Palette,0,sizeof(T_Palette));
|
||||
// on saute la résolution et le flag, chacun 2 bits
|
||||
PI1_decode_palette(buffer+4,(byte *)context->Palette);
|
||||
Palette_loaded(context);
|
||||
|
||||
context->Width=320;
|
||||
context->Height=200;
|
||||
@ -2568,8 +2560,6 @@ void Load_C64(T_IO_Context * context)
|
||||
context->Palette[16].G=20;
|
||||
context->Palette[16].B=20;
|
||||
|
||||
Palette_loaded(context); // Always call it if you change the palette
|
||||
|
||||
context->Width = width ;
|
||||
context->Height = height;
|
||||
context->Transparent_color=16;
|
||||
@ -3220,8 +3210,6 @@ void Load_CM5(T_IO_Context* context)
|
||||
context->Palette[0x5E].R = 0x6E; context->Palette[0x5E].G = 0x7B; context->Palette[0x5E].B = 1;
|
||||
context->Palette[0x5F].R = 0x6E; context->Palette[0x5F].G = 0x7B; context->Palette[0x5F].B = 0xF6;
|
||||
|
||||
Palette_loaded(context);
|
||||
|
||||
|
||||
if (Read_byte(file, &value)!=1)
|
||||
File_error = 2;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user