Code cleanup: typedef all structs.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@671 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
f30316612e
commit
0aa43794cd
4
aide.c
4
aide.c
@ -371,7 +371,7 @@ void Afficher_aide(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Scroller_aide(struct Fenetre_Bouton_scroller * Scroller)
|
void Scroller_aide(T_Bouton_scroller * Scroller)
|
||||||
{
|
{
|
||||||
Effacer_curseur();
|
Effacer_curseur();
|
||||||
Scroller->Position=Position_d_aide_en_cours;
|
Scroller->Position=Position_d_aide_en_cours;
|
||||||
@ -404,7 +404,7 @@ void Fenetre_aide(int Section, const char *Sous_section)
|
|||||||
{
|
{
|
||||||
short Bouton_clicke;
|
short Bouton_clicke;
|
||||||
short Nb_lignes;
|
short Nb_lignes;
|
||||||
struct Fenetre_Bouton_scroller * Scroller;
|
T_Bouton_scroller * Scroller;
|
||||||
|
|
||||||
if (Section!=-1)
|
if (Section!=-1)
|
||||||
{
|
{
|
||||||
|
|||||||
70
boutons.c
70
boutons.c
@ -698,7 +698,7 @@ void Settings_Afficher_config(struct S_Config * Conf)
|
|||||||
#define YES "YES"
|
#define YES "YES"
|
||||||
#define NO " NO"
|
#define NO " NO"
|
||||||
{
|
{
|
||||||
struct Fenetre_Bouton_scroller * Jauge=Fenetre_Liste_boutons_scroller;
|
T_Bouton_scroller * Jauge=Fenetre_Liste_boutons_scroller;
|
||||||
char Chaine[4];
|
char Chaine[4];
|
||||||
|
|
||||||
Effacer_curseur();
|
Effacer_curseur();
|
||||||
@ -1167,7 +1167,7 @@ void Copier_certaines_couleurs(void)
|
|||||||
{
|
{
|
||||||
if (Masque_copie_couleurs[Indice])
|
if (Masque_copie_couleurs[Indice])
|
||||||
memcpy(Brouillon_Palette+Indice,Principal_Palette+Indice,
|
memcpy(Brouillon_Palette+Indice,Principal_Palette+Indice,
|
||||||
sizeof(struct Composantes));
|
sizeof(Composantes));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1370,7 +1370,7 @@ void Bouton_Resol(void)
|
|||||||
short Position_curseur;
|
short Position_curseur;
|
||||||
short Temp;
|
short Temp;
|
||||||
char Chaine[5];
|
char Chaine[5];
|
||||||
struct Fenetre_Bouton_special * Bouton_saisie_Width, * Bouton_saisie_Height;
|
T_Bouton_special * Bouton_saisie_Width, * Bouton_saisie_Height;
|
||||||
|
|
||||||
Ouvrir_fenetre(299,190,"Picture & screen sizes");
|
Ouvrir_fenetre(299,190,"Picture & screen sizes");
|
||||||
|
|
||||||
@ -1885,9 +1885,9 @@ void Bouton_Degrades(void)
|
|||||||
{
|
{
|
||||||
short Bouton_clicke;
|
short Bouton_clicke;
|
||||||
char Chaine[3];
|
char Chaine[3];
|
||||||
struct T_Degrade_Tableau Backup_Degrade_Tableau[16];
|
T_Degrade_Tableau Backup_Degrade_Tableau[16];
|
||||||
int Ancien_Degrade_Courant;
|
int Ancien_Degrade_Courant;
|
||||||
struct Fenetre_Bouton_scroller * Scroller_de_melange;
|
T_Bouton_scroller * Scroller_de_melange;
|
||||||
short Ancien_Mouse_X;
|
short Ancien_Mouse_X;
|
||||||
short Ancien_Mouse_Y;
|
short Ancien_Mouse_Y;
|
||||||
byte Ancien_Mouse_K;
|
byte Ancien_Mouse_K;
|
||||||
@ -1900,7 +1900,7 @@ void Bouton_Degrades(void)
|
|||||||
|
|
||||||
Traiter_pixel_de_degrade=Pixel;
|
Traiter_pixel_de_degrade=Pixel;
|
||||||
Ancien_Degrade_Courant=Degrade_Courant;
|
Ancien_Degrade_Courant=Degrade_Courant;
|
||||||
memcpy(Backup_Degrade_Tableau,Degrade_Tableau,sizeof(struct T_Degrade_Tableau)*16);
|
memcpy(Backup_Degrade_Tableau,Degrade_Tableau,sizeof(T_Degrade_Tableau)*16);
|
||||||
|
|
||||||
Ouvrir_fenetre(237,133,"Gradation menu");
|
Ouvrir_fenetre(237,133,"Gradation menu");
|
||||||
|
|
||||||
@ -2089,7 +2089,7 @@ void Bouton_Degrades(void)
|
|||||||
if (Bouton_clicke==7) // Cancel
|
if (Bouton_clicke==7) // Cancel
|
||||||
{
|
{
|
||||||
Degrade_Courant=Ancien_Degrade_Courant;
|
Degrade_Courant=Ancien_Degrade_Courant;
|
||||||
memcpy(Degrade_Tableau,Backup_Degrade_Tableau,sizeof(struct T_Degrade_Tableau)*16);
|
memcpy(Degrade_Tableau,Backup_Degrade_Tableau,sizeof(T_Degrade_Tableau)*16);
|
||||||
Degrade_Charger_infos_du_tableau(Degrade_Courant);
|
Degrade_Charger_infos_du_tableau(Degrade_Courant);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2299,7 +2299,7 @@ int Type_selectionne; // Utilis
|
|||||||
// dans le selecteur de fichier.
|
// dans le selecteur de fichier.
|
||||||
|
|
||||||
void Preparer_et_afficher_liste_fichiers(short Position, short Decalage,
|
void Preparer_et_afficher_liste_fichiers(short Position, short Decalage,
|
||||||
struct Fenetre_Bouton_scroller * Enreg)
|
T_Bouton_scroller * Enreg)
|
||||||
{
|
{
|
||||||
Enreg->Nb_elements=Liste_Nb_elements;
|
Enreg->Nb_elements=Liste_Nb_elements;
|
||||||
Enreg->Position=Position;
|
Enreg->Position=Position;
|
||||||
@ -2322,14 +2322,14 @@ void Preparer_et_afficher_liste_fichiers(short Position, short Decalage,
|
|||||||
|
|
||||||
|
|
||||||
void Relire_liste_fichiers(byte Filtre, short Position, short Decalage,
|
void Relire_liste_fichiers(byte Filtre, short Position, short Decalage,
|
||||||
struct Fenetre_Bouton_scroller * Enreg)
|
T_Bouton_scroller * Enreg)
|
||||||
{
|
{
|
||||||
Lire_liste_des_fichiers(Filtre);
|
Lire_liste_des_fichiers(Filtre);
|
||||||
Trier_la_liste_des_fichiers();
|
Trier_la_liste_des_fichiers();
|
||||||
Preparer_et_afficher_liste_fichiers(Position,Decalage,Enreg);
|
Preparer_et_afficher_liste_fichiers(Position,Decalage,Enreg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void On_vient_de_scroller_dans_le_fileselect(struct Fenetre_Bouton_scroller * Scroller_de_fichiers)
|
void On_vient_de_scroller_dans_le_fileselect(T_Bouton_scroller * Scroller_de_fichiers)
|
||||||
{
|
{
|
||||||
char Ancien_nom_de_fichier[TAILLE_CHEMIN_FICHIER];
|
char Ancien_nom_de_fichier[TAILLE_CHEMIN_FICHIER];
|
||||||
|
|
||||||
@ -2355,7 +2355,7 @@ void On_vient_de_scroller_dans_le_fileselect(struct Fenetre_Bouton_scroller * Sc
|
|||||||
|
|
||||||
short Position_fichier_dans_liste(char * Nom)
|
short Position_fichier_dans_liste(char * Nom)
|
||||||
{
|
{
|
||||||
struct Element_de_liste_de_fileselect * Element_courant;
|
Element_de_liste_de_fileselect * Element_courant;
|
||||||
short Indice;
|
short Indice;
|
||||||
|
|
||||||
for (Indice=0, Element_courant=Liste_du_fileselect;
|
for (Indice=0, Element_courant=Liste_du_fileselect;
|
||||||
@ -2397,7 +2397,7 @@ char FFF_Meilleur_nom[TAILLE_CHEMIN_FICHIER];
|
|||||||
char * Nom_correspondant_le_mieux_a(char * Nom)
|
char * Nom_correspondant_le_mieux_a(char * Nom)
|
||||||
{
|
{
|
||||||
char * Pointeur_Meilleur_nom;
|
char * Pointeur_Meilleur_nom;
|
||||||
struct Element_de_liste_de_fileselect * Element_courant;
|
Element_de_liste_de_fileselect * Element_courant;
|
||||||
byte Lettres_identiques=0;
|
byte Lettres_identiques=0;
|
||||||
byte Compteur;
|
byte Compteur;
|
||||||
|
|
||||||
@ -2428,15 +2428,15 @@ byte Bouton_Load_ou_Save(byte Load, byte Image)
|
|||||||
// Load=0 => On affiche le menu du bouton SAVE
|
// Load=0 => On affiche le menu du bouton SAVE
|
||||||
{
|
{
|
||||||
short Bouton_clicke;
|
short Bouton_clicke;
|
||||||
struct Fenetre_Bouton_scroller * Scroller_de_fichiers;
|
T_Bouton_scroller * Scroller_de_fichiers;
|
||||||
struct Fenetre_Bouton_dropdown * Dropdown_des_formats;
|
T_Bouton_dropdown * Dropdown_des_formats;
|
||||||
struct Fenetre_Bouton_dropdown * Dropdown_bookmark[4];
|
T_Bouton_dropdown * Dropdown_bookmark[4];
|
||||||
short Temp;
|
short Temp;
|
||||||
int Bidon=0; // Sert à appeler SDL_GetKeyState
|
int Bidon=0; // Sert à appeler SDL_GetKeyState
|
||||||
byte Charger_ou_sauver_l_image=0;
|
byte Charger_ou_sauver_l_image=0;
|
||||||
byte On_a_clicke_sur_OK=0;// Indique si on a clické sur Load ou Save ou sur
|
byte On_a_clicke_sur_OK=0;// Indique si on a clické sur Load ou Save ou sur
|
||||||
//un bouton enclenchant Load ou Save juste après.
|
//un bouton enclenchant Load ou Save juste après.
|
||||||
struct Composantes * Palette_initiale; // | Données concernant l'image qui
|
Composantes * Palette_initiale; // | Données concernant l'image qui
|
||||||
byte Image_modifiee_initiale; // | sont mémorisées pour pouvoir
|
byte Image_modifiee_initiale; // | sont mémorisées pour pouvoir
|
||||||
short Largeur_image_initiale; // |- être restaurées en sortant,
|
short Largeur_image_initiale; // |- être restaurées en sortant,
|
||||||
short Hauteur_image_initiale; // | parce que la preview elle les
|
short Hauteur_image_initiale; // | parce que la preview elle les
|
||||||
@ -2448,7 +2448,7 @@ byte Bouton_Load_ou_Save(byte Load, byte Image)
|
|||||||
char Nom_fichier_Save[TAILLE_CHEMIN_FICHIER];
|
char Nom_fichier_Save[TAILLE_CHEMIN_FICHIER];
|
||||||
char * Fichier_le_plus_ressemblant;
|
char * Fichier_le_plus_ressemblant;
|
||||||
|
|
||||||
Palette_initiale=(struct Composantes *)malloc(sizeof(T_Palette));
|
Palette_initiale=(Composantes *)malloc(sizeof(T_Palette));
|
||||||
memcpy(Palette_initiale,Principal_Palette,sizeof(T_Palette));
|
memcpy(Palette_initiale,Principal_Palette,sizeof(T_Palette));
|
||||||
|
|
||||||
Back_color_initiale=Back_color;
|
Back_color_initiale=Back_color;
|
||||||
@ -3267,7 +3267,7 @@ void Load_picture(byte Image)
|
|||||||
byte Format_fichier_initial;
|
byte Format_fichier_initial;
|
||||||
byte Ne_pas_restaurer;
|
byte Ne_pas_restaurer;
|
||||||
byte Utiliser_palette_brosse = 0;
|
byte Utiliser_palette_brosse = 0;
|
||||||
struct Composantes * Palette_initiale=NULL;
|
Composantes * Palette_initiale=NULL;
|
||||||
byte Ancienne_forme_curseur;
|
byte Ancienne_forme_curseur;
|
||||||
short Principal_Largeur_image_initiale=Principal_Largeur_image;
|
short Principal_Largeur_image_initiale=Principal_Largeur_image;
|
||||||
short Principal_Hauteur_image_initiale=Principal_Hauteur_image;
|
short Principal_Hauteur_image_initiale=Principal_Hauteur_image;
|
||||||
@ -3284,7 +3284,7 @@ void Load_picture(byte Image)
|
|||||||
|
|
||||||
if (!Image)
|
if (!Image)
|
||||||
{
|
{
|
||||||
Palette_initiale=(struct Composantes *)malloc(sizeof(T_Palette));
|
Palette_initiale=(Composantes *)malloc(sizeof(T_Palette));
|
||||||
memcpy(Palette_initiale,Principal_Palette,sizeof(T_Palette));
|
memcpy(Palette_initiale,Principal_Palette,sizeof(T_Palette));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4028,10 +4028,10 @@ void Bouton_Menu_Grille(void)
|
|||||||
short dX_choisi=Snap_Decalage_X;
|
short dX_choisi=Snap_Decalage_X;
|
||||||
short dY_choisi=Snap_Decalage_Y;
|
short dY_choisi=Snap_Decalage_Y;
|
||||||
|
|
||||||
struct Fenetre_Bouton_special * Bouton_saisie_X;
|
T_Bouton_special * Bouton_saisie_X;
|
||||||
struct Fenetre_Bouton_special * Bouton_saisie_Y;
|
T_Bouton_special * Bouton_saisie_Y;
|
||||||
struct Fenetre_Bouton_special * Bouton_saisie_dX;
|
T_Bouton_special * Bouton_saisie_dX;
|
||||||
struct Fenetre_Bouton_special * Bouton_saisie_dY;
|
T_Bouton_special * Bouton_saisie_dY;
|
||||||
|
|
||||||
char Chaine[3];
|
char Chaine[3];
|
||||||
|
|
||||||
@ -4371,7 +4371,7 @@ void Bouton_Smooth_Menu(void)
|
|||||||
short Bouton_clicke;
|
short Bouton_clicke;
|
||||||
short X,Y,I,J;
|
short X,Y,I,J;
|
||||||
byte Matrice_choisie[3][3];
|
byte Matrice_choisie[3][3];
|
||||||
struct Fenetre_Bouton_special * Matrice_Zone_saisie[3][3];
|
T_Bouton_special * Matrice_Zone_saisie[3][3];
|
||||||
char Chaine[3];
|
char Chaine[3];
|
||||||
|
|
||||||
Ouvrir_fenetre(142,109,"Smooth");
|
Ouvrir_fenetre(142,109,"Smooth");
|
||||||
@ -4639,8 +4639,8 @@ void Bouton_Tiling_Menu(void)
|
|||||||
short Offset_X_choisi=Tiling_Decalage_X;
|
short Offset_X_choisi=Tiling_Decalage_X;
|
||||||
short Offset_Y_choisi=Tiling_Decalage_Y;
|
short Offset_Y_choisi=Tiling_Decalage_Y;
|
||||||
char Chaine[5];
|
char Chaine[5];
|
||||||
struct Fenetre_Bouton_special * Bouton_saisie_Decalage_X;
|
T_Bouton_special * Bouton_saisie_Decalage_X;
|
||||||
struct Fenetre_Bouton_special * Bouton_saisie_Decalage_Y;
|
T_Bouton_special * Bouton_saisie_Decalage_Y;
|
||||||
|
|
||||||
Ouvrir_fenetre(138,79,"Tiling");
|
Ouvrir_fenetre(138,79,"Tiling");
|
||||||
|
|
||||||
@ -4775,10 +4775,10 @@ void Bouton_Spray_Menu(void)
|
|||||||
byte Old_Spray_Delay =Spray_Delay;
|
byte Old_Spray_Delay =Spray_Delay;
|
||||||
byte Old_Spray_Mono_flow=Spray_Mono_flow;
|
byte Old_Spray_Mono_flow=Spray_Mono_flow;
|
||||||
byte Old_Spray_Multi_flow[256];
|
byte Old_Spray_Multi_flow[256];
|
||||||
struct Fenetre_Bouton_special * Saisie_Size;
|
T_Bouton_special * Saisie_Size;
|
||||||
struct Fenetre_Bouton_special * Saisie_Delay;
|
T_Bouton_special * Saisie_Delay;
|
||||||
struct Fenetre_Bouton_special * Saisie_Mono_flow;
|
T_Bouton_special * Saisie_Mono_flow;
|
||||||
struct Fenetre_Bouton_special * Saisie_Init;
|
T_Bouton_special * Saisie_Init;
|
||||||
word Ancien_Mouse_X;
|
word Ancien_Mouse_X;
|
||||||
word Ancien_Mouse_Y;
|
word Ancien_Mouse_Y;
|
||||||
byte Ancien_Mouse_K;
|
byte Ancien_Mouse_K;
|
||||||
@ -5209,7 +5209,7 @@ void Bouton_Trame_Menu(void)
|
|||||||
short Orig_X;
|
short Orig_X;
|
||||||
short Orig_Y;
|
short Orig_Y;
|
||||||
static byte Octet_insere=0;
|
static byte Octet_insere=0;
|
||||||
struct Fenetre_Bouton_normal * Bouton_Octet_insere;
|
T_Bouton_normal * Bouton_Octet_insere;
|
||||||
char Chaine[3];
|
char Chaine[3];
|
||||||
byte Temp; // Octet temporaire servant à n'importe quoi
|
byte Temp; // Octet temporaire servant à n'importe quoi
|
||||||
short Old_Trame_Largeur=Trame_Largeur;
|
short Old_Trame_Largeur=Trame_Largeur;
|
||||||
@ -5953,10 +5953,10 @@ void Bouton_Texte()
|
|||||||
int Bouton_clicke;
|
int Bouton_clicke;
|
||||||
const int NB_FONTES=8;
|
const int NB_FONTES=8;
|
||||||
char Buffer_taille[3];
|
char Buffer_taille[3];
|
||||||
struct Fenetre_Bouton_special * Bouton_taille_texte;
|
T_Bouton_special * Bouton_taille_texte;
|
||||||
struct Fenetre_Bouton_special * Bouton_texte;
|
T_Bouton_special * Bouton_texte;
|
||||||
struct Fenetre_Bouton_special * Bouton_preview;
|
T_Bouton_special * Bouton_preview;
|
||||||
struct Fenetre_Bouton_scroller * Scroller_de_fontes;
|
T_Bouton_scroller * Scroller_de_fontes;
|
||||||
byte A_redessiner=1;
|
byte A_redessiner=1;
|
||||||
byte A_previsionner=1;
|
byte A_previsionner=1;
|
||||||
short Temp;
|
short Temp;
|
||||||
|
|||||||
2
const.h
2
const.h
@ -250,7 +250,7 @@ enum TYPES_DE_LECTEURS
|
|||||||
LECTEUR_FLOPPY_5_25, // 1: Diskette 5"¬
|
LECTEUR_FLOPPY_5_25, // 1: Diskette 5"¬
|
||||||
LECTEUR_HDD, // 2: HDD
|
LECTEUR_HDD, // 2: HDD
|
||||||
LECTEUR_CDROM, // 3: CD-ROM
|
LECTEUR_CDROM, // 3: CD-ROM
|
||||||
LECTEUR_NETWORK // 4: Logique (réseau?)
|
LECTEUR_NETWORK, // 4: Logique (réseau?)
|
||||||
};
|
};
|
||||||
|
|
||||||
// Les différents boutons:
|
// Les différents boutons:
|
||||||
|
|||||||
20
files.c
20
files.c
@ -87,7 +87,7 @@ void Detruire_liste_du_fileselect(void)
|
|||||||
// programme.
|
// programme.
|
||||||
{
|
{
|
||||||
// Pointeur temporaire de destruction
|
// Pointeur temporaire de destruction
|
||||||
struct Element_de_liste_de_fileselect * Element_temporaire;
|
Element_de_liste_de_fileselect * Element_temporaire;
|
||||||
|
|
||||||
while (Liste_du_fileselect!=NULL)
|
while (Liste_du_fileselect!=NULL)
|
||||||
{
|
{
|
||||||
@ -156,10 +156,10 @@ void Ajouter_element_a_la_liste(char * Nom, int Type)
|
|||||||
// Cette procedure ajoute a la liste chainee un fichier passé en argument.
|
// Cette procedure ajoute a la liste chainee un fichier passé en argument.
|
||||||
{
|
{
|
||||||
// Pointeur temporaire d'insertion
|
// Pointeur temporaire d'insertion
|
||||||
struct Element_de_liste_de_fileselect * Element_temporaire;
|
Element_de_liste_de_fileselect * Element_temporaire;
|
||||||
|
|
||||||
// On alloue de la place pour un nouvel element
|
// On alloue de la place pour un nouvel element
|
||||||
Element_temporaire=(struct Element_de_liste_de_fileselect *)malloc(sizeof(struct Element_de_liste_de_fileselect));
|
Element_temporaire=(Element_de_liste_de_fileselect *)malloc(sizeof(Element_de_liste_de_fileselect));
|
||||||
|
|
||||||
// On met a jour le nouvel emplacement:
|
// On met a jour le nouvel emplacement:
|
||||||
strcpy(Element_temporaire->NomAbrege,Nom_formate(Nom, Type));
|
strcpy(Element_temporaire->NomAbrege,Nom_formate(Nom, Type));
|
||||||
@ -419,10 +419,10 @@ void Trier_la_liste_des_fichiers(void)
|
|||||||
{
|
{
|
||||||
byte La_liste_est_triee; // Booléen "La liste est triée"
|
byte La_liste_est_triee; // Booléen "La liste est triée"
|
||||||
byte Inversion; // Booléen "Il faut inverser les éléments"
|
byte Inversion; // Booléen "Il faut inverser les éléments"
|
||||||
struct Element_de_liste_de_fileselect * Element_precedent;
|
Element_de_liste_de_fileselect * Element_precedent;
|
||||||
struct Element_de_liste_de_fileselect * Element_courant;
|
Element_de_liste_de_fileselect * Element_courant;
|
||||||
struct Element_de_liste_de_fileselect * Element_suivant;
|
Element_de_liste_de_fileselect * Element_suivant;
|
||||||
struct Element_de_liste_de_fileselect * Element_suivant_le_suivant;
|
Element_de_liste_de_fileselect * Element_suivant_le_suivant;
|
||||||
|
|
||||||
// Avant de trier quoi que ce soit, on vérifie qu'il y ait suffisamment
|
// Avant de trier quoi que ce soit, on vérifie qu'il y ait suffisamment
|
||||||
// d'éléments pour qu'il soit possibles qu'ils soient en désordre:
|
// d'éléments pour qu'il soit possibles qu'ils soient en désordre:
|
||||||
@ -512,7 +512,7 @@ void Afficher_la_liste_des_fichiers(short Decalage_premier,short Decalage_select
|
|||||||
// sélecteur et le fichier sélectionné dans la liste
|
// sélecteur et le fichier sélectionné dans la liste
|
||||||
//
|
//
|
||||||
{
|
{
|
||||||
struct Element_de_liste_de_fileselect * Element_courant;
|
Element_de_liste_de_fileselect * Element_courant;
|
||||||
byte Indice; // Indice du fichier qu'on affiche (0 -> 9)
|
byte Indice; // Indice du fichier qu'on affiche (0 -> 9)
|
||||||
byte Couleur_texte;
|
byte Couleur_texte;
|
||||||
byte Couleur_fond;
|
byte Couleur_fond;
|
||||||
@ -579,7 +579,7 @@ void Determiner_element_de_la_liste(short Decalage_premier,short Decalage_select
|
|||||||
// Type = Récupération du type: 0 fichier, 1 repertoire, 2 lecteur.
|
// Type = Récupération du type: 0 fichier, 1 repertoire, 2 lecteur.
|
||||||
// Passer NULL si pas interessé.
|
// Passer NULL si pas interessé.
|
||||||
{
|
{
|
||||||
struct Element_de_liste_de_fileselect * Element_courant;
|
Element_de_liste_de_fileselect * Element_courant;
|
||||||
|
|
||||||
// On vérifie s'il y a au moins 1 fichier dans la liste:
|
// On vérifie s'il y a au moins 1 fichier dans la liste:
|
||||||
if (Liste_Nb_elements>0)
|
if (Liste_Nb_elements>0)
|
||||||
@ -714,7 +714,7 @@ short Calculer_decalage_click_dans_fileselector(void)
|
|||||||
return Decalage_calcule;
|
return Decalage_calcule;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Afficher_bookmark(struct Fenetre_Bouton_dropdown * Bouton, int Numero_bookmark)
|
void Afficher_bookmark(T_Bouton_dropdown * Bouton, int Numero_bookmark)
|
||||||
{
|
{
|
||||||
if (Config.Bookmark_directory[Numero_bookmark])
|
if (Config.Bookmark_directory[Numero_bookmark])
|
||||||
{
|
{
|
||||||
|
|||||||
2
files.h
2
files.h
@ -35,7 +35,7 @@ void Afficher_la_liste_des_fichiers(short Decalage_premier,short Decalage_select
|
|||||||
// -- Récupérer le libellé d'un élément de la liste -------------------------
|
// -- Récupérer le libellé d'un élément de la liste -------------------------
|
||||||
void Determiner_element_de_la_liste(short Decalage_premier,short Decalage_select,char * Libelle,int *Type);
|
void Determiner_element_de_la_liste(short Decalage_premier,short Decalage_select,char * Libelle,int *Type);
|
||||||
|
|
||||||
void Afficher_bookmark(struct Fenetre_Bouton_dropdown * Bouton, int Numero_bookmark);
|
void Afficher_bookmark(T_Bouton_dropdown * Bouton, int Numero_bookmark);
|
||||||
|
|
||||||
// -- Déplacements dans la liste des fichiers -------------------------------
|
// -- Déplacements dans la liste des fichiers -------------------------------
|
||||||
|
|
||||||
|
|||||||
12
gfxcfg.c
12
gfxcfg.c
@ -64,8 +64,8 @@
|
|||||||
#define NB_MAX_TOUCHES 134
|
#define NB_MAX_TOUCHES 134
|
||||||
#define HAUTEUR_DEBUT_SETUP 7
|
#define HAUTEUR_DEBUT_SETUP 7
|
||||||
#define HAUTEUR_FIN_SETUP 44
|
#define HAUTEUR_FIN_SETUP 44
|
||||||
#define Header_size sizeof(struct Config_Header)
|
#define Header_size sizeof(Config_Header)
|
||||||
#define Chunk_size sizeof(struct Config_Chunk)
|
#define Chunk_size sizeof(Config_Chunk)
|
||||||
|
|
||||||
/* Colors */
|
/* Colors */
|
||||||
#define COULEUR_SETUP 1
|
#define COULEUR_SETUP 1
|
||||||
@ -86,7 +86,7 @@ uint16_t Position_curseur=0;
|
|||||||
|
|
||||||
byte * FichierConfig = NULL;
|
byte * FichierConfig = NULL;
|
||||||
byte * ChunkData[CHUNK_MAX];
|
byte * ChunkData[CHUNK_MAX];
|
||||||
struct Config_Chunk Chunk[CHUNK_MAX];
|
Config_Chunk Chunk[CHUNK_MAX];
|
||||||
|
|
||||||
|
|
||||||
uint8_t Fenetre_choix(int Largeur, int Hauteur, const char* Titre, const char* Choix, uint8_t Choix_debut,
|
uint8_t Fenetre_choix(int Largeur, int Hauteur, const char* Titre, const char* Choix, uint8_t Choix_debut,
|
||||||
@ -256,7 +256,7 @@ char * Interpretation_du_fichier_config()
|
|||||||
{
|
{
|
||||||
unsigned int Indice_config;
|
unsigned int Indice_config;
|
||||||
Ptr = ChunkData[CHUNK_TOUCHES];
|
Ptr = ChunkData[CHUNK_TOUCHES];
|
||||||
for (Indice_config=0; Indice_config<Chunk[CHUNK_TOUCHES].Taille / sizeof(struct Config_Infos_touche) ; Indice_config++)
|
for (Indice_config=0; Indice_config<Chunk[CHUNK_TOUCHES].Taille / sizeof(Config_Infos_touche) ; Indice_config++)
|
||||||
{
|
{
|
||||||
word Numero;
|
word Numero;
|
||||||
word Touche;
|
word Touche;
|
||||||
@ -616,7 +616,7 @@ bool Verifier_ecriture_possible()
|
|||||||
void Enregistrer_config()
|
void Enregistrer_config()
|
||||||
{
|
{
|
||||||
FILE* Fichier;
|
FILE* Fichier;
|
||||||
struct Config_Header Header;
|
Config_Header Header;
|
||||||
int Indice_chunk;
|
int Indice_chunk;
|
||||||
|
|
||||||
if(Choix_enreg==true) // Save keys if wanted
|
if(Choix_enreg==true) // Save keys if wanted
|
||||||
@ -634,7 +634,7 @@ void Enregistrer_config()
|
|||||||
Header.Beta2 = BETA2;
|
Header.Beta2 = BETA2;
|
||||||
write_bytes(Fichier, &Header, sizeof(Header));
|
write_bytes(Fichier, &Header, sizeof(Header));
|
||||||
|
|
||||||
Chunk[CHUNK_TOUCHES].Taille=sizeof(struct Config_Infos_touche)*(NB_MAX_TOUCHES);
|
Chunk[CHUNK_TOUCHES].Taille=sizeof(Config_Infos_touche)*(NB_MAX_TOUCHES);
|
||||||
Chunk[CHUNK_TOUCHES].Numero=CHUNK_TOUCHES;
|
Chunk[CHUNK_TOUCHES].Numero=CHUNK_TOUCHES;
|
||||||
|
|
||||||
for (Indice_chunk=0; Indice_chunk<CHUNK_MAX; Indice_chunk++)
|
for (Indice_chunk=0; Indice_chunk<CHUNK_MAX; Indice_chunk++)
|
||||||
|
|||||||
20
global.h
20
global.h
@ -65,7 +65,7 @@ GFX2_GLOBAL struct S_Config
|
|||||||
byte Valeur_tempo_jauge_gauche;
|
byte Valeur_tempo_jauge_gauche;
|
||||||
byte Valeur_tempo_jauge_droite;
|
byte Valeur_tempo_jauge_droite;
|
||||||
long Chrono_delay;
|
long Chrono_delay;
|
||||||
struct Composantes Coul_menu_pref[4];
|
Composantes Coul_menu_pref[4];
|
||||||
int Nb_max_de_vertex_par_polygon;
|
int Nb_max_de_vertex_par_polygon;
|
||||||
byte Clear_palette;
|
byte Clear_palette;
|
||||||
byte Set_resolution_according_to;
|
byte Set_resolution_according_to;
|
||||||
@ -114,7 +114,7 @@ GFX2_GLOBAL byte CM_Fonce;
|
|||||||
GFX2_GLOBAL byte CM_Clair;
|
GFX2_GLOBAL byte CM_Clair;
|
||||||
GFX2_GLOBAL byte CM_Blanc;
|
GFX2_GLOBAL byte CM_Blanc;
|
||||||
GFX2_GLOBAL byte CM_Trans;
|
GFX2_GLOBAL byte CM_Trans;
|
||||||
GFX2_GLOBAL struct Composantes Coul_menu_pref[4];
|
GFX2_GLOBAL Composantes Coul_menu_pref[4];
|
||||||
|
|
||||||
// Etat des entrées
|
// Etat des entrées
|
||||||
|
|
||||||
@ -356,19 +356,19 @@ GFX2_GLOBAL word Pile_Fenetre_Hauteur[8]; // Hauteur de la fen
|
|||||||
GFX2_GLOBAL word Pile_Nb_boutons_fenetre[8];
|
GFX2_GLOBAL word Pile_Nb_boutons_fenetre[8];
|
||||||
#define Nb_boutons_fenetre Pile_Nb_boutons_fenetre[Fenetre-1]
|
#define Nb_boutons_fenetre Pile_Nb_boutons_fenetre[Fenetre-1]
|
||||||
|
|
||||||
GFX2_GLOBAL struct Fenetre_Bouton_normal * Pile_Fenetre_Liste_boutons_normal[8];
|
GFX2_GLOBAL T_Bouton_normal * Pile_Fenetre_Liste_boutons_normal[8];
|
||||||
#define Fenetre_Liste_boutons_normal Pile_Fenetre_Liste_boutons_normal[Fenetre-1]
|
#define Fenetre_Liste_boutons_normal Pile_Fenetre_Liste_boutons_normal[Fenetre-1]
|
||||||
|
|
||||||
GFX2_GLOBAL struct Fenetre_Bouton_palette * Pile_Fenetre_Liste_boutons_palette[8];
|
GFX2_GLOBAL T_Bouton_palette * Pile_Fenetre_Liste_boutons_palette[8];
|
||||||
#define Fenetre_Liste_boutons_palette Pile_Fenetre_Liste_boutons_palette[Fenetre-1]
|
#define Fenetre_Liste_boutons_palette Pile_Fenetre_Liste_boutons_palette[Fenetre-1]
|
||||||
|
|
||||||
GFX2_GLOBAL struct Fenetre_Bouton_scroller * Pile_Fenetre_Liste_boutons_scroller[8];
|
GFX2_GLOBAL T_Bouton_scroller * Pile_Fenetre_Liste_boutons_scroller[8];
|
||||||
#define Fenetre_Liste_boutons_scroller Pile_Fenetre_Liste_boutons_scroller[Fenetre-1]
|
#define Fenetre_Liste_boutons_scroller Pile_Fenetre_Liste_boutons_scroller[Fenetre-1]
|
||||||
|
|
||||||
GFX2_GLOBAL struct Fenetre_Bouton_special * Pile_Fenetre_Liste_boutons_special[8];
|
GFX2_GLOBAL T_Bouton_special * Pile_Fenetre_Liste_boutons_special[8];
|
||||||
#define Fenetre_Liste_boutons_special Pile_Fenetre_Liste_boutons_special[Fenetre-1]
|
#define Fenetre_Liste_boutons_special Pile_Fenetre_Liste_boutons_special[Fenetre-1]
|
||||||
|
|
||||||
GFX2_GLOBAL struct Fenetre_Bouton_dropdown * Pile_Fenetre_Liste_boutons_dropdown[8];
|
GFX2_GLOBAL T_Bouton_dropdown * Pile_Fenetre_Liste_boutons_dropdown[8];
|
||||||
#define Fenetre_Liste_boutons_dropdown Pile_Fenetre_Liste_boutons_dropdown[Fenetre-1]
|
#define Fenetre_Liste_boutons_dropdown Pile_Fenetre_Liste_boutons_dropdown[Fenetre-1]
|
||||||
|
|
||||||
|
|
||||||
@ -429,7 +429,7 @@ GFX2_GLOBAL short Smear_Min_X,Smear_Max_X,Smear_Min_Y,Smear_Max_Y; // Bornes de
|
|||||||
|
|
||||||
// Mode shade:
|
// Mode shade:
|
||||||
|
|
||||||
GFX2_GLOBAL struct T_Shade Shade_Liste[8]; // Listes de shade
|
GFX2_GLOBAL T_Shade Shade_Liste[8]; // Listes de shade
|
||||||
GFX2_GLOBAL byte Shade_Actuel; // Numéro du shade en cours
|
GFX2_GLOBAL byte Shade_Actuel; // Numéro du shade en cours
|
||||||
GFX2_GLOBAL byte * Shade_Table; // Table de conversion de shade en cours
|
GFX2_GLOBAL byte * Shade_Table; // Table de conversion de shade en cours
|
||||||
GFX2_GLOBAL byte Shade_Table_gauche[256]; // Table de conversion de shade pour un clic gauche
|
GFX2_GLOBAL byte Shade_Table_gauche[256]; // Table de conversion de shade pour un clic gauche
|
||||||
@ -526,7 +526,7 @@ GFX2_GLOBAL long Degrade_Melange_aleatoire; // Facteur de m
|
|||||||
GFX2_GLOBAL fonction_degrade Traiter_degrade; // Fonction de traitement du dégradé, varie selon la méthode choisie par l'utilisateur.
|
GFX2_GLOBAL fonction_degrade Traiter_degrade; // Fonction de traitement du dégradé, varie selon la méthode choisie par l'utilisateur.
|
||||||
GFX2_GLOBAL fonction_afficheur Traiter_pixel_de_degrade; // Redirection de l'affichage
|
GFX2_GLOBAL fonction_afficheur Traiter_pixel_de_degrade; // Redirection de l'affichage
|
||||||
|
|
||||||
GFX2_GLOBAL struct T_Degrade_Tableau Degrade_Tableau[16]; // Données de tous les dégradés
|
GFX2_GLOBAL T_Degrade_Tableau Degrade_Tableau[16]; // Données de tous les dégradés
|
||||||
GFX2_GLOBAL byte Degrade_Courant; // Indice du tableau correspondant au dégradé courant
|
GFX2_GLOBAL byte Degrade_Courant; // Indice du tableau correspondant au dégradé courant
|
||||||
|
|
||||||
|
|
||||||
@ -656,7 +656,7 @@ GFX2_GLOBAL short Liste_Nb_elements;
|
|||||||
GFX2_GLOBAL short Liste_Nb_fichiers;
|
GFX2_GLOBAL short Liste_Nb_fichiers;
|
||||||
GFX2_GLOBAL short Liste_Nb_repertoires;
|
GFX2_GLOBAL short Liste_Nb_repertoires;
|
||||||
// Tête de la liste chaînée:
|
// Tête de la liste chaînée:
|
||||||
GFX2_GLOBAL struct Element_de_liste_de_fileselect * Liste_du_fileselect;
|
GFX2_GLOBAL Element_de_liste_de_fileselect * Liste_du_fileselect;
|
||||||
|
|
||||||
// ------------------- Inititialisation des formats connus -------------------
|
// ------------------- Inititialisation des formats connus -------------------
|
||||||
|
|
||||||
|
|||||||
16
init.c
16
init.c
@ -1764,10 +1764,10 @@ int Charger_CFG(int Tout_charger)
|
|||||||
char Nom_du_fichier[TAILLE_CHEMIN_FICHIER];
|
char Nom_du_fichier[TAILLE_CHEMIN_FICHIER];
|
||||||
long Taille_fichier;
|
long Taille_fichier;
|
||||||
int Indice,Indice2;
|
int Indice,Indice2;
|
||||||
struct Config_Header CFG_Header;
|
Config_Header CFG_Header;
|
||||||
struct Config_Chunk Chunk;
|
Config_Chunk Chunk;
|
||||||
struct Config_Infos_touche CFG_Infos_touche;
|
Config_Infos_touche CFG_Infos_touche;
|
||||||
struct Config_Mode_video CFG_Mode_video;
|
Config_Mode_video CFG_Mode_video;
|
||||||
struct stat Informations_Fichier;
|
struct stat Informations_Fichier;
|
||||||
int Conversion_touches = 0;
|
int Conversion_touches = 0;
|
||||||
|
|
||||||
@ -2056,10 +2056,10 @@ int Sauver_CFG(void)
|
|||||||
int Modes_a_sauver;
|
int Modes_a_sauver;
|
||||||
//byte Octet;
|
//byte Octet;
|
||||||
char Nom_du_fichier[TAILLE_CHEMIN_FICHIER];
|
char Nom_du_fichier[TAILLE_CHEMIN_FICHIER];
|
||||||
struct Config_Header CFG_Header;
|
Config_Header CFG_Header;
|
||||||
struct Config_Chunk Chunk;
|
Config_Chunk Chunk;
|
||||||
struct Config_Infos_touche CFG_Infos_touche;
|
Config_Infos_touche CFG_Infos_touche;
|
||||||
struct Config_Mode_video CFG_Mode_video;
|
Config_Mode_video CFG_Mode_video;
|
||||||
|
|
||||||
strcpy(Nom_du_fichier,Repertoire_de_configuration);
|
strcpy(Nom_du_fichier,Repertoire_de_configuration);
|
||||||
strcat(Nom_du_fichier,"gfx2.cfg");
|
strcat(Nom_du_fichier,"gfx2.cfg");
|
||||||
|
|||||||
@ -242,7 +242,7 @@ void Remapper_fileselect(void)
|
|||||||
#define FORMAT_24B 0x100
|
#define FORMAT_24B 0x100
|
||||||
typedef void (* fonction_afficheur_24b) (short,short,byte,byte,byte);
|
typedef void (* fonction_afficheur_24b) (short,short,byte,byte,byte);
|
||||||
int Image_24b;
|
int Image_24b;
|
||||||
struct Composantes * Buffer_image_24b;
|
Composantes * Buffer_image_24b;
|
||||||
fonction_afficheur_24b Pixel_Chargement_24b;
|
fonction_afficheur_24b Pixel_Chargement_24b;
|
||||||
|
|
||||||
|
|
||||||
@ -313,7 +313,7 @@ void Initialiser_preview_24b(int Largeur,int Hauteur)
|
|||||||
|
|
||||||
// Allocation du buffer 24b
|
// Allocation du buffer 24b
|
||||||
Buffer_image_24b=
|
Buffer_image_24b=
|
||||||
(struct Composantes *)Emprunter_memoire_de_page(Largeur*Hauteur*sizeof(struct Composantes));
|
(Composantes *)Emprunter_memoire_de_page(Largeur*Hauteur*sizeof(Composantes));
|
||||||
if (!Buffer_image_24b)
|
if (!Buffer_image_24b)
|
||||||
{
|
{
|
||||||
// Afficher un message d'erreur
|
// Afficher un message d'erreur
|
||||||
@ -4705,7 +4705,7 @@ void Load_SCx(void)
|
|||||||
if (!SCx_Header.Plans)
|
if (!SCx_Header.Plans)
|
||||||
Taille=sizeof(T_Palette);
|
Taille=sizeof(T_Palette);
|
||||||
else
|
else
|
||||||
Taille=sizeof(struct Composantes)*(1<<SCx_Header.Plans);
|
Taille=sizeof(Composantes)*(1<<SCx_Header.Plans);
|
||||||
|
|
||||||
if (read_bytes(Fichier,SCx_Palette,Taille))
|
if (read_bytes(Fichier,SCx_Palette,Taille))
|
||||||
{
|
{
|
||||||
@ -5458,7 +5458,7 @@ void Load_RAW_24B(int Largeur,int Hauteur,Bitmap24B Source)
|
|||||||
FILE* Fichier;
|
FILE* Fichier;
|
||||||
|
|
||||||
Fichier=fopen("TEST.RAW","rb");
|
Fichier=fopen("TEST.RAW","rb");
|
||||||
if (read_bytes(Fichier,Source,Largeur*Hauteur*sizeof(struct Composantes)))
|
if (read_bytes(Fichier,Source,Largeur*Hauteur*sizeof(Composantes)))
|
||||||
exit(3);
|
exit(3);
|
||||||
fclose(Fichier);
|
fclose(Fichier);
|
||||||
}
|
}
|
||||||
|
|||||||
100
moteur.c
100
moteur.c
@ -1157,11 +1157,11 @@ void Fermer_fenetre(void)
|
|||||||
// Lors de l'appel à cette procedure, la souris doit être affichée.
|
// Lors de l'appel à cette procedure, la souris doit être affichée.
|
||||||
// En sortie de cette procedure, la souris est effacée.
|
// En sortie de cette procedure, la souris est effacée.
|
||||||
{
|
{
|
||||||
struct Fenetre_Bouton_normal * Temp1;
|
T_Bouton_normal * Temp1;
|
||||||
struct Fenetre_Bouton_palette * Temp2;
|
T_Bouton_palette * Temp2;
|
||||||
struct Fenetre_Bouton_scroller * Temp3;
|
T_Bouton_scroller * Temp3;
|
||||||
struct Fenetre_Bouton_special * Temp4;
|
T_Bouton_special * Temp4;
|
||||||
struct Fenetre_Bouton_dropdown * Temp5;
|
T_Bouton_dropdown * Temp5;
|
||||||
|
|
||||||
Effacer_curseur();
|
Effacer_curseur();
|
||||||
|
|
||||||
@ -1376,7 +1376,7 @@ void Tagger_intervalle_palette(byte Debut,byte Fin)
|
|||||||
|
|
||||||
//------------------ Dessiner un scroller dans une fenêtre -------------------
|
//------------------ Dessiner un scroller dans une fenêtre -------------------
|
||||||
|
|
||||||
void Calculer_hauteur_curseur_jauge(struct Fenetre_Bouton_scroller * Enreg)
|
void Calculer_hauteur_curseur_jauge(T_Bouton_scroller * Enreg)
|
||||||
{
|
{
|
||||||
if (Enreg->Nb_elements>Enreg->Nb_visibles)
|
if (Enreg->Nb_elements>Enreg->Nb_visibles)
|
||||||
{
|
{
|
||||||
@ -1390,7 +1390,7 @@ void Calculer_hauteur_curseur_jauge(struct Fenetre_Bouton_scroller * Enreg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fenetre_Dessiner_jauge(struct Fenetre_Bouton_scroller * Enreg)
|
void Fenetre_Dessiner_jauge(T_Bouton_scroller * Enreg)
|
||||||
{
|
{
|
||||||
word Position_curseur_jauge;
|
word Position_curseur_jauge;
|
||||||
|
|
||||||
@ -1412,7 +1412,7 @@ void Fenetre_Dessiner_jauge(struct Fenetre_Bouton_scroller * Enreg)
|
|||||||
11*Menu_Facteur_X,(Enreg->Hauteur)*Menu_Facteur_Y);
|
11*Menu_Facteur_X,(Enreg->Hauteur)*Menu_Facteur_Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fenetre_Dessiner_bouton_scroller(struct Fenetre_Bouton_scroller * Enreg)
|
void Fenetre_Dessiner_bouton_scroller(T_Bouton_scroller * Enreg)
|
||||||
{
|
{
|
||||||
Fenetre_Afficher_cadre_general(Enreg->Pos_X-1,Enreg->Pos_Y-1,13,Enreg->Hauteur+2,CM_Noir,CM_Noir,CM_Fonce,CM_Fonce,CM_Fonce);
|
Fenetre_Afficher_cadre_general(Enreg->Pos_X-1,Enreg->Pos_Y-1,13,Enreg->Hauteur+2,CM_Noir,CM_Noir,CM_Fonce,CM_Fonce,CM_Fonce);
|
||||||
Fenetre_Afficher_cadre_mono(Enreg->Pos_X-1,Enreg->Pos_Y+11,13,Enreg->Hauteur-22,CM_Noir);
|
Fenetre_Afficher_cadre_mono(Enreg->Pos_X-1,Enreg->Pos_Y+11,13,Enreg->Hauteur-22,CM_Noir);
|
||||||
@ -1434,14 +1434,14 @@ void Fenetre_Dessiner_bouton_saisie(word Pos_X,word Pos_Y,word Largeur_en_caract
|
|||||||
|
|
||||||
//------------ Modifier le contenu (caption) d'une zone de saisie ------------
|
//------------ Modifier le contenu (caption) d'une zone de saisie ------------
|
||||||
|
|
||||||
void Fenetre_Contenu_bouton_saisie(struct Fenetre_Bouton_special * Enreg, char * Contenu)
|
void Fenetre_Contenu_bouton_saisie(T_Bouton_special * Enreg, char * Contenu)
|
||||||
{
|
{
|
||||||
Print_dans_fenetre_limite(Enreg->Pos_X+2,Enreg->Pos_Y+2,Contenu,Enreg->Largeur/8,CM_Noir,CM_Clair);
|
Print_dans_fenetre_limite(Enreg->Pos_X+2,Enreg->Pos_Y+2,Contenu,Enreg->Largeur/8,CM_Noir,CM_Clair);
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------ Effacer le contenu (caption) d'une zone de saisie ------------
|
//------------ Effacer le contenu (caption) d'une zone de saisie ------------
|
||||||
|
|
||||||
void Fenetre_Effacer_bouton_saisie(struct Fenetre_Bouton_special * Enreg)
|
void Fenetre_Effacer_bouton_saisie(T_Bouton_special * Enreg)
|
||||||
{
|
{
|
||||||
Block((Enreg->Pos_X+2)*Menu_Facteur_X+Fenetre_Pos_X,(Enreg->Pos_Y+2)*Menu_Facteur_Y+Fenetre_Pos_Y,(Enreg->Largeur/8)*8*Menu_Facteur_X,8*Menu_Facteur_Y,CM_Clair);
|
Block((Enreg->Pos_X+2)*Menu_Facteur_X+Fenetre_Pos_X,(Enreg->Pos_Y+2)*Menu_Facteur_Y+Fenetre_Pos_Y,(Enreg->Largeur/8)*8*Menu_Facteur_X,8*Menu_Facteur_Y,CM_Clair);
|
||||||
UpdateRect((Enreg->Pos_X+2)*Menu_Facteur_X+Fenetre_Pos_X,(Enreg->Pos_Y+2)*Menu_Facteur_Y+Fenetre_Pos_Y,Enreg->Largeur/8*8*Menu_Facteur_X,8*Menu_Facteur_Y);
|
UpdateRect((Enreg->Pos_X+2)*Menu_Facteur_X+Fenetre_Pos_X,(Enreg->Pos_Y+2)*Menu_Facteur_Y+Fenetre_Pos_Y,Enreg->Largeur/8*8*Menu_Facteur_X,8*Menu_Facteur_Y);
|
||||||
@ -1450,18 +1450,18 @@ void Fenetre_Effacer_bouton_saisie(struct Fenetre_Bouton_special * Enreg)
|
|||||||
|
|
||||||
//------ Rajout d'un bouton à la liste de ceux présents dans la fenêtre ------
|
//------ Rajout d'un bouton à la liste de ceux présents dans la fenêtre ------
|
||||||
|
|
||||||
struct Fenetre_Bouton_normal * Fenetre_Definir_bouton_normal(word Pos_X, word Pos_Y,
|
T_Bouton_normal * Fenetre_Definir_bouton_normal(word Pos_X, word Pos_Y,
|
||||||
word Largeur, word Hauteur,
|
word Largeur, word Hauteur,
|
||||||
char * Titre, byte Lettre_soulignee,
|
char * Titre, byte Lettre_soulignee,
|
||||||
byte Clickable, word Raccourci)
|
byte Clickable, word Raccourci)
|
||||||
{
|
{
|
||||||
struct Fenetre_Bouton_normal * Temp=NULL;
|
T_Bouton_normal * Temp=NULL;
|
||||||
|
|
||||||
Nb_boutons_fenetre++;
|
Nb_boutons_fenetre++;
|
||||||
|
|
||||||
if (Clickable)
|
if (Clickable)
|
||||||
{
|
{
|
||||||
Temp=(struct Fenetre_Bouton_normal *)malloc(sizeof(struct Fenetre_Bouton_normal));
|
Temp=(T_Bouton_normal *)malloc(sizeof(T_Bouton_normal));
|
||||||
Temp->Numero =Nb_boutons_fenetre;
|
Temp->Numero =Nb_boutons_fenetre;
|
||||||
Temp->Pos_X =Pos_X;
|
Temp->Pos_X =Pos_X;
|
||||||
Temp->Pos_Y =Pos_Y;
|
Temp->Pos_Y =Pos_Y;
|
||||||
@ -1479,18 +1479,18 @@ struct Fenetre_Bouton_normal * Fenetre_Definir_bouton_normal(word Pos_X, word Po
|
|||||||
}
|
}
|
||||||
//------ Rajout d'un bouton à la liste de ceux présents dans la fenêtre ------
|
//------ Rajout d'un bouton à la liste de ceux présents dans la fenêtre ------
|
||||||
|
|
||||||
struct Fenetre_Bouton_normal * Fenetre_Definir_bouton_repetable(word Pos_X, word Pos_Y,
|
T_Bouton_normal * Fenetre_Definir_bouton_repetable(word Pos_X, word Pos_Y,
|
||||||
word Largeur, word Hauteur,
|
word Largeur, word Hauteur,
|
||||||
char * Titre, byte Lettre_soulignee,
|
char * Titre, byte Lettre_soulignee,
|
||||||
byte Clickable, word Raccourci)
|
byte Clickable, word Raccourci)
|
||||||
{
|
{
|
||||||
struct Fenetre_Bouton_normal * Temp=NULL;
|
T_Bouton_normal * Temp=NULL;
|
||||||
|
|
||||||
Nb_boutons_fenetre++;
|
Nb_boutons_fenetre++;
|
||||||
|
|
||||||
if (Clickable)
|
if (Clickable)
|
||||||
{
|
{
|
||||||
Temp=(struct Fenetre_Bouton_normal *)malloc(sizeof(struct Fenetre_Bouton_normal));
|
Temp=(T_Bouton_normal *)malloc(sizeof(T_Bouton_normal));
|
||||||
Temp->Numero =Nb_boutons_fenetre;
|
Temp->Numero =Nb_boutons_fenetre;
|
||||||
Temp->Pos_X =Pos_X;
|
Temp->Pos_X =Pos_X;
|
||||||
Temp->Pos_Y =Pos_Y;
|
Temp->Pos_Y =Pos_Y;
|
||||||
@ -1507,11 +1507,11 @@ struct Fenetre_Bouton_normal * Fenetre_Definir_bouton_repetable(word Pos_X, word
|
|||||||
return Temp;
|
return Temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Fenetre_Bouton_palette * Fenetre_Definir_bouton_palette(word Pos_X, word Pos_Y)
|
T_Bouton_palette * Fenetre_Definir_bouton_palette(word Pos_X, word Pos_Y)
|
||||||
{
|
{
|
||||||
struct Fenetre_Bouton_palette * Temp;
|
T_Bouton_palette * Temp;
|
||||||
|
|
||||||
Temp=(struct Fenetre_Bouton_palette *)malloc(sizeof(struct Fenetre_Bouton_palette));
|
Temp=(T_Bouton_palette *)malloc(sizeof(T_Bouton_palette));
|
||||||
Temp->Numero =++Nb_boutons_fenetre;
|
Temp->Numero =++Nb_boutons_fenetre;
|
||||||
Temp->Pos_X =Pos_X;
|
Temp->Pos_X =Pos_X;
|
||||||
Temp->Pos_Y =Pos_Y;
|
Temp->Pos_Y =Pos_Y;
|
||||||
@ -1524,15 +1524,15 @@ struct Fenetre_Bouton_palette * Fenetre_Definir_bouton_palette(word Pos_X, word
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct Fenetre_Bouton_scroller * Fenetre_Definir_bouton_scroller(word Pos_X, word Pos_Y,
|
T_Bouton_scroller * Fenetre_Definir_bouton_scroller(word Pos_X, word Pos_Y,
|
||||||
word Hauteur,
|
word Hauteur,
|
||||||
word Nb_elements,
|
word Nb_elements,
|
||||||
word Nb_elements_visibles,
|
word Nb_elements_visibles,
|
||||||
word Position_initiale)
|
word Position_initiale)
|
||||||
{
|
{
|
||||||
struct Fenetre_Bouton_scroller * Temp;
|
T_Bouton_scroller * Temp;
|
||||||
|
|
||||||
Temp=(struct Fenetre_Bouton_scroller *)malloc(sizeof(struct Fenetre_Bouton_scroller));
|
Temp=(T_Bouton_scroller *)malloc(sizeof(T_Bouton_scroller));
|
||||||
Temp->Numero =++Nb_boutons_fenetre;
|
Temp->Numero =++Nb_boutons_fenetre;
|
||||||
Temp->Pos_X =Pos_X;
|
Temp->Pos_X =Pos_X;
|
||||||
Temp->Pos_Y =Pos_Y;
|
Temp->Pos_Y =Pos_Y;
|
||||||
@ -1550,11 +1550,11 @@ struct Fenetre_Bouton_scroller * Fenetre_Definir_bouton_scroller(word Pos_X, wor
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct Fenetre_Bouton_special * Fenetre_Definir_bouton_special(word Pos_X,word Pos_Y,word Largeur,word Hauteur)
|
T_Bouton_special * Fenetre_Definir_bouton_special(word Pos_X,word Pos_Y,word Largeur,word Hauteur)
|
||||||
{
|
{
|
||||||
struct Fenetre_Bouton_special * Temp;
|
T_Bouton_special * Temp;
|
||||||
|
|
||||||
Temp=(struct Fenetre_Bouton_special *)malloc(sizeof(struct Fenetre_Bouton_special));
|
Temp=(T_Bouton_special *)malloc(sizeof(T_Bouton_special));
|
||||||
Temp->Numero =++Nb_boutons_fenetre;
|
Temp->Numero =++Nb_boutons_fenetre;
|
||||||
Temp->Pos_X =Pos_X;
|
Temp->Pos_X =Pos_X;
|
||||||
Temp->Pos_Y =Pos_Y;
|
Temp->Pos_Y =Pos_Y;
|
||||||
@ -1567,19 +1567,19 @@ struct Fenetre_Bouton_special * Fenetre_Definir_bouton_special(word Pos_X,word P
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct Fenetre_Bouton_special * Fenetre_Definir_bouton_saisie(word Pos_X,word Pos_Y,word Largeur_en_caracteres)
|
T_Bouton_special * Fenetre_Definir_bouton_saisie(word Pos_X,word Pos_Y,word Largeur_en_caracteres)
|
||||||
{
|
{
|
||||||
struct Fenetre_Bouton_special *Temp;
|
T_Bouton_special *Temp;
|
||||||
Temp=Fenetre_Definir_bouton_special(Pos_X,Pos_Y,(Largeur_en_caracteres<<3)+3,11);
|
Temp=Fenetre_Definir_bouton_special(Pos_X,Pos_Y,(Largeur_en_caracteres<<3)+3,11);
|
||||||
Fenetre_Dessiner_bouton_saisie(Pos_X,Pos_Y,Largeur_en_caracteres);
|
Fenetre_Dessiner_bouton_saisie(Pos_X,Pos_Y,Largeur_en_caracteres);
|
||||||
return Temp;
|
return Temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Fenetre_Bouton_dropdown * Fenetre_Definir_bouton_dropdown(word Pos_X,word Pos_Y,word Largeur,word Hauteur,word Largeur_choix,char *Libelle,byte Affiche_choix,byte Affiche_centre,byte Affiche_fleche,byte Bouton_actif)
|
T_Bouton_dropdown * Fenetre_Definir_bouton_dropdown(word Pos_X,word Pos_Y,word Largeur,word Hauteur,word Largeur_choix,char *Libelle,byte Affiche_choix,byte Affiche_centre,byte Affiche_fleche,byte Bouton_actif)
|
||||||
{
|
{
|
||||||
struct Fenetre_Bouton_dropdown *Temp;
|
T_Bouton_dropdown *Temp;
|
||||||
|
|
||||||
Temp=(struct Fenetre_Bouton_dropdown *)malloc(sizeof(struct Fenetre_Bouton_dropdown));
|
Temp=(T_Bouton_dropdown *)malloc(sizeof(T_Bouton_dropdown));
|
||||||
Temp->Numero =++Nb_boutons_fenetre;
|
Temp->Numero =++Nb_boutons_fenetre;
|
||||||
Temp->Pos_X =Pos_X;
|
Temp->Pos_X =Pos_X;
|
||||||
Temp->Pos_Y =Pos_Y;
|
Temp->Pos_Y =Pos_Y;
|
||||||
@ -1606,12 +1606,12 @@ struct Fenetre_Bouton_dropdown * Fenetre_Definir_bouton_dropdown(word Pos_X,word
|
|||||||
// Ajoute un choix à une dropdown. Le libellé est seulement référencé,
|
// Ajoute un choix à une dropdown. Le libellé est seulement référencé,
|
||||||
// il doit pointer sur une zone qui doit être encore valide à la fermeture
|
// il doit pointer sur une zone qui doit être encore valide à la fermeture
|
||||||
// de la fenêtre (comprise).
|
// de la fenêtre (comprise).
|
||||||
void Fenetre_Dropdown_choix(struct Fenetre_Bouton_dropdown * Dropdown, word Numero, const char *Libelle)
|
void Fenetre_Dropdown_choix(T_Bouton_dropdown * Dropdown, word Numero, const char *Libelle)
|
||||||
{
|
{
|
||||||
struct Bouton_dropdown_choix *Temp;
|
T_Dropdown_choix *Temp;
|
||||||
struct Bouton_dropdown_choix *Dernier;
|
T_Dropdown_choix *Dernier;
|
||||||
|
|
||||||
Temp=(struct Bouton_dropdown_choix *)malloc(sizeof(struct Bouton_dropdown_choix));
|
Temp=(T_Dropdown_choix *)malloc(sizeof(T_Dropdown_choix));
|
||||||
Temp->Numero =Numero;
|
Temp->Numero =Numero;
|
||||||
Temp->Libelle=Libelle;
|
Temp->Libelle=Libelle;
|
||||||
Temp->Next=NULL;
|
Temp->Next=NULL;
|
||||||
@ -1631,9 +1631,9 @@ void Fenetre_Dropdown_choix(struct Fenetre_Bouton_dropdown * Dropdown, word Nume
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ------------- Suppression de tous les choix d'une dropdown ---------
|
// ------------- Suppression de tous les choix d'une dropdown ---------
|
||||||
void Fenetre_Dropdown_vider_choix(struct Fenetre_Bouton_dropdown * Dropdown)
|
void Fenetre_Dropdown_vider_choix(T_Bouton_dropdown * Dropdown)
|
||||||
{
|
{
|
||||||
struct Bouton_dropdown_choix * Choix_suivant;
|
T_Dropdown_choix * Choix_suivant;
|
||||||
while (Dropdown->Premier_choix)
|
while (Dropdown->Premier_choix)
|
||||||
{
|
{
|
||||||
Choix_suivant=Dropdown->Premier_choix->Next;
|
Choix_suivant=Dropdown->Premier_choix->Next;
|
||||||
@ -1701,11 +1701,11 @@ void Fermer_popup(void)
|
|||||||
// Lors de l'appel à cette procedure, la souris doit être affichée.
|
// Lors de l'appel à cette procedure, la souris doit être affichée.
|
||||||
// En sortie de cette procedure, la souris est effacée.
|
// En sortie de cette procedure, la souris est effacée.
|
||||||
{
|
{
|
||||||
struct Fenetre_Bouton_normal * Temp1;
|
T_Bouton_normal * Temp1;
|
||||||
struct Fenetre_Bouton_palette * Temp2;
|
T_Bouton_palette * Temp2;
|
||||||
struct Fenetre_Bouton_scroller * Temp3;
|
T_Bouton_scroller * Temp3;
|
||||||
struct Fenetre_Bouton_special * Temp4;
|
T_Bouton_special * Temp4;
|
||||||
struct Fenetre_Bouton_dropdown * Temp5;
|
T_Bouton_dropdown * Temp5;
|
||||||
|
|
||||||
Effacer_curseur();
|
Effacer_curseur();
|
||||||
|
|
||||||
@ -1798,7 +1798,7 @@ byte Fenetre_click_dans_zone(short Debut_X,short Debut_Y,short Fin_X,short Fin_Y
|
|||||||
|
|
||||||
// --- Attend que l'on clique dans la palette pour renvoyer la couleur choisie
|
// --- Attend que l'on clique dans la palette pour renvoyer la couleur choisie
|
||||||
// ou bien renvoie -1 si on a annulé l'action pas click-droit ou Escape ------
|
// ou bien renvoie -1 si on a annulé l'action pas click-droit ou Escape ------
|
||||||
short Attendre_click_dans_palette(struct Fenetre_Bouton_palette * Enreg)
|
short Attendre_click_dans_palette(T_Bouton_palette * Enreg)
|
||||||
{
|
{
|
||||||
short Debut_X=Enreg->Pos_X+5;
|
short Debut_X=Enreg->Pos_X+5;
|
||||||
short Debut_Y=Enreg->Pos_Y+3;
|
short Debut_Y=Enreg->Pos_Y+3;
|
||||||
@ -2100,14 +2100,14 @@ void Deplacer_fenetre(short Dx, short Dy)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Gestion des dropdown
|
// Gestion des dropdown
|
||||||
short Fenetre_Dropdown_click(struct Fenetre_Bouton_dropdown *Bouton)
|
short Fenetre_Dropdown_click(T_Bouton_dropdown *Bouton)
|
||||||
{
|
{
|
||||||
short Nb_choix;
|
short Nb_choix;
|
||||||
short Indice_choix;
|
short Indice_choix;
|
||||||
short Indice_selectionne;
|
short Indice_selectionne;
|
||||||
short Ancien_Indice_selectionne;
|
short Ancien_Indice_selectionne;
|
||||||
short Hauteur_boite;
|
short Hauteur_boite;
|
||||||
struct Bouton_dropdown_choix *Choix;
|
T_Dropdown_choix *Choix;
|
||||||
// Taille de l'ombre portée (en plus des dimensions normales)
|
// Taille de l'ombre portée (en plus des dimensions normales)
|
||||||
#define OMBRE_DROITE 3
|
#define OMBRE_DROITE 3
|
||||||
#define OMBRE_BAS 4
|
#define OMBRE_BAS 4
|
||||||
@ -2270,11 +2270,11 @@ short Fenetre_bouton_normal_click(word Pos_X, word Pos_Y, word Largeur, word Hau
|
|||||||
// --- Renvoie le numéro du bouton clicke (-1:hors de la fenêtre, 0:aucun) ---
|
// --- Renvoie le numéro du bouton clicke (-1:hors de la fenêtre, 0:aucun) ---
|
||||||
short Fenetre_Numero_bouton_clicke(void)
|
short Fenetre_Numero_bouton_clicke(void)
|
||||||
{
|
{
|
||||||
struct Fenetre_Bouton_normal * Temp1;
|
T_Bouton_normal * Temp1;
|
||||||
struct Fenetre_Bouton_palette * Temp2;
|
T_Bouton_palette * Temp2;
|
||||||
struct Fenetre_Bouton_scroller * Temp3;
|
T_Bouton_scroller * Temp3;
|
||||||
struct Fenetre_Bouton_special * Temp4;
|
T_Bouton_special * Temp4;
|
||||||
struct Fenetre_Bouton_dropdown * Temp5;
|
T_Bouton_dropdown * Temp5;
|
||||||
|
|
||||||
//long Hauteur_Curseur_jauge;
|
//long Hauteur_Curseur_jauge;
|
||||||
long Hauteur_maxi_jauge;
|
long Hauteur_maxi_jauge;
|
||||||
@ -2446,7 +2446,7 @@ short Fenetre_Numero_bouton_clicke(void)
|
|||||||
|
|
||||||
short Fenetre_Numero_bouton_touche(void)
|
short Fenetre_Numero_bouton_touche(void)
|
||||||
{
|
{
|
||||||
struct Fenetre_Bouton_normal * Temp;
|
T_Bouton_normal * Temp;
|
||||||
|
|
||||||
if (Touche & MOD_SHIFT)
|
if (Touche & MOD_SHIFT)
|
||||||
Fenetre_Attribut1=A_DROITE;
|
Fenetre_Attribut1=A_DROITE;
|
||||||
|
|||||||
30
moteur.h
30
moteur.h
@ -37,39 +37,39 @@ void Fenetre_Enfoncer_bouton_normal(word Pos_X,word Pos_Y,word Largeur,word Haut
|
|||||||
void Fenetre_Desenfoncer_bouton_normal(word Pos_X,word Pos_Y,word Largeur,word Hauteur);
|
void Fenetre_Desenfoncer_bouton_normal(word Pos_X,word Pos_Y,word Largeur,word Hauteur);
|
||||||
void Fenetre_Dessiner_bouton_palette(word Pos_X,word Pos_Y);
|
void Fenetre_Dessiner_bouton_palette(word Pos_X,word Pos_Y);
|
||||||
|
|
||||||
void Calculer_hauteur_curseur_jauge(struct Fenetre_Bouton_scroller * Enreg);
|
void Calculer_hauteur_curseur_jauge(T_Bouton_scroller * Enreg);
|
||||||
void Fenetre_Dessiner_jauge(struct Fenetre_Bouton_scroller * Enreg);
|
void Fenetre_Dessiner_jauge(T_Bouton_scroller * Enreg);
|
||||||
void Fenetre_Dessiner_bouton_scroller(struct Fenetre_Bouton_scroller * Enreg);
|
void Fenetre_Dessiner_bouton_scroller(T_Bouton_scroller * Enreg);
|
||||||
|
|
||||||
void Fenetre_Contenu_bouton_saisie(struct Fenetre_Bouton_special * Enreg, char * Contenu);
|
void Fenetre_Contenu_bouton_saisie(T_Bouton_special * Enreg, char * Contenu);
|
||||||
void Fenetre_Effacer_bouton_saisie(struct Fenetre_Bouton_special * Enreg);
|
void Fenetre_Effacer_bouton_saisie(T_Bouton_special * Enreg);
|
||||||
void Fenetre_Dessiner_bouton_saisie(word Pos_X,word Pos_Y,word Largeur_en_caracteres);
|
void Fenetre_Dessiner_bouton_saisie(word Pos_X,word Pos_Y,word Largeur_en_caracteres);
|
||||||
|
|
||||||
struct Fenetre_Bouton_normal * Fenetre_Definir_bouton_normal(word Pos_X, word Pos_Y,
|
T_Bouton_normal * Fenetre_Definir_bouton_normal(word Pos_X, word Pos_Y,
|
||||||
word Largeur, word Hauteur,
|
word Largeur, word Hauteur,
|
||||||
char * Titre,byte Lettre_soulignee,
|
char * Titre,byte Lettre_soulignee,
|
||||||
byte Clickable, word Raccourci);
|
byte Clickable, word Raccourci);
|
||||||
struct Fenetre_Bouton_normal * Fenetre_Definir_bouton_repetable(word Pos_X, word Pos_Y,
|
T_Bouton_normal * Fenetre_Definir_bouton_repetable(word Pos_X, word Pos_Y,
|
||||||
word Largeur, word Hauteur,
|
word Largeur, word Hauteur,
|
||||||
char * Titre,byte Lettre_soulignee,
|
char * Titre,byte Lettre_soulignee,
|
||||||
byte Clickable, word Raccourci);
|
byte Clickable, word Raccourci);
|
||||||
|
|
||||||
struct Fenetre_Bouton_palette * Fenetre_Definir_bouton_palette(word Pos_X, word Pos_Y);
|
T_Bouton_palette * Fenetre_Definir_bouton_palette(word Pos_X, word Pos_Y);
|
||||||
void Fenetre_Effacer_tags(void);
|
void Fenetre_Effacer_tags(void);
|
||||||
void Tagger_intervalle_palette(byte Debut,byte Fin);
|
void Tagger_intervalle_palette(byte Debut,byte Fin);
|
||||||
|
|
||||||
struct Fenetre_Bouton_scroller * Fenetre_Definir_bouton_scroller(word Pos_X, word Pos_Y,
|
T_Bouton_scroller * Fenetre_Definir_bouton_scroller(word Pos_X, word Pos_Y,
|
||||||
word Hauteur,
|
word Hauteur,
|
||||||
word Nb_elements,
|
word Nb_elements,
|
||||||
word Nb_elements_visibles,
|
word Nb_elements_visibles,
|
||||||
word Position_initiale);
|
word Position_initiale);
|
||||||
struct Fenetre_Bouton_special * Fenetre_Definir_bouton_special(word Pos_X,word Pos_Y,word Largeur,word Hauteur);
|
T_Bouton_special * Fenetre_Definir_bouton_special(word Pos_X,word Pos_Y,word Largeur,word Hauteur);
|
||||||
struct Fenetre_Bouton_special * Fenetre_Definir_bouton_saisie(word Pos_X,word Pos_Y,word Largeur_en_caracteres);
|
T_Bouton_special * Fenetre_Definir_bouton_saisie(word Pos_X,word Pos_Y,word Largeur_en_caracteres);
|
||||||
struct Fenetre_Bouton_dropdown * Fenetre_Definir_bouton_dropdown(word Pos_X,word Pos_Y,word Largeur,word Hauteur,word Largeur_choix,char *Libelle,byte Affiche_choix,byte Affiche_centre,byte Affiche_fleche,byte Bouton_actif);
|
T_Bouton_dropdown * Fenetre_Definir_bouton_dropdown(word Pos_X,word Pos_Y,word Largeur,word Hauteur,word Largeur_choix,char *Libelle,byte Affiche_choix,byte Affiche_centre,byte Affiche_fleche,byte Bouton_actif);
|
||||||
void Fenetre_Dropdown_choix(struct Fenetre_Bouton_dropdown * Dropdown, word Numero, const char *Libelle);
|
void Fenetre_Dropdown_choix(T_Bouton_dropdown * Dropdown, word Numero, const char *Libelle);
|
||||||
void Fenetre_Dropdown_vider_choix(struct Fenetre_Bouton_dropdown * Dropdown);
|
void Fenetre_Dropdown_vider_choix(T_Bouton_dropdown * Dropdown);
|
||||||
byte Fenetre_click_dans_zone(short Debut_X,short Debut_Y,short Fin_X,short Fin_Y);
|
byte Fenetre_click_dans_zone(short Debut_X,short Debut_Y,short Fin_X,short Fin_Y);
|
||||||
short Attendre_click_dans_palette(struct Fenetre_Bouton_palette * Enreg);
|
short Attendre_click_dans_palette(T_Bouton_palette * Enreg);
|
||||||
void Recuperer_couleur_derriere_fenetre(byte * Couleur, byte * Click);
|
void Recuperer_couleur_derriere_fenetre(byte * Couleur, byte * Click);
|
||||||
|
|
||||||
short Fenetre_Bouton_clicke(void);
|
short Fenetre_Bouton_clicke(void);
|
||||||
|
|||||||
8
op_c.c
8
op_c.c
@ -890,7 +890,7 @@ void CS_Trier_par_luminance(ClusterSet * cs)
|
|||||||
cs->clusters=nc;
|
cs->clusters=nc;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CS_Generer_TC_et_Palette(ClusterSet * cs,Table_conversion * tc,struct Composantes * palette)
|
void CS_Generer_TC_et_Palette(ClusterSet * cs,Table_conversion * tc,Composantes * palette)
|
||||||
{
|
{
|
||||||
int indice;
|
int indice;
|
||||||
int r,v,b;
|
int r,v,b;
|
||||||
@ -1012,7 +1012,7 @@ void DS_Generer(DegradeSet * ds,ClusterSet * cs)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Table_conversion * Optimiser_palette(Bitmap24B image,int taille,struct Composantes * palette,int r,int v,int b)
|
Table_conversion * Optimiser_palette(Bitmap24B image,int taille,Composantes * palette,int r,int v,int b)
|
||||||
{
|
{
|
||||||
Table_occurence * to;
|
Table_occurence * to;
|
||||||
Table_conversion * tc;
|
Table_conversion * tc;
|
||||||
@ -1084,7 +1084,7 @@ int Valeur_modifiee(int valeur,int modif)
|
|||||||
return valeur;
|
return valeur;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Convert_bitmap_24B_to_256_Floyd_Steinberg(Bitmap256 Dest,Bitmap24B Source,int largeur,int hauteur,struct Composantes * palette,Table_conversion * tc)
|
void Convert_bitmap_24B_to_256_Floyd_Steinberg(Bitmap256 Dest,Bitmap24B Source,int largeur,int hauteur,Composantes * palette,Table_conversion * tc)
|
||||||
// Cette fonction dégrade au fur et à mesure le bitmap source, donc soit on ne
|
// Cette fonction dégrade au fur et à mesure le bitmap source, donc soit on ne
|
||||||
// s'en ressert pas, soit on passe à la fonction une copie de travail du
|
// s'en ressert pas, soit on passe à la fonction une copie de travail du
|
||||||
// bitmap original.
|
// bitmap original.
|
||||||
@ -1203,7 +1203,7 @@ static const byte precision_24b[]=
|
|||||||
|
|
||||||
// Cette fonction utilise l'algorithme "median cut" (Optimiser_palette) pour trouver la palette, et diffuse les erreurs avec floyd-steinberg.
|
// Cette fonction utilise l'algorithme "median cut" (Optimiser_palette) pour trouver la palette, et diffuse les erreurs avec floyd-steinberg.
|
||||||
|
|
||||||
int Convert_bitmap_24B_to_256(Bitmap256 Dest,Bitmap24B Source,int largeur,int hauteur,struct Composantes * palette)
|
int Convert_bitmap_24B_to_256(Bitmap256 Dest,Bitmap24B Source,int largeur,int hauteur,Composantes * palette)
|
||||||
{
|
{
|
||||||
Table_conversion * table; // table de conversion
|
Table_conversion * table; // table de conversion
|
||||||
int ip; // Indice de précision pour la conversion
|
int ip; // Indice de précision pour la conversion
|
||||||
|
|||||||
16
op_c.h
16
op_c.h
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
//////////////////////////////////////////////// Définition des types de base
|
//////////////////////////////////////////////// Définition des types de base
|
||||||
|
|
||||||
typedef struct Composantes * Bitmap24B;
|
typedef Composantes * Bitmap24B;
|
||||||
typedef byte * Bitmap256;
|
typedef byte * Bitmap256;
|
||||||
|
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ void HSLtoRGB(byte h, byte s, byte l, byte* r, byte* g, byte* b);
|
|||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
/////////////////////////////// M‚thodes de gestion des tables d'occurence //
|
/////////////////////////////// Méthodes de gestion des tables d'occurence //
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void TO_Init(Table_occurence * t);
|
void TO_Init(Table_occurence * t);
|
||||||
@ -166,7 +166,7 @@ void TO_Compter_occurences(Table_occurence * t,Bitmap24B image,int taille);
|
|||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
///////////////////////////////////////// M‚thodes de gestion des clusters //
|
///////////////////////////////////////// Méthodes de gestion des clusters //
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void Cluster_Analyser(Cluster * c,Table_occurence * to);
|
void Cluster_Analyser(Cluster * c,Table_occurence * to);
|
||||||
@ -176,7 +176,7 @@ void Cluster_Calculer_teinte(Cluster * c,Table_occurence * to);
|
|||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//////////////////////////// M‚thodes de gestion des ensembles de clusters //
|
//////////////////////////// Méthodes de gestion des ensembles de clusters //
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void CS_Init(ClusterSet * cs,Table_occurence * to);
|
void CS_Init(ClusterSet * cs,Table_occurence * to);
|
||||||
@ -186,10 +186,10 @@ void CS_Get(ClusterSet * cs,Cluster * c);
|
|||||||
void CS_Set(ClusterSet * cs,Cluster * c);
|
void CS_Set(ClusterSet * cs,Cluster * c);
|
||||||
void CS_Generer(ClusterSet * cs,Table_occurence * to);
|
void CS_Generer(ClusterSet * cs,Table_occurence * to);
|
||||||
void CS_Calculer_teintes(ClusterSet * cs,Table_occurence * to);
|
void CS_Calculer_teintes(ClusterSet * cs,Table_occurence * to);
|
||||||
void CS_Generer_TC_et_Palette(ClusterSet * cs,Table_conversion * tc,struct Composantes * palette);
|
void CS_Generer_TC_et_Palette(ClusterSet * cs,Table_conversion * tc,Composantes * palette);
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//////////////////////////// M‚thodes de gestion des ensembles de d‚grad‚s //
|
//////////////////////////// Méthodes de gestion des ensembles de dégradés //
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void DS_Init(DegradeSet * ds,ClusterSet * cs);
|
void DS_Init(DegradeSet * ds,ClusterSet * cs);
|
||||||
@ -199,9 +199,9 @@ void DS_Generer(DegradeSet * ds,ClusterSet * cs);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Convertie avec le plus de pr‚cision possible une image 24b en 256c
|
// Convertie avec le plus de précision possible une image 24b en 256c
|
||||||
// Renvoie s'il y a eu une erreur ou pas..
|
// Renvoie s'il y a eu une erreur ou pas..
|
||||||
int Convert_bitmap_24B_to_256(Bitmap256 Dest,Bitmap24B Source,int largeur,int hauteur,struct Composantes * palette);
|
int Convert_bitmap_24B_to_256(Bitmap256 Dest,Bitmap24B Source,int largeur,int hauteur,Composantes * palette);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
48
palette.c
48
palette.c
@ -285,7 +285,7 @@ void Swap(int X_Swap,short Debut_Bloc_1,short Debut_Bloc_2,short Taille_du_bloc,
|
|||||||
dword Tempo;
|
dword Tempo;
|
||||||
byte Table_de_conversion[256];
|
byte Table_de_conversion[256];
|
||||||
|
|
||||||
struct Composantes Palette_temporaire[256];
|
Composantes Palette_temporaire[256];
|
||||||
dword Utilisation_temporaire[256];
|
dword Utilisation_temporaire[256];
|
||||||
|
|
||||||
// On fait une copie de la palette
|
// On fait une copie de la palette
|
||||||
@ -390,7 +390,7 @@ void Remettre_proprement_les_couleurs_du_menu(dword * Utilisation_couleur)
|
|||||||
short Indice,Indice2;
|
short Indice,Indice2;
|
||||||
byte Couleur;
|
byte Couleur;
|
||||||
byte Table_de_remplacement[256];
|
byte Table_de_remplacement[256];
|
||||||
struct Composantes RVB[4];
|
Composantes RVB[4];
|
||||||
short Nouvelles[4]={255,254,253,252};
|
short Nouvelles[4]={255,254,253,252};
|
||||||
|
|
||||||
// On initialise la table de remplacement
|
// On initialise la table de remplacement
|
||||||
@ -640,7 +640,7 @@ void Reduce_palette(short * Nb_couleurs_utilisees,int Nb_couleurs_demandees,T_Pa
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Palette_Modifier_jauge(struct Fenetre_Bouton_scroller * Jauge,
|
void Palette_Modifier_jauge(T_Bouton_scroller * Jauge,
|
||||||
word Nb_elements, word Position,
|
word Nb_elements, word Position,
|
||||||
char * Valeur, short Pos_X)
|
char * Valeur, short Pos_X)
|
||||||
{
|
{
|
||||||
@ -653,10 +653,10 @@ void Palette_Modifier_jauge(struct Fenetre_Bouton_scroller * Jauge,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Afficher_les_jauges(struct Fenetre_Bouton_scroller * Jauge_rouge,
|
void Afficher_les_jauges(T_Bouton_scroller * Jauge_rouge,
|
||||||
struct Fenetre_Bouton_scroller * Jauge_verte,
|
T_Bouton_scroller * Jauge_verte,
|
||||||
struct Fenetre_Bouton_scroller * Jauge_bleue,
|
T_Bouton_scroller * Jauge_bleue,
|
||||||
byte Bloc_selectionne, struct Composantes * Palette)
|
byte Bloc_selectionne, Composantes * Palette)
|
||||||
{
|
{
|
||||||
char Chaine[5];
|
char Chaine[5];
|
||||||
|
|
||||||
@ -688,9 +688,9 @@ void Afficher_les_jauges(struct Fenetre_Bouton_scroller * Jauge_rouge,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Palette_Reafficher_jauges(struct Fenetre_Bouton_scroller * Jauge_rouge,
|
void Palette_Reafficher_jauges(T_Bouton_scroller * Jauge_rouge,
|
||||||
struct Fenetre_Bouton_scroller * Jauge_verte,
|
T_Bouton_scroller * Jauge_verte,
|
||||||
struct Fenetre_Bouton_scroller * Jauge_bleue,
|
T_Bouton_scroller * Jauge_bleue,
|
||||||
T_Palette Palette,byte Debut,byte Fin)
|
T_Palette Palette,byte Debut,byte Fin)
|
||||||
{
|
{
|
||||||
char Chaine[5];
|
char Chaine[5];
|
||||||
@ -760,11 +760,11 @@ void Bouton_Palette(void)
|
|||||||
char Chaine[10];
|
char Chaine[10];
|
||||||
word i;
|
word i;
|
||||||
//short Pos_X,Pos_Y;
|
//short Pos_X,Pos_Y;
|
||||||
struct Fenetre_Bouton_normal * Bouton_Used;
|
T_Bouton_normal * Bouton_Used;
|
||||||
struct Fenetre_Bouton_scroller * Jauge_rouge;
|
T_Bouton_scroller * Jauge_rouge;
|
||||||
struct Fenetre_Bouton_scroller * Jauge_verte;
|
T_Bouton_scroller * Jauge_verte;
|
||||||
struct Fenetre_Bouton_scroller * Jauge_bleue;
|
T_Bouton_scroller * Jauge_bleue;
|
||||||
struct Fenetre_Bouton_scroller * Jauge_Reduction;
|
T_Bouton_scroller * Jauge_Reduction;
|
||||||
byte Backup_de_l_image_effectue=0;
|
byte Backup_de_l_image_effectue=0;
|
||||||
byte Il_faut_remapper=0;
|
byte Il_faut_remapper=0;
|
||||||
|
|
||||||
@ -772,13 +772,13 @@ void Bouton_Palette(void)
|
|||||||
short Nb_couleurs_utilisees=-1; // -1 <=> Inconnu
|
short Nb_couleurs_utilisees=-1; // -1 <=> Inconnu
|
||||||
byte Table_de_conversion[256];
|
byte Table_de_conversion[256];
|
||||||
|
|
||||||
struct Composantes * Palette_backup;
|
Composantes * Palette_backup;
|
||||||
struct Composantes * Palette_temporaire;
|
Composantes * Palette_temporaire;
|
||||||
struct Composantes * Palette_de_travail;
|
Composantes * Palette_de_travail;
|
||||||
|
|
||||||
Palette_backup =(struct Composantes *)malloc(sizeof(T_Palette));
|
Palette_backup =(Composantes *)malloc(sizeof(T_Palette));
|
||||||
Palette_temporaire=(struct Composantes *)malloc(sizeof(T_Palette));
|
Palette_temporaire=(Composantes *)malloc(sizeof(T_Palette));
|
||||||
Palette_de_travail=(struct Composantes *)malloc(sizeof(T_Palette));
|
Palette_de_travail=(Composantes *)malloc(sizeof(T_Palette));
|
||||||
|
|
||||||
Unite_Composantes(Graduations_RGB);
|
Unite_Composantes(Graduations_RGB);
|
||||||
|
|
||||||
@ -2078,9 +2078,9 @@ void Bouton_Palette_secondaire(void)
|
|||||||
{
|
{
|
||||||
short Bouton_clicke;
|
short Bouton_clicke;
|
||||||
byte Dummy;
|
byte Dummy;
|
||||||
struct Fenetre_Bouton_scroller * Jauge_Colonnes;
|
T_Bouton_scroller * Jauge_Colonnes;
|
||||||
struct Fenetre_Bouton_scroller * Jauge_Lignes;
|
T_Bouton_scroller * Jauge_Lignes;
|
||||||
struct Fenetre_Bouton_scroller * Jauge_RGBScale;
|
T_Bouton_scroller * Jauge_RGBScale;
|
||||||
char Chaine[4];
|
char Chaine[4];
|
||||||
byte Palette_a_redessiner=0;
|
byte Palette_a_redessiner=0;
|
||||||
|
|
||||||
|
|||||||
10
shade.c
10
shade.c
@ -443,7 +443,7 @@ int Menu_Shade(void)
|
|||||||
byte Derniere_couleur=0;
|
byte Derniere_couleur=0;
|
||||||
word Select_Debut=0;
|
word Select_Debut=0;
|
||||||
word Select_Fin=0;
|
word Select_Fin=0;
|
||||||
struct Fenetre_Bouton_special * Bouton_saisie;
|
T_Bouton_special * Bouton_saisie;
|
||||||
short Temp,Temp2;
|
short Temp,Temp2;
|
||||||
word Case_temporaire;
|
word Case_temporaire;
|
||||||
word * Buffer; // Buffer du Copy/Paste
|
word * Buffer; // Buffer du Copy/Paste
|
||||||
@ -995,12 +995,12 @@ int Menu_Shade(void)
|
|||||||
|
|
||||||
void Bouton_Shade_Menu(void)
|
void Bouton_Shade_Menu(void)
|
||||||
{
|
{
|
||||||
struct T_Shade * Shade_Liste_Backup; // Anciennes données des shades
|
T_Shade * Shade_Liste_Backup; // Anciennes données des shades
|
||||||
byte Ancien_shade; // Ancien n° de shade actif
|
byte Ancien_shade; // Ancien n° de shade actif
|
||||||
|
|
||||||
|
|
||||||
// Backup des anciennes données
|
// Backup des anciennes données
|
||||||
Shade_Liste_Backup=(struct T_Shade *)malloc(sizeof(Shade_Liste));
|
Shade_Liste_Backup=(T_Shade *)malloc(sizeof(Shade_Liste));
|
||||||
memcpy(Shade_Liste_Backup,Shade_Liste,sizeof(Shade_Liste));
|
memcpy(Shade_Liste_Backup,Shade_Liste,sizeof(Shade_Liste));
|
||||||
Ancien_shade=Shade_Actuel;
|
Ancien_shade=Shade_Actuel;
|
||||||
|
|
||||||
@ -1036,7 +1036,7 @@ void Bouton_Quick_shade_Menu(void)
|
|||||||
char Chaine[4];
|
char Chaine[4];
|
||||||
byte Step_Backup=Quick_shade_Step; // Backup des
|
byte Step_Backup=Quick_shade_Step; // Backup des
|
||||||
byte Loop_Backup=Quick_shade_Loop; // anciennes données
|
byte Loop_Backup=Quick_shade_Loop; // anciennes données
|
||||||
struct Fenetre_Bouton_special * BoutonPas;
|
T_Bouton_special * BoutonPas;
|
||||||
|
|
||||||
Ouvrir_fenetre(142,56,"Quick-shade");
|
Ouvrir_fenetre(142,56,"Quick-shade");
|
||||||
|
|
||||||
|
|||||||
87
struct.h
87
struct.h
@ -43,7 +43,6 @@ typedef void (* fonction_effaceur) (byte);
|
|||||||
typedef void (* fonction_display) (word,word,word);
|
typedef void (* fonction_display) (word,word,word);
|
||||||
typedef byte (* fonction_effet) (word,word,byte);
|
typedef byte (* fonction_effet) (word,word,byte);
|
||||||
typedef void (* fonction_block) (word,word,word,word,byte);
|
typedef void (* fonction_block) (word,word,word,word,byte);
|
||||||
typedef byte (* fonction_test_sign) (void);
|
|
||||||
typedef void (* fonction_Ligne_XOR) (word,word,word);
|
typedef void (* fonction_Ligne_XOR) (word,word,word);
|
||||||
typedef void (* fonction_display_brush_Color) (word,word,word,word,word,word,byte,word);
|
typedef void (* fonction_display_brush_Color) (word,word,word,word,word,word,byte,word);
|
||||||
typedef void (* fonction_display_brush_Mono) (word,word,word,word,word,word,byte,byte,word);
|
typedef void (* fonction_display_brush_Mono) (word,word,word,word,word,word,byte,byte,word);
|
||||||
@ -55,17 +54,14 @@ typedef void (* fonction_display_brush_Color_zoom) (word,word,word,word,word,wor
|
|||||||
typedef void (* fonction_display_brush_Mono_zoom) (word,word,word,word,word,word,byte,byte,word,byte *);
|
typedef void (* fonction_display_brush_Mono_zoom) (word,word,word,word,word,word,byte,byte,word,byte *);
|
||||||
typedef void (* fonction_affiche_brosse) (byte *,word,word,word,word,word,word,byte,word);
|
typedef void (* fonction_affiche_brosse) (byte *,word,word,word,word,word,word,byte,word);
|
||||||
|
|
||||||
struct __attribute__ ((__packed__)) Composantes
|
typedef struct
|
||||||
{
|
{
|
||||||
byte R;
|
byte R;
|
||||||
byte V;
|
byte V;
|
||||||
byte B;
|
byte B;
|
||||||
};
|
}__attribute__ ((__packed__)) Composantes, T_Palette[256];
|
||||||
typedef struct Composantes T_Palette[256];
|
|
||||||
|
|
||||||
|
typedef struct T_Bouton_normal
|
||||||
|
|
||||||
struct Fenetre_Bouton_normal
|
|
||||||
{
|
{
|
||||||
short Numero;
|
short Numero;
|
||||||
word Pos_X;
|
word Pos_X;
|
||||||
@ -75,18 +71,18 @@ struct Fenetre_Bouton_normal
|
|||||||
byte Clickable;
|
byte Clickable;
|
||||||
byte Repetable;
|
byte Repetable;
|
||||||
word Raccourci;
|
word Raccourci;
|
||||||
struct Fenetre_Bouton_normal * Next;
|
struct T_Bouton_normal * Next;
|
||||||
};
|
} T_Bouton_normal;
|
||||||
|
|
||||||
struct Fenetre_Bouton_palette
|
typedef struct T_Bouton_palette
|
||||||
{
|
{
|
||||||
short Numero;
|
short Numero;
|
||||||
word Pos_X;
|
word Pos_X;
|
||||||
word Pos_Y;
|
word Pos_Y;
|
||||||
struct Fenetre_Bouton_palette * Next;
|
struct T_Bouton_palette * Next;
|
||||||
};
|
} T_Bouton_palette;
|
||||||
|
|
||||||
struct Fenetre_Bouton_scroller
|
typedef struct T_Bouton_scroller
|
||||||
{
|
{
|
||||||
short Numero;
|
short Numero;
|
||||||
word Pos_X;
|
word Pos_X;
|
||||||
@ -96,27 +92,27 @@ struct Fenetre_Bouton_scroller
|
|||||||
word Nb_visibles;
|
word Nb_visibles;
|
||||||
word Position;
|
word Position;
|
||||||
word Hauteur_curseur;
|
word Hauteur_curseur;
|
||||||
struct Fenetre_Bouton_scroller * Next;
|
struct T_Bouton_scroller * Next;
|
||||||
};
|
} T_Bouton_scroller;
|
||||||
|
|
||||||
struct Fenetre_Bouton_special
|
typedef struct T_Bouton_special
|
||||||
{
|
{
|
||||||
short Numero;
|
short Numero;
|
||||||
word Pos_X;
|
word Pos_X;
|
||||||
word Pos_Y;
|
word Pos_Y;
|
||||||
word Largeur;
|
word Largeur;
|
||||||
word Hauteur;
|
word Hauteur;
|
||||||
struct Fenetre_Bouton_special * Next;
|
struct T_Bouton_special * Next;
|
||||||
};
|
} T_Bouton_special;
|
||||||
|
|
||||||
struct Bouton_dropdown_choix
|
typedef struct T_Dropdown_choix
|
||||||
{
|
{
|
||||||
short Numero;
|
short Numero;
|
||||||
const char * Libelle;
|
const char * Libelle;
|
||||||
struct Bouton_dropdown_choix * Next;
|
struct T_Dropdown_choix * Next;
|
||||||
};
|
} T_Dropdown_choix;
|
||||||
|
|
||||||
struct Fenetre_Bouton_dropdown
|
typedef struct T_Bouton_dropdown
|
||||||
{
|
{
|
||||||
short Numero;
|
short Numero;
|
||||||
word Pos_X;
|
word Pos_X;
|
||||||
@ -128,21 +124,12 @@ struct Fenetre_Bouton_dropdown
|
|||||||
byte Affiche_fleche; // Display a "down" arrow box in top right
|
byte Affiche_fleche; // Display a "down" arrow box in top right
|
||||||
byte Bouton_actif; // Mouse button: A_GAUCHE || A_DROITE || (A_GAUCHE|A_DROITE)
|
byte Bouton_actif; // Mouse button: A_GAUCHE || A_DROITE || (A_GAUCHE|A_DROITE)
|
||||||
word Largeur_choix; // 0 for "same as control"
|
word Largeur_choix; // 0 for "same as control"
|
||||||
struct Bouton_dropdown_choix * Premier_choix;
|
T_Dropdown_choix * Premier_choix;
|
||||||
struct Fenetre_Bouton_dropdown * Next;
|
struct T_Bouton_dropdown * Next;
|
||||||
};
|
} T_Bouton_dropdown;
|
||||||
|
|
||||||
|
|
||||||
struct T_Drive
|
|
||||||
{
|
|
||||||
char Lettre;
|
|
||||||
byte Type; // 0: Diskette 3.5" / 1: Diskette 5.25" / 2: HDD / 3: CD-ROM / 4: Logique
|
|
||||||
char *Chemin; // Reservé pour "x:\", ou "/", "DF0:", etc.
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// Déclaration du type d'élément qu'on va mémoriser dans la liste:
|
// Déclaration du type d'élément qu'on va mémoriser dans la liste:
|
||||||
struct Element_de_liste_de_fileselect
|
typedef struct Element_de_liste_de_fileselect
|
||||||
{
|
{
|
||||||
char NomAbrege[13]; // Le nom tel qu'affiché dans le fileselector
|
char NomAbrege[13]; // Le nom tel qu'affiché dans le fileselector
|
||||||
char NomComplet[256]; // Le nom du fichier ou du répertoire
|
char NomComplet[256]; // Le nom du fichier ou du répertoire
|
||||||
@ -151,7 +138,7 @@ struct Element_de_liste_de_fileselect
|
|||||||
// données de chaînage de la liste
|
// données de chaînage de la liste
|
||||||
struct Element_de_liste_de_fileselect * Suivant;
|
struct Element_de_liste_de_fileselect * Suivant;
|
||||||
struct Element_de_liste_de_fileselect * Precedent;
|
struct Element_de_liste_de_fileselect * Precedent;
|
||||||
};
|
} Element_de_liste_de_fileselect;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char type;
|
char type;
|
||||||
@ -160,62 +147,62 @@ typedef struct {
|
|||||||
} T_TABLEAIDE;
|
} T_TABLEAIDE;
|
||||||
|
|
||||||
// Déclaration d'une section d'aide:
|
// Déclaration d'une section d'aide:
|
||||||
struct Section_d_aide
|
typedef struct
|
||||||
{
|
{
|
||||||
const T_TABLEAIDE* Table_aide; // Pointeur sur le début de la table d'aide
|
const T_TABLEAIDE* Table_aide; // Pointeur sur le début de la table d'aide
|
||||||
word Nombre_de_lignes;
|
word Nombre_de_lignes;
|
||||||
};
|
} Section_d_aide;
|
||||||
|
|
||||||
// Déclaration d'une info sur un dégradé
|
// Déclaration d'une info sur un dégradé
|
||||||
struct T_Degrade_Tableau
|
typedef struct
|
||||||
{
|
{
|
||||||
byte Debut; // Première couleur du dégradé
|
byte Debut; // Première couleur du dégradé
|
||||||
byte Fin; // Dernière couleur du dégradé
|
byte Fin; // Dernière couleur du dégradé
|
||||||
dword Inverse; // "Le dégradé va de Fin à Debut" //INT
|
dword Inverse; // "Le dégradé va de Fin à Debut" //INT
|
||||||
dword Melange; // Valeur de mélange du dégradé (0-255) //LONG
|
dword Melange; // Valeur de mélange du dégradé (0-255) //LONG
|
||||||
dword Technique; // Technique à utiliser (0-2) //INT
|
dword Technique; // Technique à utiliser (0-2) //INT
|
||||||
} __attribute__((__packed__));
|
} __attribute__((__packed__)) T_Degrade_Tableau;
|
||||||
|
|
||||||
// Déclaration d'une info de shade
|
// Déclaration d'une info de shade
|
||||||
struct T_Shade
|
typedef struct
|
||||||
{
|
{
|
||||||
word Liste[512]; // Liste de couleurs
|
word Liste[512]; // Liste de couleurs
|
||||||
byte Pas; // Pas d'incrémentation/décrémentation
|
byte Pas; // Pas d'incrémentation/décrémentation
|
||||||
byte Mode; // Mode d'utilisation (Normal/Boucle/Non-saturé)
|
byte Mode; // Mode d'utilisation (Normal/Boucle/Non-saturé)
|
||||||
};
|
} T_Shade;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Structure des données dans le fichier de config.
|
// Structure des données dans le fichier de config.
|
||||||
|
|
||||||
struct Config_Mode_video
|
typedef struct
|
||||||
{
|
{
|
||||||
byte Etat;
|
byte Etat;
|
||||||
word Largeur;
|
word Largeur;
|
||||||
word Hauteur;
|
word Hauteur;
|
||||||
} __attribute__((__packed__));
|
} __attribute__((__packed__)) Config_Mode_video;
|
||||||
|
|
||||||
struct Config_Header
|
typedef struct
|
||||||
{
|
{
|
||||||
char Signature[3];
|
char Signature[3];
|
||||||
byte Version1;
|
byte Version1;
|
||||||
byte Version2;
|
byte Version2;
|
||||||
byte Beta1;
|
byte Beta1;
|
||||||
byte Beta2;
|
byte Beta2;
|
||||||
} __attribute__((__packed__));
|
} __attribute__((__packed__)) Config_Header;
|
||||||
|
|
||||||
struct Config_Chunk
|
typedef struct
|
||||||
{
|
{
|
||||||
byte Numero;
|
byte Numero;
|
||||||
word Taille;
|
word Taille;
|
||||||
} __attribute__((__packed__));
|
} __attribute__((__packed__)) Config_Chunk;
|
||||||
|
|
||||||
struct Config_Infos_touche
|
typedef struct
|
||||||
{
|
{
|
||||||
word Numero;
|
word Numero;
|
||||||
word Touche;
|
word Touche;
|
||||||
word Touche2;
|
word Touche2;
|
||||||
} __attribute__((__packed__));
|
} __attribute__((__packed__)) Config_Infos_touche;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2155,7 +2155,7 @@ static const T_TABLEAIDE TableAideCacher[] =
|
|||||||
|
|
||||||
#define DECLARATION_TABLE_AIDE(x) {x, sizeof(x)/sizeof(const T_TABLEAIDE)},
|
#define DECLARATION_TABLE_AIDE(x) {x, sizeof(x)/sizeof(const T_TABLEAIDE)},
|
||||||
|
|
||||||
struct Section_d_aide Table_d_aide[] =
|
Section_d_aide Table_d_aide[] =
|
||||||
{
|
{
|
||||||
DECLARATION_TABLE_AIDE(TableAideAbout)
|
DECLARATION_TABLE_AIDE(TableAideAbout)
|
||||||
DECLARATION_TABLE_AIDE(TableAideLicense)
|
DECLARATION_TABLE_AIDE(TableAideLicense)
|
||||||
|
|||||||
Binary file not shown.
@ -2195,7 +2195,7 @@ byte Meilleure_couleur_sans_exclusion(byte Rouge,byte Vert,byte Bleu)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Calculer_les_4_meilleures_couleurs_pour_1_couleur_du_menu
|
void Calculer_les_4_meilleures_couleurs_pour_1_couleur_du_menu
|
||||||
(byte Rouge, byte Vert, byte Bleu, struct Composantes * Palette, byte * Table)
|
(byte Rouge, byte Vert, byte Bleu, Composantes * Palette, byte * Table)
|
||||||
{
|
{
|
||||||
short Coul;
|
short Coul;
|
||||||
int Delta_R,Delta_V,Delta_B;
|
int Delta_R,Delta_V,Delta_B;
|
||||||
@ -2338,7 +2338,7 @@ void Remapper_ecran_apres_changement_couleurs_menu(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Calculer_couleurs_menu_optimales(struct Composantes * Palette)
|
void Calculer_couleurs_menu_optimales(Composantes * Palette)
|
||||||
{
|
{
|
||||||
byte Table[4];
|
byte Table[4];
|
||||||
short I,J,K;
|
short I,J,K;
|
||||||
|
|||||||
@ -28,7 +28,7 @@ void Afficher_curseur(void);
|
|||||||
void Effacer_curseur(void);
|
void Effacer_curseur(void);
|
||||||
|
|
||||||
void Remapper_ecran_apres_changement_couleurs_menu(void);
|
void Remapper_ecran_apres_changement_couleurs_menu(void);
|
||||||
void Calculer_couleurs_menu_optimales(struct Composantes * Palette);
|
void Calculer_couleurs_menu_optimales(Composantes * Palette);
|
||||||
|
|
||||||
void Recadrer_ecran_par_rapport_au_zoom(void);
|
void Recadrer_ecran_par_rapport_au_zoom(void);
|
||||||
void Calculer_split(void);
|
void Calculer_split(void);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user