From a24557ff9848f4513fe0550b104b0ba9b865f6d8 Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Sat, 14 Nov 2009 15:36:52 +0000 Subject: [PATCH] Fix compilation warnings in file formats git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1180 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- fileformats.c | 3 +++ loadsave.c | 3 --- loadsave.h | 26 ++++++++++++++++++++++---- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/fileformats.c b/fileformats.c index 211367c3..4b15e45a 100644 --- a/fileformats.c +++ b/fileformats.c @@ -34,6 +34,9 @@ #include "loadsave.h" #include "misc.h" #include "struct.h" +#include "io.h" +#include "windows.h" // Best_color() +#include "pages.h" // Add_layer() //////////////////////////////////// IMG //////////////////////////////////// diff --git a/loadsave.c b/loadsave.c index e62d9d02..9a888fb6 100644 --- a/loadsave.c +++ b/loadsave.c @@ -132,9 +132,6 @@ void Save_PNG(void); // (TGA, BMP, PNM, XPM, XCF, PCX, GIF, JPG, TIF, LBM, PNG, ICO) void Load_SDL_Image(void); - -void Init_preview(short width,short height,long size,int format,enum PIXEL_RATIO ratio); - // ENUM Name TestFunc LoadFunc SaveFunc Backup Comment Layers Ext Exts T_Format File_formats[NB_KNOWN_FORMATS] = { {FORMAT_ALL_IMAGES, "(all)", NULL, NULL, NULL, 0, 0, 0, "", "gif;png;bmp;pcx;pkm;lbm;iff;img;sci;scq;scf;scn;sco;pi1;pc1;cel;neo;kcf;pal;c64;koa;tga;pnm;xpm;xcf;jpg;jpeg;tif;tiff;ico"}, diff --git a/loadsave.h b/loadsave.h index 5238321f..b4e232d0 100644 --- a/loadsave.h +++ b/loadsave.h @@ -77,6 +77,11 @@ T_Format * Get_fileformat(byte format); #define NB_KNOWN_FORMATS 18 ///< Total number of known file formats. #endif +// ================================================================= +// What follows here are the definitions of functions and data +// useful for fileformats.c, miscfileformats.c etc. +// ================================================================= + // This is here and not in fileformats.c because the emergency save uses it... #pragma pack(1) typedef struct @@ -89,13 +94,26 @@ typedef struct } T_IMG_Header; #pragma pack() -// Données pour la gestion du chargement en 24b -#define FORMAT_24B 0x100 -typedef void (* Func_24b_display) (short,short,byte,byte,byte); -extern int Image_24b; +// Data for 24bit loading +typedef void (* Func_24b_display) (short,short,byte,byte,byte); + +extern int Image_24b; extern T_Components * Buffer_image_24b; extern Func_24b_display Pixel_load_24b; +void Init_preview_24b(short width,short height,long size,int format); void Pixel_load_in_24b_preview(short x_pos,short y_pos,byte r,byte g,byte b); + +// + extern enum PIXEL_RATIO Ratio_of_loaded_image; + +void Set_file_error(int value); +void Init_preview(short width,short height,long size,int format,enum PIXEL_RATIO ratio); + +void Init_write_buffer(void); +void Write_one_byte(FILE *file, byte b); +void End_write(FILE *file); + +void Remap_fileselector(void);