Fix compilation warnings in file formats

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1180 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud 2009-11-14 15:36:52 +00:00
parent 90595e3af6
commit a24557ff98
3 changed files with 25 additions and 7 deletions

View File

@ -34,6 +34,9 @@
#include "loadsave.h" #include "loadsave.h"
#include "misc.h" #include "misc.h"
#include "struct.h" #include "struct.h"
#include "io.h"
#include "windows.h" // Best_color()
#include "pages.h" // Add_layer()
//////////////////////////////////// IMG //////////////////////////////////// //////////////////////////////////// IMG ////////////////////////////////////

View File

@ -132,9 +132,6 @@ void Save_PNG(void);
// (TGA, BMP, PNM, XPM, XCF, PCX, GIF, JPG, TIF, LBM, PNG, ICO) // (TGA, BMP, PNM, XPM, XCF, PCX, GIF, JPG, TIF, LBM, PNG, ICO)
void Load_SDL_Image(void); 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 // ENUM Name TestFunc LoadFunc SaveFunc Backup Comment Layers Ext Exts
T_Format File_formats[NB_KNOWN_FORMATS] = { 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"}, {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"},

View File

@ -77,6 +77,11 @@ T_Format * Get_fileformat(byte format);
#define NB_KNOWN_FORMATS 18 ///< Total number of known file formats. #define NB_KNOWN_FORMATS 18 ///< Total number of known file formats.
#endif #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... // This is here and not in fileformats.c because the emergency save uses it...
#pragma pack(1) #pragma pack(1)
typedef struct typedef struct
@ -89,13 +94,26 @@ typedef struct
} T_IMG_Header; } T_IMG_Header;
#pragma pack() #pragma pack()
// Données pour la gestion du chargement en 24b // Data for 24bit loading
#define FORMAT_24B 0x100
typedef void (* Func_24b_display) (short,short,byte,byte,byte);
extern int Image_24b;
typedef void (* Func_24b_display) (short,short,byte,byte,byte);
extern int Image_24b;
extern T_Components * Buffer_image_24b; extern T_Components * Buffer_image_24b;
extern Func_24b_display Pixel_load_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); 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; 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);