Moved save/load functions out of global.h

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@572 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2009-01-29 18:23:13 +00:00
parent ac28a82d8e
commit 920e19b298
7 changed files with 137 additions and 228 deletions

118
global.h
View File

@@ -657,126 +657,8 @@ GFX2_GLOBAL struct Element_de_liste_de_fileselect * Liste_du_fileselect;
// ------------------- Inititialisation des formats connus -------------------
#include "loadsave.h"
void Rien_du_tout(void);
#ifdef VARIABLES_GLOBALES
// Extension du format
char Format_Extension[NB_FORMATS_CONNUS][4]=
{
"pkm", // PKM
"lbm", // LBM
"gif", // GIF
"bmp", // BMP
"pcx", // PCX
"img", // IMG
"sc?", // SCx
"pi1", // PI1
"pc1", // PC1
"cel", // CEL
"kcf", // KCF
"pal", // PAL
"png", // PNG
};
// Fonction à appeler pour vérifier la signature du fichier
fonction_action Format_Test[NB_FORMATS_LOAD]=
{
Test_PKM, // PKM
Test_LBM, // LBM
Test_GIF, // GIF
Test_BMP, // BMP
Test_PCX, // PCX
Test_IMG, // IMG
Test_SCx, // SCx
Test_PI1, // PI1
Test_PC1, // PC1
Test_CEL, // CEL
Test_KCF, // KCF
Test_PAL, // PAL
Test_PNG // PNG
};
// Fonction à appeler pour charger l'image
fonction_action Format_Load[NB_FORMATS_LOAD]=
{
Load_PKM, // PKM
Load_LBM, // LBM
Load_GIF, // GIF
Load_BMP, // BMP
Load_PCX, // PCX
Load_IMG, // IMG
Load_SCx, // SCx
Load_PI1, // PI1
Load_PC1, // PC1
Load_CEL, // CEL
Load_KCF, // KCF
Load_PAL, // PAL
Load_PNG // PNG
};
// Fonction à appeler pour sauvegarder l'image
fonction_action Format_Save[NB_FORMATS_SAVE]=
{
Save_PKM, // PKM
Save_LBM, // LBM
Save_GIF, // GIF
Save_BMP, // BMP
Save_PCX, // PCX
Save_IMG, // IMG
Save_SCx, // SCx
Save_PI1, // PI1
Save_PC1, // PC1
Save_CEL, // CEL
Save_KCF, // KCF
Save_PAL, // PAL
Save_PNG // PNG
};
// indique si l'on doit considérer que l'image n'est plus modifiée
byte Format_Backup_done[NB_FORMATS_CONNUS]=
{
1, // PKM
1, // LBM
1, // GIF
1, // BMP
1, // PCX
1, // IMG
1, // SCx
1, // PI1
1, // PC1
1, // CEL
0, // KCF
0, // PAL
1 // PNG
};
// Le format de fichier autorise un commentaire
byte Format_Commentaire[NB_FORMATS_CONNUS]=
{
1, // PKM
0, // LBM
0, // GIF
0, // BMP
0, // PCX
0, // IMG
0, // SCx
0, // PI1
0, // PC1
0, // CEL
0, // KCF
0, // PAL
0 // PNG
};
#else
extern char Format_Extension[NB_FORMATS_CONNUS][4];
extern fonction_action Format_Load[NB_FORMATS_LOAD];
extern fonction_action Format_Save[NB_FORMATS_SAVE];
extern fonction_action Format_Test[NB_FORMATS_LOAD];
extern byte Format_Backup_done[NB_FORMATS_CONNUS];
extern byte Format_Commentaire[NB_FORMATS_CONNUS];
#endif
GFX2_GLOBAL signed char Erreur_fichier; // 0: opération I/O OK
// 1: Erreur dès le début de l'opération
// 2: Erreur durant l'opération => données modifiées