more translations
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@684 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
f69cf6b8f7
commit
4dcdc53409
33
boutons.c
33
boutons.c
@ -415,7 +415,6 @@ void Bouton_Cacher_menu(void)
|
|||||||
byte Bouton_Quitter_Routine_locale(void)
|
byte Bouton_Quitter_Routine_locale(void)
|
||||||
{
|
{
|
||||||
short Bouton_clicke;
|
short Bouton_clicke;
|
||||||
//byte Enregistrer;
|
|
||||||
static char Nom_du_fichier[TAILLE_CHEMIN_FICHIER];
|
static char Nom_du_fichier[TAILLE_CHEMIN_FICHIER];
|
||||||
byte Ancienne_forme_curseur;
|
byte Ancienne_forme_curseur;
|
||||||
|
|
||||||
@ -1254,11 +1253,11 @@ void Bouton_Kill(void)
|
|||||||
|
|
||||||
//------------------------- Dimensions Image/Ecran ---------------------------
|
//------------------------- Dimensions Image/Ecran ---------------------------
|
||||||
|
|
||||||
void Cocher_bouton_mode(short Pos_X, short Pos_Y, byte Etat)
|
void Cocher_bouton_mode(short Pos_X, short Pos_Y, byte state)
|
||||||
{
|
{
|
||||||
byte Couleur;
|
byte Couleur;
|
||||||
|
|
||||||
switch (Etat & 0x7F)
|
switch (state & 0x7F)
|
||||||
{
|
{
|
||||||
case 0 : Couleur=CM_Blanc; break;
|
case 0 : Couleur=CM_Blanc; break;
|
||||||
case 1 : Couleur=CM_Clair; break;
|
case 1 : Couleur=CM_Clair; break;
|
||||||
@ -2291,22 +2290,22 @@ void Print_Nom_fichier_dans_selecteur(void)
|
|||||||
int Type_selectionne; // Utilisé pour mémoriser le type d'entrée choisi
|
int Type_selectionne; // Utilisé pour mémoriser le type d'entrée choisi
|
||||||
// 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 offset,
|
||||||
T_Bouton_scroller * Enreg)
|
T_Bouton_scroller * button)
|
||||||
{
|
{
|
||||||
Enreg->Nb_elements=Liste_Nb_elements;
|
button->Nb_elements=Liste_Nb_elements;
|
||||||
Enreg->Position=Position;
|
button->Position=Position;
|
||||||
Calculer_hauteur_curseur_jauge(Enreg);
|
Calculer_hauteur_curseur_jauge(button);
|
||||||
Fenetre_Dessiner_jauge(Enreg);
|
Fenetre_Dessiner_jauge(button);
|
||||||
// On efface les anciens noms de fichier:
|
// On efface les anciens noms de fichier:
|
||||||
Block(Fenetre_Pos_X+(Menu_Facteur_X<<3),Fenetre_Pos_Y+(Menu_Facteur_Y*(89+FILENAMESPACE)),Menu_Facteur_X*98,Menu_Facteur_Y*82,CM_Noir);
|
Block(Fenetre_Pos_X+(Menu_Facteur_X<<3),Fenetre_Pos_Y+(Menu_Facteur_Y*(89+FILENAMESPACE)),Menu_Facteur_X*98,Menu_Facteur_Y*82,CM_Noir);
|
||||||
// On affiche les nouveaux:
|
// On affiche les nouveaux:
|
||||||
Afficher_la_liste_des_fichiers(Position,Decalage);
|
Afficher_la_liste_des_fichiers(Position,offset);
|
||||||
|
|
||||||
UpdateRect(Fenetre_Pos_X+(Menu_Facteur_X<<3),Fenetre_Pos_Y+(Menu_Facteur_Y*(89+FILENAMESPACE)),Menu_Facteur_X*98,Menu_Facteur_Y*82);
|
UpdateRect(Fenetre_Pos_X+(Menu_Facteur_X<<3),Fenetre_Pos_Y+(Menu_Facteur_Y*(89+FILENAMESPACE)),Menu_Facteur_X*98,Menu_Facteur_Y*82);
|
||||||
|
|
||||||
// On récupère le nom du schmilblick à "accéder"
|
// On récupère le nom du schmilblick à "accéder"
|
||||||
Determiner_element_de_la_liste(Position,Decalage,Principal_Nom_fichier,&Type_selectionne);
|
Determiner_element_de_la_liste(Position,offset,Principal_Nom_fichier,&Type_selectionne);
|
||||||
// On affiche le nouveau nom de fichier
|
// On affiche le nouveau nom de fichier
|
||||||
Print_Nom_fichier_dans_selecteur();
|
Print_Nom_fichier_dans_selecteur();
|
||||||
// On affiche le nom du répertoire courant
|
// On affiche le nom du répertoire courant
|
||||||
@ -2314,12 +2313,12 @@ 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 offset,
|
||||||
T_Bouton_scroller * Enreg)
|
T_Bouton_scroller * button)
|
||||||
{
|
{
|
||||||
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,offset,button);
|
||||||
}
|
}
|
||||||
|
|
||||||
void On_vient_de_scroller_dans_le_fileselect(T_Bouton_scroller * Scroller_de_fichiers)
|
void On_vient_de_scroller_dans_le_fileselect(T_Bouton_scroller * Scroller_de_fichiers)
|
||||||
@ -5603,13 +5602,13 @@ void Afficher_sprite_effet(short Numero_sprite, short Debut_X, short Debut_Y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Afficher_etat_effet(short X, short Y, char * Libelle, byte Etat)
|
void Afficher_etat_effet(short X, short Y, char * Libelle, byte state)
|
||||||
{
|
{
|
||||||
Block(Fenetre_Pos_X+(X*Menu_Facteur_X),Fenetre_Pos_Y+(Y*Menu_Facteur_Y),
|
Block(Fenetre_Pos_X+(X*Menu_Facteur_X),Fenetre_Pos_Y+(Y*Menu_Facteur_Y),
|
||||||
12*Menu_Facteur_X,Menu_Facteur_Y<<3,CM_Clair);
|
12*Menu_Facteur_X,Menu_Facteur_Y<<3,CM_Clair);
|
||||||
|
|
||||||
Print_dans_fenetre(X,Y,Libelle,(Etat)?CM_Blanc:CM_Noir,CM_Clair);
|
Print_dans_fenetre(X,Y,Libelle,(state)?CM_Blanc:CM_Noir,CM_Clair);
|
||||||
if (Etat)
|
if (state)
|
||||||
Print_dans_fenetre(X+56,Y,":ON ",CM_Blanc,CM_Clair);
|
Print_dans_fenetre(X+56,Y,":ON ",CM_Blanc,CM_Clair);
|
||||||
else
|
else
|
||||||
Print_dans_fenetre(X+56,Y,":OFF",CM_Noir,CM_Clair);
|
Print_dans_fenetre(X+56,Y,":OFF",CM_Noir,CM_Clair);
|
||||||
|
|||||||
56
brush.c
56
brush.c
@ -608,7 +608,7 @@ void Effacer_pinceau(short X,short Y)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Capturer_brosse(short Debut_X,short Debut_Y,short Fin_X,short Fin_Y,short Effacement)
|
void Capturer_brosse(short Debut_X,short Debut_Y,short Fin_X,short Fin_Y,short clear)
|
||||||
{
|
{
|
||||||
short Temporaire;
|
short Temporaire;
|
||||||
short Pos_X;
|
short Pos_X;
|
||||||
@ -691,7 +691,7 @@ void Capturer_brosse(short Debut_X,short Debut_Y,short Fin_X,short Fin_Y,short E
|
|||||||
Copier_image_dans_brosse(Debut_X,Debut_Y,Brosse_Largeur,Brosse_Hauteur,Principal_Largeur_image);
|
Copier_image_dans_brosse(Debut_X,Debut_Y,Brosse_Largeur,Brosse_Hauteur,Principal_Largeur_image);
|
||||||
|
|
||||||
// On regarde s'il faut effacer quelque chose:
|
// On regarde s'il faut effacer quelque chose:
|
||||||
if (Effacement)
|
if (clear)
|
||||||
{
|
{
|
||||||
for (Pos_Y=Debut_Y;Pos_Y<Debut_Y+Brosse_Hauteur;Pos_Y++)
|
for (Pos_Y=Debut_Y;Pos_Y<Debut_Y+Brosse_Hauteur;Pos_Y++)
|
||||||
for (Pos_X=Debut_X;Pos_X<Debut_X+Brosse_Largeur;Pos_X++)
|
for (Pos_X=Debut_X;Pos_X<Debut_X+Brosse_Largeur;Pos_X++)
|
||||||
@ -791,7 +791,7 @@ void Remap_brosse(void)
|
|||||||
void Outline_brush(void)
|
void Outline_brush(void)
|
||||||
{
|
{
|
||||||
long /*Pos,*/Pos_X,Pos_Y;
|
long /*Pos,*/Pos_X,Pos_Y;
|
||||||
byte Etat;
|
byte state;
|
||||||
byte * Nouvelle_brosse;
|
byte * Nouvelle_brosse;
|
||||||
byte * Temporaire;
|
byte * Temporaire;
|
||||||
word Largeur;
|
word Largeur;
|
||||||
@ -831,56 +831,56 @@ void Outline_brush(void)
|
|||||||
// 1er balayage (horizontal)
|
// 1er balayage (horizontal)
|
||||||
for (Pos_Y=1; Pos_Y<Brosse_Hauteur-1; Pos_Y++)
|
for (Pos_Y=1; Pos_Y<Brosse_Hauteur-1; Pos_Y++)
|
||||||
{
|
{
|
||||||
Etat=0;
|
state=0;
|
||||||
for (Pos_X=1; Pos_X<Brosse_Largeur-1; Pos_X++)
|
for (Pos_X=1; Pos_X<Brosse_Largeur-1; Pos_X++)
|
||||||
{
|
{
|
||||||
if (Temporaire[((Pos_Y-1)*Largeur)+Pos_X-1]==Back_color)
|
if (Temporaire[((Pos_Y-1)*Largeur)+Pos_X-1]==Back_color)
|
||||||
{
|
{
|
||||||
if (Etat)
|
if (state)
|
||||||
{
|
{
|
||||||
Pixel_dans_brosse(Pos_X,Pos_Y,Fore_color);
|
Pixel_dans_brosse(Pos_X,Pos_Y,Fore_color);
|
||||||
Etat=0;
|
state=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!Etat)
|
if (!state)
|
||||||
{
|
{
|
||||||
Pixel_dans_brosse(Pos_X-1,Pos_Y,Fore_color);
|
Pixel_dans_brosse(Pos_X-1,Pos_Y,Fore_color);
|
||||||
Etat=1;
|
state=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Cas du dernier pixel à droite de la ligne
|
// Cas du dernier pixel à droite de la ligne
|
||||||
if (Etat)
|
if (state)
|
||||||
Pixel_dans_brosse(Pos_X,Pos_Y,Fore_color);
|
Pixel_dans_brosse(Pos_X,Pos_Y,Fore_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2ème balayage (vertical)
|
// 2ème balayage (vertical)
|
||||||
for (Pos_X=1; Pos_X<Brosse_Largeur-1; Pos_X++)
|
for (Pos_X=1; Pos_X<Brosse_Largeur-1; Pos_X++)
|
||||||
{
|
{
|
||||||
Etat=0;
|
state=0;
|
||||||
for (Pos_Y=1; Pos_Y<Brosse_Hauteur-1; Pos_Y++)
|
for (Pos_Y=1; Pos_Y<Brosse_Hauteur-1; Pos_Y++)
|
||||||
{
|
{
|
||||||
if (Temporaire[((Pos_Y-1)*Largeur)+Pos_X-1]==Back_color)
|
if (Temporaire[((Pos_Y-1)*Largeur)+Pos_X-1]==Back_color)
|
||||||
{
|
{
|
||||||
if (Etat)
|
if (state)
|
||||||
{
|
{
|
||||||
Pixel_dans_brosse(Pos_X,Pos_Y,Fore_color);
|
Pixel_dans_brosse(Pos_X,Pos_Y,Fore_color);
|
||||||
Etat=0;
|
state=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!Etat)
|
if (!state)
|
||||||
{
|
{
|
||||||
Pixel_dans_brosse(Pos_X,Pos_Y-1,Fore_color);
|
Pixel_dans_brosse(Pos_X,Pos_Y-1,Fore_color);
|
||||||
Etat=1;
|
state=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Cas du dernier pixel en bas de la colonne
|
// Cas du dernier pixel en bas de la colonne
|
||||||
if (Etat)
|
if (state)
|
||||||
Pixel_dans_brosse(Pos_X,Pos_Y,Fore_color);
|
Pixel_dans_brosse(Pos_X,Pos_Y,Fore_color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -905,7 +905,7 @@ void Outline_brush(void)
|
|||||||
void Nibble_brush(void)
|
void Nibble_brush(void)
|
||||||
{
|
{
|
||||||
long /*Pos,*/Pos_X,Pos_Y;
|
long /*Pos,*/Pos_X,Pos_Y;
|
||||||
byte Etat;
|
byte state;
|
||||||
byte * Nouvelle_brosse;
|
byte * Nouvelle_brosse;
|
||||||
byte * Temporaire;
|
byte * Temporaire;
|
||||||
word Largeur;
|
word Largeur;
|
||||||
@ -942,24 +942,24 @@ void Nibble_brush(void)
|
|||||||
// 1er balayage (horizontal)
|
// 1er balayage (horizontal)
|
||||||
for (Pos_Y=0; Pos_Y<Brosse_Hauteur; Pos_Y++)
|
for (Pos_Y=0; Pos_Y<Brosse_Hauteur; Pos_Y++)
|
||||||
{
|
{
|
||||||
Etat=(Temporaire[(Pos_Y+1)*Largeur]!=Back_color);
|
state=(Temporaire[(Pos_Y+1)*Largeur]!=Back_color);
|
||||||
for (Pos_X=0; Pos_X<Brosse_Largeur; Pos_X++)
|
for (Pos_X=0; Pos_X<Brosse_Largeur; Pos_X++)
|
||||||
{
|
{
|
||||||
if (Temporaire[((Pos_Y+1)*Largeur)+Pos_X+1]==Back_color)
|
if (Temporaire[((Pos_Y+1)*Largeur)+Pos_X+1]==Back_color)
|
||||||
{
|
{
|
||||||
if (Etat)
|
if (state)
|
||||||
{
|
{
|
||||||
if (Pos_X>0)
|
if (Pos_X>0)
|
||||||
Pixel_dans_brosse(Pos_X-1,Pos_Y,Back_color);
|
Pixel_dans_brosse(Pos_X-1,Pos_Y,Back_color);
|
||||||
Etat=0;
|
state=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!Etat)
|
if (!state)
|
||||||
{
|
{
|
||||||
Pixel_dans_brosse(Pos_X,Pos_Y,Back_color);
|
Pixel_dans_brosse(Pos_X,Pos_Y,Back_color);
|
||||||
Etat=1;
|
state=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -971,24 +971,24 @@ void Nibble_brush(void)
|
|||||||
// 2ème balayage (vertical)
|
// 2ème balayage (vertical)
|
||||||
for (Pos_X=0; Pos_X<Brosse_Largeur; Pos_X++)
|
for (Pos_X=0; Pos_X<Brosse_Largeur; Pos_X++)
|
||||||
{
|
{
|
||||||
Etat=(Temporaire[Largeur+Pos_X+1]!=Back_color);;
|
state=(Temporaire[Largeur+Pos_X+1]!=Back_color);;
|
||||||
for (Pos_Y=0; Pos_Y<Brosse_Hauteur; Pos_Y++)
|
for (Pos_Y=0; Pos_Y<Brosse_Hauteur; Pos_Y++)
|
||||||
{
|
{
|
||||||
if (Temporaire[((Pos_Y+1)*Largeur)+Pos_X+1]==Back_color)
|
if (Temporaire[((Pos_Y+1)*Largeur)+Pos_X+1]==Back_color)
|
||||||
{
|
{
|
||||||
if (Etat)
|
if (state)
|
||||||
{
|
{
|
||||||
if (Pos_Y>0)
|
if (Pos_Y>0)
|
||||||
Pixel_dans_brosse(Pos_X,Pos_Y-1,Back_color);
|
Pixel_dans_brosse(Pos_X,Pos_Y-1,Back_color);
|
||||||
Etat=0;
|
state=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!Etat)
|
if (!state)
|
||||||
{
|
{
|
||||||
Pixel_dans_brosse(Pos_X,Pos_Y,Back_color);
|
Pixel_dans_brosse(Pos_X,Pos_Y,Back_color);
|
||||||
Etat=1;
|
state=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1016,7 +1016,7 @@ void Nibble_brush(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Capturer_brosse_au_lasso(int Vertices, short * Points,short Effacement)
|
void Capturer_brosse_au_lasso(int Vertices, short * Points,short clear)
|
||||||
{
|
{
|
||||||
short Debut_X=Limite_Droite+1;
|
short Debut_X=Limite_Droite+1;
|
||||||
short Debut_Y=Limite_Bas+1;
|
short Debut_Y=Limite_Bas+1;
|
||||||
@ -1132,7 +1132,7 @@ void Capturer_brosse_au_lasso(int Vertices, short * Points,short Effacement)
|
|||||||
{
|
{
|
||||||
Pixel_dans_brosse(Pos_X-Debut_X,Pos_Y-Debut_Y,Lit_pixel_dans_ecran_courant(Pos_X,Pos_Y));
|
Pixel_dans_brosse(Pos_X-Debut_X,Pos_Y-Debut_Y,Lit_pixel_dans_ecran_courant(Pos_X,Pos_Y));
|
||||||
// On regarde s'il faut effacer quelque chose:
|
// On regarde s'il faut effacer quelque chose:
|
||||||
if (Effacement)
|
if (clear)
|
||||||
Pixel_dans_ecran_courant(Pos_X,Pos_Y,Back_color);
|
Pixel_dans_ecran_courant(Pos_X,Pos_Y,Back_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
6
brush.h
6
brush.h
@ -30,7 +30,7 @@
|
|||||||
@param Fin_Y bottom edge coordinate in the picture
|
@param Fin_Y bottom edge coordinate in the picture
|
||||||
@param effacement If 1, the area is also cleared from the picture.
|
@param effacement If 1, the area is also cleared from the picture.
|
||||||
*/
|
*/
|
||||||
void Capturer_brosse(short Debut_X,short Debut_Y,short Fin_X,short Fin_Y,short Effacement);
|
void Capturer_brosse(short Debut_X,short Debut_Y,short Fin_X,short Fin_Y,short clear);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Rotates the brush to the right.
|
Rotates the brush to the right.
|
||||||
@ -86,8 +86,8 @@ void Nibble_brush(void);
|
|||||||
Get brush from picture according to a freehand form.
|
Get brush from picture according to a freehand form.
|
||||||
@param Vertices number of points in the freehand form
|
@param Vertices number of points in the freehand form
|
||||||
@param Points array of points coordinates
|
@param Points array of points coordinates
|
||||||
@param Effacement If set to 1, the captured area is also cleared from the picture.
|
@param clear If set to 1, the captured area is also cleared from the picture.
|
||||||
*/
|
*/
|
||||||
void Capturer_brosse_au_lasso(int Vertices, short * Points,short Effacement);
|
void Capturer_brosse_au_lasso(int Vertices, short * Points,short clear);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
38
divers.c
38
divers.c
@ -221,13 +221,13 @@ byte Pixel_dans_cercle(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Copier_une_partie_d_image_dans_une_autre(byte * Source,word S_Pos_X,word S_Pos_Y,word Largeur,word Hauteur,word Largeur_source,byte * Destination,word D_Pos_X,word D_Pos_Y,word Largeur_destination)
|
void Copier_une_partie_d_image_dans_une_autre(byte * Source,word S_Pos_X,word S_Pos_Y,word Largeur,word Hauteur,word Largeur_source,byte * dest,word D_Pos_X,word D_Pos_Y,word Largeur_destination)
|
||||||
{
|
{
|
||||||
// ESI = adresse de la source en (S_Pox_X,S_Pos_Y)
|
// ESI = adresse de la source en (S_Pox_X,S_Pos_Y)
|
||||||
byte* esi = Source + S_Pos_Y * Largeur_source + S_Pos_X;
|
byte* esi = Source + S_Pos_Y * Largeur_source + S_Pos_X;
|
||||||
|
|
||||||
// EDI = adresse de la destination (D_Pos_X,D_Pos_Y)
|
// EDI = adresse de la destination (D_Pos_X,D_Pos_Y)
|
||||||
byte* edi = Destination + D_Pos_Y * Largeur_destination + D_Pos_X;
|
byte* edi = dest + D_Pos_Y * Largeur_destination + D_Pos_X;
|
||||||
|
|
||||||
int Ligne;
|
int Ligne;
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ byte Lit_pixel_dans_ecran_brouillon(word X,word Y)
|
|||||||
return *(Brouillon_Ecran+Y*Brouillon_Largeur_image+X);
|
return *(Brouillon_Ecran+Y*Brouillon_Largeur_image+X);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rotate_90_deg_LOWLEVEL(byte * Source,byte * Destination)
|
void Rotate_90_deg_LOWLEVEL(byte * Source,byte * dest)
|
||||||
{
|
{
|
||||||
byte* esi;
|
byte* esi;
|
||||||
byte* edi;
|
byte* edi;
|
||||||
@ -257,7 +257,7 @@ void Rotate_90_deg_LOWLEVEL(byte * Source,byte * Destination)
|
|||||||
|
|
||||||
//ESI = Point haut droit de la source
|
//ESI = Point haut droit de la source
|
||||||
byte* Debut_de_colonne = Source + Brosse_Largeur - 1;
|
byte* Debut_de_colonne = Source + Brosse_Largeur - 1;
|
||||||
edi = Destination;
|
edi = dest;
|
||||||
|
|
||||||
// Largeur de la source = Hauteur de la destination
|
// Largeur de la source = Hauteur de la destination
|
||||||
dx = bx = Brosse_Largeur;
|
dx = bx = Brosse_Largeur;
|
||||||
@ -554,39 +554,39 @@ void Rotate_180_deg_LOWLEVEL(void)
|
|||||||
void Tempo_jauge(byte Vitesse)
|
void Tempo_jauge(byte Vitesse)
|
||||||
//Boucle d'attente pour faire bouger les scrollbars à une vitesse correcte
|
//Boucle d'attente pour faire bouger les scrollbars à une vitesse correcte
|
||||||
{
|
{
|
||||||
Uint32 Fin;
|
Uint32 end;
|
||||||
byte MouseK_Original = Mouse_K;
|
byte MouseK_Original = Mouse_K;
|
||||||
Fin = SDL_GetTicks() + Vitesse*10;
|
end = SDL_GetTicks() + Vitesse*10;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (!Get_input()) Wait_VBL();
|
if (!Get_input()) Wait_VBL();
|
||||||
} while (Mouse_K == MouseK_Original && SDL_GetTicks()<Fin);
|
} while (Mouse_K == MouseK_Original && SDL_GetTicks()<end);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Scroll_picture(short Decalage_X,short Decalage_Y)
|
void Scroll_picture(short x_offset,short y_offset)
|
||||||
{
|
{
|
||||||
byte* esi = Ecran_backup; //Source de la copie
|
byte* esi = Ecran_backup; //Source de la copie
|
||||||
byte* edi = Principal_Ecran + Decalage_Y * Principal_Largeur_image + Decalage_X;
|
byte* edi = Principal_Ecran + y_offset * Principal_Largeur_image + x_offset;
|
||||||
const word ax = Principal_Largeur_image - Decalage_X; // Nombre de pixels à copier à droite
|
const word ax = Principal_Largeur_image - x_offset; // Nombre de pixels à copier à droite
|
||||||
word dx;
|
word dx;
|
||||||
for(dx = Principal_Hauteur_image - Decalage_Y;dx>0;dx--)
|
for(dx = Principal_Hauteur_image - y_offset;dx>0;dx--)
|
||||||
{
|
{
|
||||||
// Pour chaque ligne
|
// Pour chaque ligne
|
||||||
memcpy(edi,esi,ax);
|
memcpy(edi,esi,ax);
|
||||||
memcpy(edi - Decalage_X,esi+ax,Decalage_X);
|
memcpy(edi - x_offset,esi+ax,x_offset);
|
||||||
|
|
||||||
// On passe à la ligne suivante
|
// On passe à la ligne suivante
|
||||||
edi += Principal_Largeur_image;
|
edi += Principal_Largeur_image;
|
||||||
esi += Principal_Largeur_image;
|
esi += Principal_Largeur_image;
|
||||||
}
|
}
|
||||||
|
|
||||||
// On vient de faire le traitement pour otutes les lignes au-dessous de Decalage_Y
|
// On vient de faire le traitement pour otutes les lignes au-dessous de y_offset
|
||||||
// Maintenant on traite celles au dessus
|
// Maintenant on traite celles au dessus
|
||||||
edi = Decalage_X + Principal_Ecran;
|
edi = x_offset + Principal_Ecran;
|
||||||
for(dx = Decalage_Y;dx>0;dx--)
|
for(dx = y_offset;dx>0;dx--)
|
||||||
{
|
{
|
||||||
memcpy(edi,esi,ax);
|
memcpy(edi,esi,ax);
|
||||||
memcpy(edi - Decalage_X,esi+ax,Decalage_X);
|
memcpy(edi - x_offset,esi+ax,x_offset);
|
||||||
|
|
||||||
edi += Principal_Largeur_image;
|
edi += Principal_Largeur_image;
|
||||||
esi += Principal_Largeur_image;
|
esi += Principal_Largeur_image;
|
||||||
@ -596,7 +596,7 @@ void Scroll_picture(short Decalage_X,short Decalage_Y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Zoomer_une_ligne(byte* Ligne_originale, byte* Ligne_zoomee,
|
void Zoomer_une_ligne(byte* Ligne_originale, byte* Ligne_zoomee,
|
||||||
word Facteur, word Largeur
|
word factor, word Largeur
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
byte color;
|
byte color;
|
||||||
@ -606,8 +606,8 @@ void Zoomer_une_ligne(byte* Ligne_originale, byte* Ligne_zoomee,
|
|||||||
for(X=0;X<Largeur;X++){
|
for(X=0;X<Largeur;X++){
|
||||||
color = *Ligne_originale;
|
color = *Ligne_originale;
|
||||||
|
|
||||||
memset(Ligne_zoomee,color,Facteur);
|
memset(Ligne_zoomee,color,factor);
|
||||||
Ligne_zoomee+=Facteur;
|
Ligne_zoomee+=factor;
|
||||||
|
|
||||||
Ligne_originale++;
|
Ligne_originale++;
|
||||||
}
|
}
|
||||||
|
|||||||
8
divers.h
8
divers.h
@ -23,7 +23,7 @@ void Copier_ecran_sur_brouillon(void);
|
|||||||
void Copier_image_dans_brosse(short Debut_X,short Debut_Y,short Brosse_Largeur,short Brosse_Hauteur,word Largeur_image);
|
void Copier_image_dans_brosse(short Debut_X,short Debut_Y,short Brosse_Largeur,short Brosse_Hauteur,word Largeur_image);
|
||||||
void Permuter_dans_l_image_les_couleurs(byte Couleur_1,byte Couleur_2);
|
void Permuter_dans_l_image_les_couleurs(byte Couleur_1,byte Couleur_2);
|
||||||
void Remap_general_LOWLEVEL(byte * Table_conv,byte * Buffer,short Largeur,short Hauteur,short Largeur_buffer);
|
void Remap_general_LOWLEVEL(byte * Table_conv,byte * Buffer,short Largeur,short Hauteur,short Largeur_buffer);
|
||||||
void Scroll_picture(short Decalage_X,short Decalage_Y);
|
void Scroll_picture(short x_offset,short y_offset);
|
||||||
void Set_mouse_video_mode_number(void);
|
void Set_mouse_video_mode_number(void);
|
||||||
void Set_mouse_position(void);
|
void Set_mouse_position(void);
|
||||||
void Attendre_fin_de_click(void);
|
void Attendre_fin_de_click(void);
|
||||||
@ -84,10 +84,10 @@ byte Effet_Trame(word X,word Y);
|
|||||||
|
|
||||||
void Flip_Y_LOWLEVEL(void);
|
void Flip_Y_LOWLEVEL(void);
|
||||||
void Flip_X_LOWLEVEL(void);
|
void Flip_X_LOWLEVEL(void);
|
||||||
void Rotate_90_deg_LOWLEVEL(byte * Source,byte * Destination);
|
void Rotate_90_deg_LOWLEVEL(byte * Source,byte * dest);
|
||||||
void Rotate_180_deg_LOWLEVEL(void);
|
void Rotate_180_deg_LOWLEVEL(void);
|
||||||
void Zoomer_une_ligne(byte * Ligne_originale,byte * Ligne_zoomee,word Facteur,word Largeur);
|
void Zoomer_une_ligne(byte * Ligne_originale,byte * Ligne_zoomee,word factor,word Largeur);
|
||||||
void Copier_une_partie_d_image_dans_une_autre(byte * Source,word S_Pos_X,word S_Pos_Y,word Largeur,word Hauteur,word Largeur_source,byte * Destination,word D_Pos_X,word D_Pos_Y,word Largeur_destination);
|
void Copier_une_partie_d_image_dans_une_autre(byte * Source,word S_Pos_X,word S_Pos_Y,word Largeur,word Hauteur,word Largeur_source,byte * dest,word D_Pos_X,word D_Pos_Y,word Largeur_destination);
|
||||||
|
|
||||||
// -- Gestion du chrono --
|
// -- Gestion du chrono --
|
||||||
byte Etat_chrono; // Etat du chrono: 0=Attente d'un Xème de seconde
|
byte Etat_chrono; // Etat du chrono: 0=Attente d'un Xème de seconde
|
||||||
|
|||||||
32
files.c
32
files.c
@ -32,14 +32,14 @@
|
|||||||
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__)
|
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__)
|
||||||
#include <proto/dos.h>
|
#include <proto/dos.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#define isHidden(Enreg) (0)
|
#define isHidden(x) (0)
|
||||||
#elif defined(__WIN32__)
|
#elif defined(__WIN32__)
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#define isHidden(Enreg) (GetFileAttributesA((Enreg)->d_name)&FILE_ATTRIBUTE_HIDDEN)
|
#define isHidden(x) (GetFileAttributesA((x)->d_name)&FILE_ATTRIBUTE_HIDDEN)
|
||||||
#else
|
#else
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#define isHidden(Enreg) ((Enreg)->d_name[0]=='.')
|
#define isHidden(x) ((x)->d_name[0]=='.')
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "const.h"
|
#include "const.h"
|
||||||
@ -209,7 +209,7 @@ void Lire_liste_des_fichiers(byte Format_demande)
|
|||||||
// correspond au format demandé.
|
// correspond au format demandé.
|
||||||
{
|
{
|
||||||
DIR* Repertoire_Courant; //Répertoire courant
|
DIR* Repertoire_Courant; //Répertoire courant
|
||||||
struct dirent* Enreg; // Structure de lecture des éléments
|
struct dirent* entry; // Structure de lecture des éléments
|
||||||
char * Filtre = "*"; // Extension demandée
|
char * Filtre = "*"; // Extension demandée
|
||||||
struct stat Infos_enreg;
|
struct stat Infos_enreg;
|
||||||
char * Chemin_courant;
|
char * Chemin_courant;
|
||||||
@ -227,34 +227,34 @@ void Lire_liste_des_fichiers(byte Format_demande)
|
|||||||
// On lit tous les répertoires:
|
// On lit tous les répertoires:
|
||||||
Chemin_courant=getcwd(NULL,0);
|
Chemin_courant=getcwd(NULL,0);
|
||||||
Repertoire_Courant=opendir(Chemin_courant);
|
Repertoire_Courant=opendir(Chemin_courant);
|
||||||
while ((Enreg=readdir(Repertoire_Courant)))
|
while ((entry=readdir(Repertoire_Courant)))
|
||||||
{
|
{
|
||||||
// On ignore le répertoire courant
|
// On ignore le répertoire courant
|
||||||
if ( !strcmp(Enreg->d_name, "."))
|
if ( !strcmp(entry->d_name, "."))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
stat(Enreg->d_name,&Infos_enreg);
|
stat(entry->d_name,&Infos_enreg);
|
||||||
// et que l'élément trouvé est un répertoire
|
// et que l'élément trouvé est un répertoire
|
||||||
if( S_ISDIR(Infos_enreg.st_mode) &&
|
if( S_ISDIR(Infos_enreg.st_mode) &&
|
||||||
// et que c'est ".."
|
// et que c'est ".."
|
||||||
(!strcmp(Enreg->d_name, PARENT_DIR) ||
|
(!strcmp(entry->d_name, PARENT_DIR) ||
|
||||||
// ou qu'il n'est pas caché
|
// ou qu'il n'est pas caché
|
||||||
Config.Lire_les_repertoires_caches ||
|
Config.Lire_les_repertoires_caches ||
|
||||||
!isHidden(Enreg)))
|
!isHidden(entry)))
|
||||||
{
|
{
|
||||||
// On rajoute le répertoire à la liste
|
// On rajoute le répertoire à la liste
|
||||||
Ajouter_element_a_la_liste(Enreg->d_name, 1);
|
Ajouter_element_a_la_liste(entry->d_name, 1);
|
||||||
Liste_Nb_repertoires++;
|
Liste_Nb_repertoires++;
|
||||||
}
|
}
|
||||||
else if (S_ISREG(Infos_enreg.st_mode) && //Il s'agit d'un fichier
|
else if (S_ISREG(Infos_enreg.st_mode) && //Il s'agit d'un fichier
|
||||||
(Config.Lire_les_fichiers_caches || //Il n'est pas caché
|
(Config.Lire_les_fichiers_caches || //Il n'est pas caché
|
||||||
!isHidden(Enreg)))
|
!isHidden(entry)))
|
||||||
{
|
{
|
||||||
if (VerifieExtension(Enreg->d_name, Filtre))
|
if (VerifieExtension(entry->d_name, Filtre))
|
||||||
{
|
{
|
||||||
// On rajoute le fichier à la liste
|
// On rajoute le fichier à la liste
|
||||||
Ajouter_element_a_la_liste(Enreg->d_name, 0);
|
Ajouter_element_a_la_liste(entry->d_name, 0);
|
||||||
Liste_Nb_fichiers++;
|
Liste_Nb_fichiers++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -746,7 +746,7 @@ void for_each_file(const char * Nom_repertoire, void Callback(const char *))
|
|||||||
{
|
{
|
||||||
// Pour scan de répertoire
|
// Pour scan de répertoire
|
||||||
DIR* Repertoire_Courant; //Répertoire courant
|
DIR* Repertoire_Courant; //Répertoire courant
|
||||||
struct dirent* Enreg; // Structure de lecture des éléments
|
struct dirent* entry; // Structure de lecture des éléments
|
||||||
char Nom_fichier_complet[TAILLE_CHEMIN_FICHIER];
|
char Nom_fichier_complet[TAILLE_CHEMIN_FICHIER];
|
||||||
int Position_nom_fichier;
|
int Position_nom_fichier;
|
||||||
strcpy(Nom_fichier_complet, Nom_repertoire);
|
strcpy(Nom_fichier_complet, Nom_repertoire);
|
||||||
@ -754,10 +754,10 @@ void for_each_file(const char * Nom_repertoire, void Callback(const char *))
|
|||||||
if(Repertoire_Courant == NULL) return; // Répertoire invalide ...
|
if(Repertoire_Courant == NULL) return; // Répertoire invalide ...
|
||||||
strcat(Nom_fichier_complet, SEPARATEUR_CHEMIN);
|
strcat(Nom_fichier_complet, SEPARATEUR_CHEMIN);
|
||||||
Position_nom_fichier = strlen(Nom_fichier_complet);
|
Position_nom_fichier = strlen(Nom_fichier_complet);
|
||||||
while ((Enreg=readdir(Repertoire_Courant)))
|
while ((entry=readdir(Repertoire_Courant)))
|
||||||
{
|
{
|
||||||
struct stat Infos_enreg;
|
struct stat Infos_enreg;
|
||||||
strcpy(&Nom_fichier_complet[Position_nom_fichier], Enreg->d_name);
|
strcpy(&Nom_fichier_complet[Position_nom_fichier], entry->d_name);
|
||||||
stat(Nom_fichier_complet,&Infos_enreg);
|
stat(Nom_fichier_complet,&Infos_enreg);
|
||||||
if (S_ISREG(Infos_enreg.st_mode))
|
if (S_ISREG(Infos_enreg.st_mode))
|
||||||
{
|
{
|
||||||
|
|||||||
54
graph.c
54
graph.c
@ -185,7 +185,7 @@ int Initialiser_mode_video(int Largeur, int Hauteur, int Fullscreen)
|
|||||||
int Sensibilite_X;
|
int Sensibilite_X;
|
||||||
int Sensibilite_Y;
|
int Sensibilite_Y;
|
||||||
int Indice;
|
int Indice;
|
||||||
int Facteur;
|
int factor;
|
||||||
|
|
||||||
// Pour la première entrée dans cette fonction
|
// Pour la première entrée dans cette fonction
|
||||||
if (Pixel_width<1)
|
if (Pixel_width<1)
|
||||||
@ -322,20 +322,20 @@ int Initialiser_mode_video(int Largeur, int Hauteur, int Fullscreen)
|
|||||||
|
|
||||||
// Taille des menus
|
// Taille des menus
|
||||||
if (Largeur_ecran/320 > Hauteur_ecran/200)
|
if (Largeur_ecran/320 > Hauteur_ecran/200)
|
||||||
Facteur=Hauteur_ecran/200;
|
factor=Hauteur_ecran/200;
|
||||||
else
|
else
|
||||||
Facteur=Largeur_ecran/320;
|
factor=Largeur_ecran/320;
|
||||||
|
|
||||||
switch (Config.Ratio)
|
switch (Config.Ratio)
|
||||||
{
|
{
|
||||||
case 1: // adapter tout
|
case 1: // adapter tout
|
||||||
Menu_Facteur_X=Facteur;
|
Menu_Facteur_X=factor;
|
||||||
Menu_Facteur_Y=Facteur;
|
Menu_Facteur_Y=factor;
|
||||||
break;
|
break;
|
||||||
case 2: // adapter légèrement
|
case 2: // adapter légèrement
|
||||||
Menu_Facteur_X=Facteur-1;
|
Menu_Facteur_X=factor-1;
|
||||||
if (Menu_Facteur_X<1) Menu_Facteur_X=1;
|
if (Menu_Facteur_X<1) Menu_Facteur_X=1;
|
||||||
Menu_Facteur_Y=Facteur-1;
|
Menu_Facteur_Y=factor-1;
|
||||||
if (Menu_Facteur_Y<1) Menu_Facteur_Y=1;
|
if (Menu_Facteur_Y<1) Menu_Facteur_Y=1;
|
||||||
break;
|
break;
|
||||||
default: // ne pas adapter
|
default: // ne pas adapter
|
||||||
@ -723,7 +723,7 @@ void Fill(short * Limite_atteinte_Haut , short * Limite_atteinte_Bas,
|
|||||||
*Limite_atteinte_Haut=Limite_courante_Haut;
|
*Limite_atteinte_Haut=Limite_courante_Haut;
|
||||||
*Limite_atteinte_Bas =Limite_courante_Bas;
|
*Limite_atteinte_Bas =Limite_courante_Bas;
|
||||||
(*Limite_atteinte_Droite)--;
|
(*Limite_atteinte_Droite)--;
|
||||||
} // Fin de la routine de remplissage "Fill"
|
} // end de la routine de remplissage "Fill"
|
||||||
|
|
||||||
|
|
||||||
void Remplir(byte Couleur_de_remplissage)
|
void Remplir(byte Couleur_de_remplissage)
|
||||||
@ -1467,7 +1467,7 @@ void Tracer_courbe_General(short X1, short Y1,
|
|||||||
short X4, short Y4,
|
short X4, short Y4,
|
||||||
byte Couleur)
|
byte Couleur)
|
||||||
{
|
{
|
||||||
float Delta,t,t2,t3;
|
float delta,t,t2,t3;
|
||||||
short X,Y,Old_X,Old_Y;
|
short X,Y,Old_X,Old_Y;
|
||||||
word i;
|
word i;
|
||||||
int CX[4];
|
int CX[4];
|
||||||
@ -1487,11 +1487,11 @@ void Tracer_courbe_General(short X1, short Y1,
|
|||||||
Old_X=X1;
|
Old_X=X1;
|
||||||
Old_Y=Y1;
|
Old_Y=Y1;
|
||||||
Pixel_figure(Old_X,Old_Y,Couleur);
|
Pixel_figure(Old_X,Old_Y,Couleur);
|
||||||
Delta=0.05; // 1.0/20
|
delta=0.05; // 1.0/20
|
||||||
t=0;
|
t=0;
|
||||||
for (i=1; i<=20; i++)
|
for (i=1; i<=20; i++)
|
||||||
{
|
{
|
||||||
t=t+Delta; t2=t*t; t3=t2*t;
|
t=t+delta; t2=t*t; t3=t2*t;
|
||||||
X=Round(t3*CX[0] + t2*CX[1] + t*CX[2] + CX[3]);
|
X=Round(t3*CX[0] + t2*CX[1] + t*CX[2] + CX[3]);
|
||||||
Y=Round(t3*CY[0] + t2*CY[1] + t*CY[2] + CY[3]);
|
Y=Round(t3*CY[0] + t2*CY[1] + t*CY[2] + CY[3]);
|
||||||
Tracer_ligne_General(Old_X,Old_Y,X,Y,Couleur);
|
Tracer_ligne_General(Old_X,Old_Y,X,Y,Couleur);
|
||||||
@ -2279,7 +2279,7 @@ void Liste2tables(word * Liste,short Pas,byte Mode,byte * Table_inc,byte * Table
|
|||||||
{
|
{
|
||||||
int Indice;
|
int Indice;
|
||||||
int Premier;
|
int Premier;
|
||||||
int Dernier;
|
int last;
|
||||||
int Couleur;
|
int Couleur;
|
||||||
int Temp;
|
int Temp;
|
||||||
|
|
||||||
@ -2302,7 +2302,7 @@ void Liste2tables(word * Liste,short Pas,byte Mode,byte * Table_inc,byte * Table
|
|||||||
Premier=Indice;
|
Premier=Indice;
|
||||||
|
|
||||||
// On recherche la position de la dernière case de la séquence
|
// On recherche la position de la dernière case de la séquence
|
||||||
for (Dernier=Premier;Liste[Dernier+1]<256;Dernier++);
|
for (last=Premier;Liste[last+1]<256;last++);
|
||||||
|
|
||||||
// Pour toutes les cases non vides (et non inhibées) qui suivent
|
// Pour toutes les cases non vides (et non inhibées) qui suivent
|
||||||
switch (Mode)
|
switch (Mode)
|
||||||
@ -2311,12 +2311,12 @@ void Liste2tables(word * Liste,short Pas,byte Mode,byte * Table_inc,byte * Table
|
|||||||
for (;(Indice<512) && (Liste[Indice]<256);Indice++)
|
for (;(Indice<512) && (Liste[Indice]<256);Indice++)
|
||||||
{ // On met à jour les tables de conversion
|
{ // On met à jour les tables de conversion
|
||||||
Couleur=Liste[Indice];
|
Couleur=Liste[Indice];
|
||||||
Table_inc[Couleur]=Liste[(Indice+Pas<=Dernier)?Indice+Pas:Dernier];
|
Table_inc[Couleur]=Liste[(Indice+Pas<=last)?Indice+Pas:last];
|
||||||
Table_dec[Couleur]=Liste[(Indice-Pas>=Premier)?Indice-Pas:Premier];
|
Table_dec[Couleur]=Liste[(Indice-Pas>=Premier)?Indice-Pas:Premier];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MODE_SHADE_BOUCLE :
|
case MODE_SHADE_BOUCLE :
|
||||||
Temp=1+Dernier-Premier;
|
Temp=1+last-Premier;
|
||||||
for (;(Indice<512) && (Liste[Indice]<256);Indice++)
|
for (;(Indice<512) && (Liste[Indice]<256);Indice++)
|
||||||
{ // On met à jour les tables de conversion
|
{ // On met à jour les tables de conversion
|
||||||
Couleur=Liste[Indice];
|
Couleur=Liste[Indice];
|
||||||
@ -2328,7 +2328,7 @@ void Liste2tables(word * Liste,short Pas,byte Mode,byte * Table_inc,byte * Table
|
|||||||
for (;(Indice<512) && (Liste[Indice]<256);Indice++)
|
for (;(Indice<512) && (Liste[Indice]<256);Indice++)
|
||||||
{ // On met à jour les tables de conversion
|
{ // On met à jour les tables de conversion
|
||||||
Couleur=Liste[Indice];
|
Couleur=Liste[Indice];
|
||||||
if (Indice+Pas<=Dernier)
|
if (Indice+Pas<=last)
|
||||||
Table_inc[Couleur]=Liste[Indice+Pas];
|
Table_inc[Couleur]=Liste[Indice+Pas];
|
||||||
if (Indice-Pas>=Premier)
|
if (Indice-Pas>=Premier)
|
||||||
Table_dec[Couleur]=Liste[Indice-Pas];
|
Table_dec[Couleur]=Liste[Indice-Pas];
|
||||||
@ -2383,41 +2383,41 @@ byte Effet_Quick_shade(word X,word Y,byte Couleur)
|
|||||||
{
|
{
|
||||||
int color=Couleur=Lit_pixel_dans_ecran_feedback(X,Y);
|
int color=Couleur=Lit_pixel_dans_ecran_feedback(X,Y);
|
||||||
int Sens=(Fore_color<=Back_color);
|
int Sens=(Fore_color<=Back_color);
|
||||||
byte Debut,Fin;
|
byte start,end;
|
||||||
int Largeur;
|
int Largeur;
|
||||||
|
|
||||||
if (Sens)
|
if (Sens)
|
||||||
{
|
{
|
||||||
Debut=Fore_color;
|
start=Fore_color;
|
||||||
Fin =Back_color;
|
end =Back_color;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debut=Back_color;
|
start=Back_color;
|
||||||
Fin =Fore_color;
|
end =Fore_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((color>=Debut) && (color<=Fin) && (Debut!=Fin))
|
if ((color>=start) && (color<=end) && (start!=end))
|
||||||
{
|
{
|
||||||
Largeur=1+Fin-Debut;
|
Largeur=1+end-start;
|
||||||
|
|
||||||
if ( ((Shade_Table==Shade_Table_gauche) && Sens) || ((Shade_Table==Shade_Table_droite) && (!Sens)) )
|
if ( ((Shade_Table==Shade_Table_gauche) && Sens) || ((Shade_Table==Shade_Table_droite) && (!Sens)) )
|
||||||
color-=Quick_shade_Step%Largeur;
|
color-=Quick_shade_Step%Largeur;
|
||||||
else
|
else
|
||||||
color+=Quick_shade_Step%Largeur;
|
color+=Quick_shade_Step%Largeur;
|
||||||
|
|
||||||
if (color<Debut)
|
if (color<start)
|
||||||
switch (Quick_shade_Loop)
|
switch (Quick_shade_Loop)
|
||||||
{
|
{
|
||||||
case MODE_SHADE_NORMAL : return Debut;
|
case MODE_SHADE_NORMAL : return start;
|
||||||
case MODE_SHADE_BOUCLE : return (Largeur+color);
|
case MODE_SHADE_BOUCLE : return (Largeur+color);
|
||||||
default : return Couleur;
|
default : return Couleur;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (color>Fin)
|
if (color>end)
|
||||||
switch (Quick_shade_Loop)
|
switch (Quick_shade_Loop)
|
||||||
{
|
{
|
||||||
case MODE_SHADE_NORMAL : return Fin;
|
case MODE_SHADE_NORMAL : return end;
|
||||||
case MODE_SHADE_BOUCLE : return (color-Largeur);
|
case MODE_SHADE_BOUCLE : return (color-Largeur);
|
||||||
default : return Couleur;
|
default : return Couleur;
|
||||||
}
|
}
|
||||||
|
|||||||
6
init.c
6
init.c
@ -746,15 +746,15 @@ void Rien_du_tout(void)
|
|||||||
// Initialiseur d'un bouton:
|
// Initialiseur d'un bouton:
|
||||||
|
|
||||||
void Initialiser_bouton(byte Numero,
|
void Initialiser_bouton(byte Numero,
|
||||||
word Decalage_X , word Decalage_Y,
|
word x_offset , word y_offset,
|
||||||
word Largeur , word Hauteur,
|
word Largeur , word Hauteur,
|
||||||
byte Forme,
|
byte Forme,
|
||||||
fonction_action Gauche , fonction_action Droite,
|
fonction_action Gauche , fonction_action Droite,
|
||||||
fonction_action Desenclencher,
|
fonction_action Desenclencher,
|
||||||
byte Famille)
|
byte Famille)
|
||||||
{
|
{
|
||||||
Bouton[Numero].Decalage_X =Decalage_X;
|
Bouton[Numero].Decalage_X =x_offset;
|
||||||
Bouton[Numero].Decalage_Y =Decalage_Y;
|
Bouton[Numero].Decalage_Y =y_offset;
|
||||||
Bouton[Numero].Largeur =Largeur-1;
|
Bouton[Numero].Largeur =Largeur-1;
|
||||||
Bouton[Numero].Hauteur =Hauteur-1;
|
Bouton[Numero].Hauteur =Hauteur-1;
|
||||||
Bouton[Numero].Enfonce =0;
|
Bouton[Numero].Enfonce =0;
|
||||||
|
|||||||
22
io.c
22
io.c
@ -182,26 +182,26 @@ char * Position_dernier_slash(const char * Chaine)
|
|||||||
return (char *)Position;
|
return (char *)Position;
|
||||||
}
|
}
|
||||||
// Récupère la partie "nom de fichier seul" d'un chemin
|
// Récupère la partie "nom de fichier seul" d'un chemin
|
||||||
void Extraire_nom_fichier(char *Destination, const char *Source)
|
void Extraire_nom_fichier(char *dest, const char *Source)
|
||||||
{
|
{
|
||||||
const char * Position = Position_dernier_slash(Source);
|
const char * Position = Position_dernier_slash(Source);
|
||||||
|
|
||||||
if (Position)
|
if (Position)
|
||||||
strcpy(Destination,Position+1);
|
strcpy(dest,Position+1);
|
||||||
else
|
else
|
||||||
strcpy(Destination,Source);
|
strcpy(dest,Source);
|
||||||
}
|
}
|
||||||
// Récupère la partie "répertoire+/" d'un chemin.
|
// Récupère la partie "répertoire+/" d'un chemin.
|
||||||
void Extraire_chemin(char *Destination, const char *Source)
|
void Extraire_chemin(char *dest, const char *Source)
|
||||||
{
|
{
|
||||||
char * Position;
|
char * Position;
|
||||||
|
|
||||||
strcpy(Destination,Source);
|
strcpy(dest,Source);
|
||||||
Position = Position_dernier_slash(Destination);
|
Position = Position_dernier_slash(dest);
|
||||||
if (Position)
|
if (Position)
|
||||||
*(Position+1) = '\0';
|
*(Position+1) = '\0';
|
||||||
else
|
else
|
||||||
strcat(Destination, SEPARATEUR_CHEMIN);
|
strcat(dest, SEPARATEUR_CHEMIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Fichier_existe(char * Fichier)
|
int Fichier_existe(char * Fichier)
|
||||||
@ -222,7 +222,7 @@ int Repertoire_existe(char * Repertoire)
|
|||||||
// Détermine si un répertoire passé en paramètre existe ou non dans le
|
// Détermine si un répertoire passé en paramètre existe ou non dans le
|
||||||
// répertoire courant.
|
// répertoire courant.
|
||||||
{
|
{
|
||||||
DIR* Enreg; // Structure de lecture des éléments
|
DIR* entry; // Structure de lecture des éléments
|
||||||
|
|
||||||
if (strcmp(Repertoire,PARENT_DIR)==0)
|
if (strcmp(Repertoire,PARENT_DIR)==0)
|
||||||
return 1;
|
return 1;
|
||||||
@ -231,12 +231,12 @@ int Repertoire_existe(char * Repertoire)
|
|||||||
// On va chercher si le répertoire existe à l'aide d'un Opendir. S'il
|
// On va chercher si le répertoire existe à l'aide d'un Opendir. S'il
|
||||||
// renvoie NULL c'est que le répertoire n'est pas accessible...
|
// renvoie NULL c'est que le répertoire n'est pas accessible...
|
||||||
|
|
||||||
Enreg=opendir(Repertoire);
|
entry=opendir(Repertoire);
|
||||||
if (Enreg==NULL)
|
if (entry==NULL)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
closedir(Enreg);
|
closedir(entry);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
4
io.h
4
io.h
@ -38,8 +38,8 @@ int write_word_be(FILE *Fichier, word w);
|
|||||||
int read_dword_be(FILE *Fichier, dword *Dest);
|
int read_dword_be(FILE *Fichier, dword *Dest);
|
||||||
int write_dword_be(FILE *Fichier, dword dw);
|
int write_dword_be(FILE *Fichier, dword dw);
|
||||||
|
|
||||||
void Extraire_nom_fichier(char *Destination, const char *Source);
|
void Extraire_nom_fichier(char *dest, const char *Source);
|
||||||
void Extraire_chemin(char *Destination, const char *Source);
|
void Extraire_chemin(char *dest, const char *Source);
|
||||||
|
|
||||||
char * Position_dernier_slash(const char * Chaine);
|
char * Position_dernier_slash(const char * Chaine);
|
||||||
|
|
||||||
|
|||||||
@ -3597,17 +3597,17 @@ void Test_PCX(void)
|
|||||||
// -- Lire un fichier au format PCX -----------------------------------------
|
// -- Lire un fichier au format PCX -----------------------------------------
|
||||||
|
|
||||||
// -- Afficher une ligne PCX codée sur 1 seul plan avec moins de 256 c. --
|
// -- Afficher une ligne PCX codée sur 1 seul plan avec moins de 256 c. --
|
||||||
void Draw_PCX_line(short Pos_Y, byte Depth)
|
void Draw_PCX_line(short Pos_Y, byte depth)
|
||||||
{
|
{
|
||||||
short Pos_X;
|
short Pos_X;
|
||||||
byte Couleur;
|
byte Couleur;
|
||||||
byte Reduction=8/Depth;
|
byte Reduction=8/depth;
|
||||||
byte Masque=(1<<Depth)-1;
|
byte Masque=(1<<depth)-1;
|
||||||
byte Reduction_moins_1=Reduction-1;
|
byte Reduction_moins_1=Reduction-1;
|
||||||
|
|
||||||
for (Pos_X=0; Pos_X<Principal_Largeur_image; Pos_X++)
|
for (Pos_X=0; Pos_X<Principal_Largeur_image; Pos_X++)
|
||||||
{
|
{
|
||||||
Couleur=(LBM_Buffer[Pos_X/Reduction]>>((Reduction_moins_1-(Pos_X%Reduction))*Depth)) & Masque;
|
Couleur=(LBM_Buffer[Pos_X/Reduction]>>((Reduction_moins_1-(Pos_X%Reduction))*depth)) & Masque;
|
||||||
Pixel_de_chargement(Pos_X,Pos_Y,Couleur);
|
Pixel_de_chargement(Pos_X,Pos_Y,Couleur);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
124
moteur.c
124
moteur.c
@ -213,7 +213,7 @@ int Numero_bouton_sous_souris(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Tracer_cadre_de_bouton_du_menu(byte Numero,byte Enfonce)
|
void Tracer_cadre_de_bouton_du_menu(byte Numero,byte pressed)
|
||||||
{
|
{
|
||||||
byte Couleur_Haut_gauche;
|
byte Couleur_Haut_gauche;
|
||||||
byte Couleur_Bas_droite;
|
byte Couleur_Bas_droite;
|
||||||
@ -230,7 +230,7 @@ void Tracer_cadre_de_bouton_du_menu(byte Numero,byte Enfonce)
|
|||||||
Fin_X =Debut_X+Bouton[Numero].Largeur;
|
Fin_X =Debut_X+Bouton[Numero].Largeur;
|
||||||
Fin_Y =Debut_Y+Bouton[Numero].Hauteur;
|
Fin_Y =Debut_Y+Bouton[Numero].Hauteur;
|
||||||
|
|
||||||
if (!Enfonce)
|
if (!pressed)
|
||||||
{
|
{
|
||||||
Couleur_Haut_gauche=CM_Blanc;
|
Couleur_Haut_gauche=CM_Blanc;
|
||||||
Couleur_Bas_droite=CM_Fonce;
|
Couleur_Bas_droite=CM_Fonce;
|
||||||
@ -442,7 +442,7 @@ void Deplacer_Split(void)
|
|||||||
{
|
{
|
||||||
short Ancien_Split=Principal_Split;
|
short Ancien_Split=Principal_Split;
|
||||||
short Ancien_X_Zoom=Principal_X_Zoom;
|
short Ancien_X_Zoom=Principal_X_Zoom;
|
||||||
short Decalage=Principal_X_Zoom-Mouse_X;
|
short offset=Principal_X_Zoom-Mouse_X;
|
||||||
byte Ancienne_forme_curseur=Forme_curseur;
|
byte Ancienne_forme_curseur=Forme_curseur;
|
||||||
short Ancien_Mouse_X=-1;
|
short Ancien_Mouse_X=-1;
|
||||||
|
|
||||||
@ -460,7 +460,7 @@ void Deplacer_Split(void)
|
|||||||
if (Mouse_X!=Ancien_Mouse_X)
|
if (Mouse_X!=Ancien_Mouse_X)
|
||||||
{
|
{
|
||||||
Ancien_Mouse_X=Mouse_X;
|
Ancien_Mouse_X=Mouse_X;
|
||||||
Principal_Proportion_split=(float)(Mouse_X+Decalage)/Largeur_ecran;
|
Principal_Proportion_split=(float)(Mouse_X+offset)/Largeur_ecran;
|
||||||
Calculer_split();
|
Calculer_split();
|
||||||
|
|
||||||
if (Principal_X_Zoom!=Ancien_X_Zoom)
|
if (Principal_X_Zoom!=Ancien_X_Zoom)
|
||||||
@ -1310,7 +1310,7 @@ void Fenetre_Effacer_tags(void)
|
|||||||
|
|
||||||
|
|
||||||
// ---- Tracer les TAGs sur les palettes du menu Palette ou du menu Shade ----
|
// ---- Tracer les TAGs sur les palettes du menu Palette ou du menu Shade ----
|
||||||
void Tagger_intervalle_palette(byte Debut,byte Fin)
|
void Tagger_intervalle_palette(byte start,byte end)
|
||||||
{
|
{
|
||||||
word Origine_X;
|
word Origine_X;
|
||||||
word Origine_Y;
|
word Origine_Y;
|
||||||
@ -1321,33 +1321,33 @@ void Tagger_intervalle_palette(byte Debut,byte Fin)
|
|||||||
word Indice;
|
word Indice;
|
||||||
|
|
||||||
// On efface les anciens TAGs
|
// On efface les anciens TAGs
|
||||||
for (Indice=0;Indice<=Debut;Indice++)
|
for (Indice=0;Indice<=start;Indice++)
|
||||||
Block(Fenetre_Pos_X+(Fenetre_Liste_boutons_palette->Pos_X+3+((Indice>>4)*10))*Menu_Facteur_X,
|
Block(Fenetre_Pos_X+(Fenetre_Liste_boutons_palette->Pos_X+3+((Indice>>4)*10))*Menu_Facteur_X,
|
||||||
Fenetre_Pos_Y+(Fenetre_Liste_boutons_palette->Pos_Y+3+((Indice&15)* 5))*Menu_Facteur_Y,
|
Fenetre_Pos_Y+(Fenetre_Liste_boutons_palette->Pos_Y+3+((Indice&15)* 5))*Menu_Facteur_Y,
|
||||||
Menu_Facteur_X*3,Menu_Facteur_Y*5,CM_Clair);
|
Menu_Facteur_X*3,Menu_Facteur_Y*5,CM_Clair);
|
||||||
|
|
||||||
for (Indice=Fin;Indice<256;Indice++)
|
for (Indice=end;Indice<256;Indice++)
|
||||||
Block(Fenetre_Pos_X+(Fenetre_Liste_boutons_palette->Pos_X+3+((Indice>>4)*10))*Menu_Facteur_X,
|
Block(Fenetre_Pos_X+(Fenetre_Liste_boutons_palette->Pos_X+3+((Indice>>4)*10))*Menu_Facteur_X,
|
||||||
Fenetre_Pos_Y+(Fenetre_Liste_boutons_palette->Pos_Y+3+((Indice&15)* 5))*Menu_Facteur_Y,
|
Fenetre_Pos_Y+(Fenetre_Liste_boutons_palette->Pos_Y+3+((Indice&15)* 5))*Menu_Facteur_Y,
|
||||||
Menu_Facteur_X*3,Menu_Facteur_Y*5,CM_Clair);
|
Menu_Facteur_X*3,Menu_Facteur_Y*5,CM_Clair);
|
||||||
|
|
||||||
// On affiche le 1er TAG
|
// On affiche le 1er TAG
|
||||||
Origine_X=(Fenetre_Liste_boutons_palette->Pos_X+3)+(Debut>>4)*10;
|
Origine_X=(Fenetre_Liste_boutons_palette->Pos_X+3)+(start>>4)*10;
|
||||||
Origine_Y=(Fenetre_Liste_boutons_palette->Pos_Y+3)+(Debut&15)* 5;
|
Origine_Y=(Fenetre_Liste_boutons_palette->Pos_Y+3)+(start&15)* 5;
|
||||||
for (Pos_Y=0,Pos_fenetre_Y=Origine_Y ;Pos_Y<5;Pos_Y++,Pos_fenetre_Y++)
|
for (Pos_Y=0,Pos_fenetre_Y=Origine_Y ;Pos_Y<5;Pos_Y++,Pos_fenetre_Y++)
|
||||||
Pixel_dans_fenetre(Origine_X ,Pos_fenetre_Y,CM_Noir);
|
Pixel_dans_fenetre(Origine_X ,Pos_fenetre_Y,CM_Noir);
|
||||||
for (Pos_Y=0,Pos_fenetre_Y=Origine_Y+1;Pos_Y<3;Pos_Y++,Pos_fenetre_Y++)
|
for (Pos_Y=0,Pos_fenetre_Y=Origine_Y+1;Pos_Y<3;Pos_Y++,Pos_fenetre_Y++)
|
||||||
Pixel_dans_fenetre(Origine_X+1,Pos_fenetre_Y,CM_Noir);
|
Pixel_dans_fenetre(Origine_X+1,Pos_fenetre_Y,CM_Noir);
|
||||||
Pixel_dans_fenetre(Origine_X+2,Origine_Y+2,CM_Noir);
|
Pixel_dans_fenetre(Origine_X+2,Origine_Y+2,CM_Noir);
|
||||||
|
|
||||||
if (Debut!=Fin)
|
if (start!=end)
|
||||||
{
|
{
|
||||||
// On complète le 1er TAG
|
// On complète le 1er TAG
|
||||||
Pixel_dans_fenetre(Origine_X+1,Origine_Y+4,CM_Noir);
|
Pixel_dans_fenetre(Origine_X+1,Origine_Y+4,CM_Noir);
|
||||||
|
|
||||||
// On affiche le 2ème TAG
|
// On affiche le 2ème TAG
|
||||||
Origine_X=(Fenetre_Liste_boutons_palette->Pos_X+3)+(Fin>>4)*10;
|
Origine_X=(Fenetre_Liste_boutons_palette->Pos_X+3)+(end>>4)*10;
|
||||||
Origine_Y=(Fenetre_Liste_boutons_palette->Pos_Y+3)+(Fin&15)* 5;
|
Origine_Y=(Fenetre_Liste_boutons_palette->Pos_Y+3)+(end&15)* 5;
|
||||||
for (Pos_Y=0,Pos_fenetre_Y=Origine_Y; Pos_Y<5; Pos_Y++,Pos_fenetre_Y++)
|
for (Pos_Y=0,Pos_fenetre_Y=Origine_Y; Pos_Y<5; Pos_Y++,Pos_fenetre_Y++)
|
||||||
Pixel_dans_fenetre(Origine_X ,Pos_fenetre_Y,CM_Noir);
|
Pixel_dans_fenetre(Origine_X ,Pos_fenetre_Y,CM_Noir);
|
||||||
for (Pos_Y=0,Pos_fenetre_Y=Origine_Y; Pos_Y<4; Pos_Y++,Pos_fenetre_Y++)
|
for (Pos_Y=0,Pos_fenetre_Y=Origine_Y; Pos_Y<4; Pos_Y++,Pos_fenetre_Y++)
|
||||||
@ -1355,7 +1355,7 @@ void Tagger_intervalle_palette(byte Debut,byte Fin)
|
|||||||
Pixel_dans_fenetre(Origine_X+2,Origine_Y+2,CM_Noir);
|
Pixel_dans_fenetre(Origine_X+2,Origine_Y+2,CM_Noir);
|
||||||
|
|
||||||
// On TAG toutes les couleurs intermédiaires
|
// On TAG toutes les couleurs intermédiaires
|
||||||
for (Indice=Debut+1;Indice<Fin;Indice++)
|
for (Indice=start+1;Indice<end;Indice++)
|
||||||
{
|
{
|
||||||
Block(Fenetre_Pos_X+(Fenetre_Liste_boutons_palette->Pos_X+3+((Indice>>4)*10))*Menu_Facteur_X,
|
Block(Fenetre_Pos_X+(Fenetre_Liste_boutons_palette->Pos_X+3+((Indice>>4)*10))*Menu_Facteur_X,
|
||||||
Fenetre_Pos_Y+(Fenetre_Liste_boutons_palette->Pos_Y+3+((Indice&15)* 5))*Menu_Facteur_Y,
|
Fenetre_Pos_Y+(Fenetre_Liste_boutons_palette->Pos_Y+3+((Indice&15)* 5))*Menu_Facteur_Y,
|
||||||
@ -1376,51 +1376,51 @@ 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(T_Bouton_scroller * Enreg)
|
void Calculer_hauteur_curseur_jauge(T_Bouton_scroller * button)
|
||||||
{
|
{
|
||||||
if (Enreg->Nb_elements>Enreg->Nb_visibles)
|
if (button->Nb_elements>button->Nb_visibles)
|
||||||
{
|
{
|
||||||
Enreg->Hauteur_curseur=(Enreg->Nb_visibles*(Enreg->Hauteur-24))/Enreg->Nb_elements;
|
button->Hauteur_curseur=(button->Nb_visibles*(button->Hauteur-24))/button->Nb_elements;
|
||||||
if (!(Enreg->Hauteur_curseur))
|
if (!(button->Hauteur_curseur))
|
||||||
Enreg->Hauteur_curseur=1;
|
button->Hauteur_curseur=1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Enreg->Hauteur_curseur=Enreg->Hauteur-24;
|
button->Hauteur_curseur=button->Hauteur-24;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fenetre_Dessiner_jauge(T_Bouton_scroller * Enreg)
|
void Fenetre_Dessiner_jauge(T_Bouton_scroller * button)
|
||||||
{
|
{
|
||||||
word Position_curseur_jauge;
|
word Position_curseur_jauge;
|
||||||
|
|
||||||
Position_curseur_jauge=Enreg->Pos_Y+12;
|
Position_curseur_jauge=button->Pos_Y+12;
|
||||||
|
|
||||||
Block(Fenetre_Pos_X+(Enreg->Pos_X*Menu_Facteur_X),
|
Block(Fenetre_Pos_X+(button->Pos_X*Menu_Facteur_X),
|
||||||
Fenetre_Pos_Y+(Position_curseur_jauge*Menu_Facteur_Y),
|
Fenetre_Pos_Y+(Position_curseur_jauge*Menu_Facteur_Y),
|
||||||
11*Menu_Facteur_X,(Enreg->Hauteur-24)*Menu_Facteur_Y,CM_Noir/*CM_Fonce*/);
|
11*Menu_Facteur_X,(button->Hauteur-24)*Menu_Facteur_Y,CM_Noir/*CM_Fonce*/);
|
||||||
|
|
||||||
if (Enreg->Nb_elements>Enreg->Nb_visibles)
|
if (button->Nb_elements>button->Nb_visibles)
|
||||||
Position_curseur_jauge+=Round_div(Enreg->Position*(Enreg->Hauteur-24-Enreg->Hauteur_curseur),Enreg->Nb_elements-Enreg->Nb_visibles);
|
Position_curseur_jauge+=Round_div(button->Position*(button->Hauteur-24-button->Hauteur_curseur),button->Nb_elements-button->Nb_visibles);
|
||||||
|
|
||||||
Block(Fenetre_Pos_X+(Enreg->Pos_X*Menu_Facteur_X),
|
Block(Fenetre_Pos_X+(button->Pos_X*Menu_Facteur_X),
|
||||||
Fenetre_Pos_Y+(Position_curseur_jauge*Menu_Facteur_Y),
|
Fenetre_Pos_Y+(Position_curseur_jauge*Menu_Facteur_Y),
|
||||||
11*Menu_Facteur_X,Enreg->Hauteur_curseur*Menu_Facteur_Y,CM_Clair/*CM_Blanc*/);
|
11*Menu_Facteur_X,button->Hauteur_curseur*Menu_Facteur_Y,CM_Clair/*CM_Blanc*/);
|
||||||
|
|
||||||
UpdateRect(Fenetre_Pos_X+(Enreg->Pos_X*Menu_Facteur_X),
|
UpdateRect(Fenetre_Pos_X+(button->Pos_X*Menu_Facteur_X),
|
||||||
Fenetre_Pos_Y+Enreg->Pos_Y*Menu_Facteur_Y,
|
Fenetre_Pos_Y+button->Pos_Y*Menu_Facteur_Y,
|
||||||
11*Menu_Facteur_X,(Enreg->Hauteur)*Menu_Facteur_Y);
|
11*Menu_Facteur_X,(button->Hauteur)*Menu_Facteur_Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fenetre_Dessiner_bouton_scroller(T_Bouton_scroller * Enreg)
|
void Fenetre_Dessiner_bouton_scroller(T_Bouton_scroller * button)
|
||||||
{
|
{
|
||||||
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(button->Pos_X-1,button->Pos_Y-1,13,button->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(button->Pos_X-1,button->Pos_Y+11,13,button->Hauteur-22,CM_Noir);
|
||||||
Fenetre_Afficher_cadre_bombe(Enreg->Pos_X,Enreg->Pos_Y,11,11);
|
Fenetre_Afficher_cadre_bombe(button->Pos_X,button->Pos_Y,11,11);
|
||||||
Fenetre_Afficher_cadre_bombe(Enreg->Pos_X,Enreg->Pos_Y+Enreg->Hauteur-11,11,11);
|
Fenetre_Afficher_cadre_bombe(button->Pos_X,button->Pos_Y+button->Hauteur-11,11,11);
|
||||||
Print_dans_fenetre(Enreg->Pos_X+2,Enreg->Pos_Y+2,"\030",CM_Noir,CM_Clair);
|
Print_dans_fenetre(button->Pos_X+2,button->Pos_Y+2,"\030",CM_Noir,CM_Clair);
|
||||||
Print_dans_fenetre(Enreg->Pos_X+2,Enreg->Pos_Y+Enreg->Hauteur-9,"\031",CM_Noir,CM_Clair);
|
Print_dans_fenetre(button->Pos_X+2,button->Pos_Y+button->Hauteur-9,"\031",CM_Noir,CM_Clair);
|
||||||
Fenetre_Dessiner_jauge(Enreg);
|
Fenetre_Dessiner_jauge(button);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1434,17 +1434,17 @@ 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(T_Bouton_special * Enreg, char * content)
|
void Fenetre_Contenu_bouton_saisie(T_Bouton_special * button, char * content)
|
||||||
{
|
{
|
||||||
Print_dans_fenetre_limite(Enreg->Pos_X+2,Enreg->Pos_Y+2,content,Enreg->Largeur/8,CM_Noir,CM_Clair);
|
Print_dans_fenetre_limite(button->Pos_X+2,button->Pos_Y+2,content,button->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(T_Bouton_special * Enreg)
|
void Fenetre_Effacer_bouton_saisie(T_Bouton_special * button)
|
||||||
{
|
{
|
||||||
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((button->Pos_X+2)*Menu_Facteur_X+Fenetre_Pos_X,(button->Pos_Y+2)*Menu_Facteur_Y+Fenetre_Pos_Y,(button->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((button->Pos_X+2)*Menu_Facteur_X+Fenetre_Pos_X,(button->Pos_Y+2)*Menu_Facteur_Y+Fenetre_Pos_Y,button->Largeur/8*8*Menu_Facteur_X,8*Menu_Facteur_Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1606,39 +1606,39 @@ T_Bouton_dropdown * Fenetre_Definir_bouton_dropdown(word Pos_X,word Pos_Y,word L
|
|||||||
// 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(T_Bouton_dropdown * Dropdown, word Numero, const char *Libelle)
|
void Fenetre_Dropdown_choix(T_Bouton_dropdown * dropdown, word Numero, const char *Libelle)
|
||||||
{
|
{
|
||||||
T_Dropdown_choix *Temp;
|
T_Dropdown_choix *Temp;
|
||||||
T_Dropdown_choix *Dernier;
|
T_Dropdown_choix *last;
|
||||||
|
|
||||||
Temp=(T_Dropdown_choix *)malloc(sizeof(T_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;
|
||||||
|
|
||||||
Dernier=Dropdown->Premier_choix;
|
last=dropdown->Premier_choix;
|
||||||
if (Dernier)
|
if (last)
|
||||||
{
|
{
|
||||||
// On cherche le dernier élément
|
// On cherche le dernier élément
|
||||||
for (;Dernier->Next;Dernier=Dernier->Next)
|
for (;last->Next;last=last->Next)
|
||||||
;
|
;
|
||||||
Dernier->Next=Temp;
|
last->Next=Temp;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Dropdown->Premier_choix=Temp;
|
dropdown->Premier_choix=Temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------- Suppression de tous les choix d'une dropdown ---------
|
// ------------- Suppression de tous les choix d'une dropdown ---------
|
||||||
void Fenetre_Dropdown_vider_choix(T_Bouton_dropdown * Dropdown)
|
void Fenetre_Dropdown_vider_choix(T_Bouton_dropdown * dropdown)
|
||||||
{
|
{
|
||||||
T_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;
|
||||||
free(Dropdown->Premier_choix);
|
free(dropdown->Premier_choix);
|
||||||
Dropdown->Premier_choix=Choix_suivant;
|
dropdown->Premier_choix=Choix_suivant;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1798,12 +1798,12 @@ 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(T_Bouton_palette * Enreg)
|
short Attendre_click_dans_palette(T_Bouton_palette * button)
|
||||||
{
|
{
|
||||||
short Debut_X=Enreg->Pos_X+5;
|
short Debut_X=button->Pos_X+5;
|
||||||
short Debut_Y=Enreg->Pos_Y+3;
|
short Debut_Y=button->Pos_Y+3;
|
||||||
short Fin_X =Enreg->Pos_X+160;
|
short Fin_X =button->Pos_X+160;
|
||||||
short Fin_Y =Enreg->Pos_Y+82;
|
short Fin_Y =button->Pos_Y+82;
|
||||||
byte Couleur_choisie;
|
byte Couleur_choisie;
|
||||||
byte Ancien_Cacher_curseur;
|
byte Ancien_Cacher_curseur;
|
||||||
byte Ancien_Loupe_Mode;
|
byte Ancien_Loupe_Mode;
|
||||||
@ -1825,8 +1825,8 @@ short Attendre_click_dans_palette(T_Bouton_palette * Enreg)
|
|||||||
if (Fenetre_click_dans_zone(Debut_X,Debut_Y,Fin_X,Fin_Y))
|
if (Fenetre_click_dans_zone(Debut_X,Debut_Y,Fin_X,Fin_Y))
|
||||||
{
|
{
|
||||||
Effacer_curseur();
|
Effacer_curseur();
|
||||||
Couleur_choisie=(((Mouse_X-Fenetre_Pos_X)/Menu_Facteur_X)-(Enreg->Pos_X+2)) / 10 * 16 +
|
Couleur_choisie=(((Mouse_X-Fenetre_Pos_X)/Menu_Facteur_X)-(button->Pos_X+2)) / 10 * 16 +
|
||||||
(((Mouse_Y-Fenetre_Pos_Y)/Menu_Facteur_Y)-(Enreg->Pos_Y+3)) / 5;
|
(((Mouse_Y-Fenetre_Pos_Y)/Menu_Facteur_Y)-(button->Pos_Y+3)) / 5;
|
||||||
Forme_curseur=FORME_CURSEUR_FLECHE;
|
Forme_curseur=FORME_CURSEUR_FLECHE;
|
||||||
Cacher_curseur=Ancien_Cacher_curseur;
|
Cacher_curseur=Ancien_Cacher_curseur;
|
||||||
Loupe_Mode=Ancien_Loupe_Mode;
|
Loupe_Mode=Ancien_Loupe_Mode;
|
||||||
|
|||||||
18
moteur.h
18
moteur.h
@ -37,12 +37,12 @@ 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(T_Bouton_scroller * Enreg);
|
void Calculer_hauteur_curseur_jauge(T_Bouton_scroller * button);
|
||||||
void Fenetre_Dessiner_jauge(T_Bouton_scroller * Enreg);
|
void Fenetre_Dessiner_jauge(T_Bouton_scroller * button);
|
||||||
void Fenetre_Dessiner_bouton_scroller(T_Bouton_scroller * Enreg);
|
void Fenetre_Dessiner_bouton_scroller(T_Bouton_scroller * button);
|
||||||
|
|
||||||
void Fenetre_Contenu_bouton_saisie(T_Bouton_special * Enreg, char * content);
|
void Fenetre_Contenu_bouton_saisie(T_Bouton_special * button, char * content);
|
||||||
void Fenetre_Effacer_bouton_saisie(T_Bouton_special * Enreg);
|
void Fenetre_Effacer_bouton_saisie(T_Bouton_special * button);
|
||||||
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);
|
||||||
|
|
||||||
T_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,
|
||||||
@ -56,7 +56,7 @@ T_Bouton_normal * Fenetre_Definir_bouton_repetable(word Pos_X, word Pos_Y,
|
|||||||
|
|
||||||
T_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 start,byte end);
|
||||||
|
|
||||||
T_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,
|
||||||
@ -66,10 +66,10 @@ T_Bouton_scroller * Fenetre_Definir_bouton_scroller(word Pos_X, word Pos_Y,
|
|||||||
T_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);
|
||||||
T_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);
|
||||||
T_Bouton_dropdown * Fenetre_Definir_bouton_dropdown(word Pos_X,word Pos_Y,word Largeur,word Hauteur,word Largeur_choix,char *Libelle,byte display_choice,byte display_centered,byte display_arrow,byte active_button);
|
T_Bouton_dropdown * Fenetre_Definir_bouton_dropdown(word Pos_X,word Pos_Y,word Largeur,word Hauteur,word Largeur_choix,char *Libelle,byte display_choice,byte display_centered,byte display_arrow,byte active_button);
|
||||||
void Fenetre_Dropdown_choix(T_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(T_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(T_Bouton_palette * Enreg);
|
short Attendre_click_dans_palette(T_Bouton_palette * button);
|
||||||
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);
|
||||||
|
|||||||
2
op_c.c
2
op_c.c
@ -959,7 +959,7 @@ void DS_Generer(DegradeSet * ds,ClusterSet * cs)
|
|||||||
int ic,id; // Les indexs de parcours des ensembles
|
int ic,id; // Les indexs de parcours des ensembles
|
||||||
int mdegr; // Meilleur d‚grad‚
|
int mdegr; // Meilleur d‚grad‚
|
||||||
int mdiff; // Meilleure diff‚rence de chrominance
|
int mdiff; // Meilleure diff‚rence de chrominance
|
||||||
int diff; // Diff‚rence de chrominance courante
|
int diff; // Difference de chrominance courante
|
||||||
|
|
||||||
// Pour chacun des clusters … traiter
|
// Pour chacun des clusters … traiter
|
||||||
for (ic=1;ic<cs->nb;ic++)
|
for (ic=1;ic<cs->nb;ic++)
|
||||||
|
|||||||
74
operatio.c
74
operatio.c
@ -626,14 +626,14 @@ void K_Ligne_0_6(void)
|
|||||||
short Fin_X;
|
short Fin_X;
|
||||||
short Fin_Y;
|
short Fin_Y;
|
||||||
short Couleur;
|
short Couleur;
|
||||||
short Direction;
|
short direction;
|
||||||
|
|
||||||
Operation_POP(&Fin_Y);
|
Operation_POP(&Fin_Y);
|
||||||
Operation_POP(&Fin_X);
|
Operation_POP(&Fin_X);
|
||||||
Operation_POP(&Debut_Y);
|
Operation_POP(&Debut_Y);
|
||||||
Operation_POP(&Debut_X);
|
Operation_POP(&Debut_X);
|
||||||
Operation_POP(&Couleur);
|
Operation_POP(&Couleur);
|
||||||
Operation_POP(&Direction);
|
Operation_POP(&direction);
|
||||||
|
|
||||||
if ((Config.Coords_rel) && (Menu_visible))
|
if ((Config.Coords_rel) && (Menu_visible))
|
||||||
Print_dans_menu("X:± 0 Y:± 0",0);
|
Print_dans_menu("X:± 0 Y:± 0",0);
|
||||||
@ -645,16 +645,16 @@ void K_Ligne_0_6(void)
|
|||||||
Tracer_ligne_Preview_xor (Debut_X,Debut_Y,Fin_X,Fin_Y,0);
|
Tracer_ligne_Preview_xor (Debut_X,Debut_Y,Fin_X,Fin_Y,0);
|
||||||
*/
|
*/
|
||||||
Pinceau_Forme=Pinceau_Forme_avant_operation;
|
Pinceau_Forme=Pinceau_Forme_avant_operation;
|
||||||
if (Direction & 0x80)
|
if (direction & 0x80)
|
||||||
{
|
{
|
||||||
Afficher_pinceau(Debut_X,Debut_Y,Couleur,0);
|
Afficher_pinceau(Debut_X,Debut_Y,Couleur,0);
|
||||||
Direction=(Direction & 0x7F);
|
direction=(direction & 0x7F);
|
||||||
}
|
}
|
||||||
Tracer_ligne_Definitif(Debut_X,Debut_Y,Pinceau_X,Pinceau_Y,Couleur);
|
Tracer_ligne_Definitif(Debut_X,Debut_Y,Pinceau_X,Pinceau_Y,Couleur);
|
||||||
Pinceau_Forme=FORME_PINCEAU_POINT;
|
Pinceau_Forme=FORME_PINCEAU_POINT;
|
||||||
|
|
||||||
Operation_PUSH(Direction);
|
Operation_PUSH(direction);
|
||||||
Operation_PUSH(Direction); // Valeur bidon servant de nouvel état de pile
|
Operation_PUSH(direction); // Valeur bidon servant de nouvel état de pile
|
||||||
Operation_PUSH(Couleur);
|
Operation_PUSH(Couleur);
|
||||||
Operation_PUSH(Pinceau_X);
|
Operation_PUSH(Pinceau_X);
|
||||||
Operation_PUSH(Pinceau_Y);
|
Operation_PUSH(Pinceau_Y);
|
||||||
@ -676,19 +676,19 @@ void K_Ligne_12_7(void)
|
|||||||
short Fin_X;
|
short Fin_X;
|
||||||
short Fin_Y;
|
short Fin_Y;
|
||||||
short Couleur;
|
short Couleur;
|
||||||
short Direction;
|
short direction;
|
||||||
|
|
||||||
Operation_POP(&Fin_Y);
|
Operation_POP(&Fin_Y);
|
||||||
Operation_POP(&Fin_X);
|
Operation_POP(&Fin_X);
|
||||||
Operation_POP(&Debut_Y);
|
Operation_POP(&Debut_Y);
|
||||||
Operation_POP(&Debut_X);
|
Operation_POP(&Debut_X);
|
||||||
Operation_POP(&Couleur);
|
Operation_POP(&Couleur);
|
||||||
Operation_POP(&Direction);
|
Operation_POP(&direction);
|
||||||
Operation_POP(&Direction);
|
Operation_POP(&direction);
|
||||||
|
|
||||||
if (Direction==Mouse_K)
|
if (direction==Mouse_K)
|
||||||
{
|
{
|
||||||
Operation_PUSH(Direction);
|
Operation_PUSH(direction);
|
||||||
Operation_PUSH(Couleur);
|
Operation_PUSH(Couleur);
|
||||||
Operation_PUSH(Debut_X);
|
Operation_PUSH(Debut_X);
|
||||||
Operation_PUSH(Debut_Y);
|
Operation_PUSH(Debut_Y);
|
||||||
@ -2165,19 +2165,19 @@ void Polygone_12_9(void)
|
|||||||
short Fin_X;
|
short Fin_X;
|
||||||
short Fin_Y;
|
short Fin_Y;
|
||||||
short Couleur;
|
short Couleur;
|
||||||
short Direction;
|
short direction;
|
||||||
|
|
||||||
Operation_POP(&Fin_Y);
|
Operation_POP(&Fin_Y);
|
||||||
Operation_POP(&Fin_X);
|
Operation_POP(&Fin_X);
|
||||||
Operation_POP(&Debut_Y);
|
Operation_POP(&Debut_Y);
|
||||||
Operation_POP(&Debut_X);
|
Operation_POP(&Debut_X);
|
||||||
Operation_POP(&Couleur);
|
Operation_POP(&Couleur);
|
||||||
Operation_POP(&Direction);
|
Operation_POP(&direction);
|
||||||
Operation_POP(&Direction);
|
Operation_POP(&direction);
|
||||||
|
|
||||||
if (Direction==Mouse_K)
|
if (direction==Mouse_K)
|
||||||
{
|
{
|
||||||
Operation_PUSH(Direction);
|
Operation_PUSH(direction);
|
||||||
Operation_PUSH(Couleur);
|
Operation_PUSH(Couleur);
|
||||||
Operation_PUSH(Debut_X);
|
Operation_PUSH(Debut_X);
|
||||||
Operation_PUSH(Debut_Y);
|
Operation_PUSH(Debut_Y);
|
||||||
@ -2271,25 +2271,25 @@ void Polyfill_0_8(void)
|
|||||||
short Fin_X;
|
short Fin_X;
|
||||||
short Fin_Y;
|
short Fin_Y;
|
||||||
short Couleur;
|
short Couleur;
|
||||||
short Direction;
|
short direction;
|
||||||
|
|
||||||
Operation_POP(&Fin_Y);
|
Operation_POP(&Fin_Y);
|
||||||
Operation_POP(&Fin_X);
|
Operation_POP(&Fin_X);
|
||||||
Operation_POP(&Debut_Y);
|
Operation_POP(&Debut_Y);
|
||||||
Operation_POP(&Debut_X);
|
Operation_POP(&Debut_X);
|
||||||
Operation_POP(&Couleur);
|
Operation_POP(&Couleur);
|
||||||
Operation_POP(&Direction);
|
Operation_POP(&direction);
|
||||||
|
|
||||||
if ((Config.Coords_rel) && (Menu_visible))
|
if ((Config.Coords_rel) && (Menu_visible))
|
||||||
Print_dans_menu("X:± 0 Y:± 0",0);
|
Print_dans_menu("X:± 0 Y:± 0",0);
|
||||||
|
|
||||||
Tracer_ligne_Preview_xor(Debut_X,Debut_Y,Fin_X,Fin_Y,0);
|
Tracer_ligne_Preview_xor(Debut_X,Debut_Y,Fin_X,Fin_Y,0);
|
||||||
|
|
||||||
if (Direction & 0x80)
|
if (direction & 0x80)
|
||||||
Direction=(Direction & 0x7F);
|
direction=(direction & 0x7F);
|
||||||
|
|
||||||
Operation_PUSH(Direction); // Valeur bidon servant de nouvel état de pile
|
Operation_PUSH(direction); // Valeur bidon servant de nouvel état de pile
|
||||||
Operation_PUSH(Direction);
|
Operation_PUSH(direction);
|
||||||
Operation_PUSH(Couleur);
|
Operation_PUSH(Couleur);
|
||||||
|
|
||||||
Tracer_ligne_Preview_xor(Debut_X,Debut_Y,Pinceau_X,Pinceau_Y,0);
|
Tracer_ligne_Preview_xor(Debut_X,Debut_Y,Pinceau_X,Pinceau_Y,0);
|
||||||
@ -2364,19 +2364,19 @@ void Polyfill_12_9(void)
|
|||||||
short Fin_X;
|
short Fin_X;
|
||||||
short Fin_Y;
|
short Fin_Y;
|
||||||
short Couleur;
|
short Couleur;
|
||||||
short Direction;
|
short direction;
|
||||||
|
|
||||||
Operation_POP(&Fin_Y);
|
Operation_POP(&Fin_Y);
|
||||||
Operation_POP(&Fin_X);
|
Operation_POP(&Fin_X);
|
||||||
Operation_POP(&Debut_Y);
|
Operation_POP(&Debut_Y);
|
||||||
Operation_POP(&Debut_X);
|
Operation_POP(&Debut_X);
|
||||||
Operation_POP(&Couleur);
|
Operation_POP(&Couleur);
|
||||||
Operation_POP(&Direction);
|
Operation_POP(&direction);
|
||||||
Operation_POP(&Direction);
|
Operation_POP(&direction);
|
||||||
|
|
||||||
if (Direction==Mouse_K)
|
if (direction==Mouse_K)
|
||||||
{
|
{
|
||||||
Operation_PUSH(Direction);
|
Operation_PUSH(direction);
|
||||||
Operation_PUSH(Couleur);
|
Operation_PUSH(Couleur);
|
||||||
Operation_PUSH(Debut_X);
|
Operation_PUSH(Debut_X);
|
||||||
Operation_PUSH(Debut_Y);
|
Operation_PUSH(Debut_Y);
|
||||||
@ -2909,7 +2909,7 @@ void Brosse_0_5(void)
|
|||||||
short Debut_Y;
|
short Debut_Y;
|
||||||
short Ancien_Pinceau_X;
|
short Ancien_Pinceau_X;
|
||||||
short Ancien_Pinceau_Y;
|
short Ancien_Pinceau_Y;
|
||||||
short Effacement;
|
short clear;
|
||||||
|
|
||||||
// Comme on a demandé l'effacement du curseur, il n'y a plus de croix en
|
// Comme on a demandé l'effacement du curseur, il n'y a plus de croix en
|
||||||
// (Pinceau_X,Pinceau_Y). C'est une bonne chose.
|
// (Pinceau_X,Pinceau_Y). C'est une bonne chose.
|
||||||
@ -2917,7 +2917,7 @@ void Brosse_0_5(void)
|
|||||||
Operation_Taille_pile-=2;
|
Operation_Taille_pile-=2;
|
||||||
Operation_POP(&Debut_Y);
|
Operation_POP(&Debut_Y);
|
||||||
Operation_POP(&Debut_X);
|
Operation_POP(&Debut_X);
|
||||||
Operation_POP(&Effacement);
|
Operation_POP(&clear);
|
||||||
|
|
||||||
// On efface l'ancienne croix:
|
// On efface l'ancienne croix:
|
||||||
Ancien_Pinceau_X=Pinceau_X;
|
Ancien_Pinceau_X=Pinceau_X;
|
||||||
@ -2947,7 +2947,7 @@ void Brosse_0_5(void)
|
|||||||
if (Ancien_Pinceau_Y!=Debut_Y)
|
if (Ancien_Pinceau_Y!=Debut_Y)
|
||||||
Ancien_Pinceau_Y--;
|
Ancien_Pinceau_Y--;
|
||||||
}
|
}
|
||||||
Capturer_brosse(Debut_X,Debut_Y,Ancien_Pinceau_X,Ancien_Pinceau_Y,Effacement);
|
Capturer_brosse(Debut_X,Debut_Y,Ancien_Pinceau_X,Ancien_Pinceau_Y,clear);
|
||||||
if ((Snap_Mode) && (Config.Adjust_brush_pick))
|
if ((Snap_Mode) && (Config.Adjust_brush_pick))
|
||||||
{
|
{
|
||||||
Brosse_Decalage_X=(Brosse_Decalage_X/Snap_Largeur)*Snap_Largeur;
|
Brosse_Decalage_X=(Brosse_Decalage_X/Snap_Largeur)*Snap_Largeur;
|
||||||
@ -3717,8 +3717,8 @@ void Scroll_12_4(void)
|
|||||||
short Centre_Y;
|
short Centre_Y;
|
||||||
short Pos_X;
|
short Pos_X;
|
||||||
short Pos_Y;
|
short Pos_Y;
|
||||||
short Decalage_X;
|
short x_offset;
|
||||||
short Decalage_Y;
|
short y_offset;
|
||||||
//char Chaine[5];
|
//char Chaine[5];
|
||||||
|
|
||||||
Operation_POP(&Pos_Y);
|
Operation_POP(&Pos_Y);
|
||||||
@ -3731,18 +3731,18 @@ void Scroll_12_4(void)
|
|||||||
// L'utilisateur a bougé, il faut scroller l'image
|
// L'utilisateur a bougé, il faut scroller l'image
|
||||||
|
|
||||||
if (Pinceau_X>=Centre_X)
|
if (Pinceau_X>=Centre_X)
|
||||||
Decalage_X=(Pinceau_X-Centre_X)%Principal_Largeur_image;
|
x_offset=(Pinceau_X-Centre_X)%Principal_Largeur_image;
|
||||||
else
|
else
|
||||||
Decalage_X=Principal_Largeur_image-((Centre_X-Pinceau_X)%Principal_Largeur_image);
|
x_offset=Principal_Largeur_image-((Centre_X-Pinceau_X)%Principal_Largeur_image);
|
||||||
|
|
||||||
if (Pinceau_Y>=Centre_Y)
|
if (Pinceau_Y>=Centre_Y)
|
||||||
Decalage_Y=(Pinceau_Y-Centre_Y)%Principal_Hauteur_image;
|
y_offset=(Pinceau_Y-Centre_Y)%Principal_Hauteur_image;
|
||||||
else
|
else
|
||||||
Decalage_Y=Principal_Hauteur_image-((Centre_Y-Pinceau_Y)%Principal_Hauteur_image);
|
y_offset=Principal_Hauteur_image-((Centre_Y-Pinceau_Y)%Principal_Hauteur_image);
|
||||||
|
|
||||||
Aff_coords_rel_ou_abs(Centre_X,Centre_Y);
|
Aff_coords_rel_ou_abs(Centre_X,Centre_Y);
|
||||||
|
|
||||||
Scroll_picture(Decalage_X,Decalage_Y);
|
Scroll_picture(x_offset,y_offset);
|
||||||
|
|
||||||
Afficher_ecran();
|
Afficher_ecran();
|
||||||
}
|
}
|
||||||
|
|||||||
4
pages.c
4
pages.c
@ -266,9 +266,9 @@ void Liberer_une_page(S_Page * Page)
|
|||||||
// On ne se préoccupe pas de ce que deviens le reste des infos de l'image.
|
// On ne se préoccupe pas de ce que deviens le reste des infos de l'image.
|
||||||
}
|
}
|
||||||
|
|
||||||
void Copier_S_page(S_Page * Destination,S_Page * Source)
|
void Copier_S_page(S_Page * dest,S_Page * Source)
|
||||||
{
|
{
|
||||||
*Destination=*Source;
|
*dest=*Source;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Taille_d_une_page(S_Page * Page)
|
int Taille_d_une_page(S_Page * Page)
|
||||||
|
|||||||
2
pages.h
2
pages.h
@ -39,7 +39,7 @@ void Upload_infos_page_brouillon(S_Page * Page);
|
|||||||
void Download_infos_backup(S_Liste_de_pages * Liste);
|
void Download_infos_backup(S_Liste_de_pages * Liste);
|
||||||
int Allouer_une_page(S_Page * Page,int Largeur,int Hauteur);
|
int Allouer_une_page(S_Page * Page,int Largeur,int Hauteur);
|
||||||
void Liberer_une_page(S_Page * Page);
|
void Liberer_une_page(S_Page * Page);
|
||||||
void Copier_S_page(S_Page * Destination,S_Page * Source);
|
void Copier_S_page(S_Page * dest,S_Page * Source);
|
||||||
int Taille_d_une_page(S_Page * Page);
|
int Taille_d_une_page(S_Page * Page);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
34
palette.c
34
palette.c
@ -147,7 +147,7 @@ void Formate_composante(byte Valeur, char *Chaine)
|
|||||||
Chaine[4]='\0';
|
Chaine[4]='\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
void Degrader_palette(short Debut,short Fin,T_Palette Palette)
|
void Degrader_palette(short start,short end,T_Palette Palette)
|
||||||
// Modifie la palette pour obtenir un dégradé de couleur entre les deux bornes
|
// Modifie la palette pour obtenir un dégradé de couleur entre les deux bornes
|
||||||
// passées en paramètre
|
// passées en paramètre
|
||||||
{
|
{
|
||||||
@ -161,21 +161,21 @@ void Degrader_palette(short Debut,short Fin,T_Palette Palette)
|
|||||||
|
|
||||||
// On vérifie qu'il y ait assez de couleurs entre le début et la fin pour
|
// On vérifie qu'il y ait assez de couleurs entre le début et la fin pour
|
||||||
// pouvoir faire un dégradé:
|
// pouvoir faire un dégradé:
|
||||||
if ( (Debut!=Fin) && (Debut+1!=Fin) )
|
if ( (start!=end) && (start+1!=end) )
|
||||||
{
|
{
|
||||||
Debut_Rouge=Palette[Debut].R;
|
Debut_Rouge=Palette[start].R;
|
||||||
Debut_Vert =Palette[Debut].V;
|
Debut_Vert =Palette[start].V;
|
||||||
Debut_Bleu =Palette[Debut].B;
|
Debut_Bleu =Palette[start].B;
|
||||||
|
|
||||||
Fin_Rouge =Palette[Fin ].R;
|
Fin_Rouge =Palette[end ].R;
|
||||||
Fin_Vert =Palette[Fin ].V;
|
Fin_Vert =Palette[end ].V;
|
||||||
Fin_Bleu =Palette[Fin ].B;
|
Fin_Bleu =Palette[end ].B;
|
||||||
|
|
||||||
for (Indice=Debut+1;Indice<Fin;Indice++)
|
for (Indice=start+1;Indice<end;Indice++)
|
||||||
{
|
{
|
||||||
Modifier_Rouge(Indice, ((Fin_Rouge-Debut_Rouge) * (Indice-Debut))/(Fin-Debut) + Debut_Rouge,Palette);
|
Modifier_Rouge(Indice, ((Fin_Rouge-Debut_Rouge) * (Indice-start))/(end-start) + Debut_Rouge,Palette);
|
||||||
Modifier_Vert (Indice, ((Fin_Vert -Debut_Vert ) * (Indice-Debut))/(Fin-Debut) + Debut_Vert ,Palette);
|
Modifier_Vert (Indice, ((Fin_Vert -Debut_Vert ) * (Indice-start))/(end-start) + Debut_Vert ,Palette);
|
||||||
Modifier_Bleu (Indice, ((Fin_Bleu -Debut_Bleu ) * (Indice-Debut))/(Fin-Debut) + Debut_Bleu ,Palette);
|
Modifier_Bleu (Indice, ((Fin_Bleu -Debut_Bleu ) * (Indice-start))/(end-start) + Debut_Bleu ,Palette);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -691,13 +691,13 @@ void Afficher_les_jauges(T_Bouton_scroller * Jauge_rouge,
|
|||||||
void Palette_Reafficher_jauges(T_Bouton_scroller * Jauge_rouge,
|
void Palette_Reafficher_jauges(T_Bouton_scroller * Jauge_rouge,
|
||||||
T_Bouton_scroller * Jauge_verte,
|
T_Bouton_scroller * Jauge_verte,
|
||||||
T_Bouton_scroller * Jauge_bleue,
|
T_Bouton_scroller * Jauge_bleue,
|
||||||
T_Palette Palette,byte Debut,byte Fin)
|
T_Palette Palette,byte start,byte end)
|
||||||
{
|
{
|
||||||
char Chaine[5];
|
char Chaine[5];
|
||||||
|
|
||||||
Effacer_curseur();
|
Effacer_curseur();
|
||||||
// Réaffichage des jauges:
|
// Réaffichage des jauges:
|
||||||
if (Debut!=Fin)
|
if (start!=end)
|
||||||
{
|
{
|
||||||
// Dans le cas d'un bloc, tout à 0.
|
// Dans le cas d'un bloc, tout à 0.
|
||||||
Jauge_rouge->Position =Color_Max;
|
Jauge_rouge->Position =Color_Max;
|
||||||
@ -716,9 +716,9 @@ void Palette_Reafficher_jauges(T_Bouton_scroller * Jauge_rouge,
|
|||||||
{
|
{
|
||||||
// Dans le cas d'une seule couleur, composantes.
|
// Dans le cas d'une seule couleur, composantes.
|
||||||
byte j1, j2, j3;
|
byte j1, j2, j3;
|
||||||
j1= Palette[Debut].R;
|
j1= Palette[start].R;
|
||||||
j2= Palette[Debut].V;
|
j2= Palette[start].V;
|
||||||
j3= Palette[Debut].B;
|
j3= Palette[start].B;
|
||||||
if (!Palette_mode_RGB)
|
if (!Palette_mode_RGB)
|
||||||
{
|
{
|
||||||
RGBtoHSL(j1,j2,j3,&j1,&j2,&j3);
|
RGBtoHSL(j1,j2,j3,&j1,&j2,&j3);
|
||||||
|
|||||||
34
pxdouble.c
34
pxdouble.c
@ -145,12 +145,12 @@ void Ligne_verticale_XOR_Double(word Pos_X,word Pos_Y,word Hauteur)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Display_brush_Color_Double(word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse)
|
void Display_brush_Color_Double(word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse)
|
||||||
{
|
{
|
||||||
// Dest = Position à l'écran
|
// Dest = Position à l'écran
|
||||||
byte* Dest = Ecran + Pos_Y * 4 * Largeur_ecran + Pos_X * 2;
|
byte* Dest = Ecran + Pos_Y * 4 * Largeur_ecran + Pos_X * 2;
|
||||||
// Src = Position dans la brosse
|
// Src = Position dans la brosse
|
||||||
byte* Src = Brosse + Decalage_Y * Largeur_brosse + Decalage_X;
|
byte* Src = Brosse + y_offset * Largeur_brosse + x_offset;
|
||||||
|
|
||||||
word x,y;
|
word x,y;
|
||||||
|
|
||||||
@ -179,13 +179,13 @@ void Display_brush_Color_Double(word Pos_X,word Pos_Y,word Decalage_X,word Decal
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Display_brush_Mono_Double(word Pos_X, word Pos_Y,
|
void Display_brush_Mono_Double(word Pos_X, word Pos_Y,
|
||||||
word Decalage_X, word Decalage_Y, word Largeur, word Hauteur,
|
word x_offset, word y_offset, word Largeur, word Hauteur,
|
||||||
byte Couleur_de_transparence, byte Couleur, word Largeur_brosse)
|
byte Couleur_de_transparence, byte Couleur, word Largeur_brosse)
|
||||||
/* On affiche la brosse en monochrome */
|
/* On affiche la brosse en monochrome */
|
||||||
{
|
{
|
||||||
byte* Dest=Pos_Y*4*Largeur_ecran+Pos_X*2+Ecran; // Dest = adr destination à
|
byte* Dest=Pos_Y*4*Largeur_ecran+Pos_X*2+Ecran; // Dest = adr destination à
|
||||||
// l'écran
|
// l'écran
|
||||||
byte* Src=Largeur_brosse*Decalage_Y+Decalage_X+Brosse; // Src = adr ds
|
byte* Src=Largeur_brosse*y_offset+x_offset+Brosse; // Src = adr ds
|
||||||
// la brosse
|
// la brosse
|
||||||
int x,y;
|
int x,y;
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ void Display_brush_Mono_Double(word Pos_X, word Pos_Y,
|
|||||||
UpdateRect(Pos_X,Pos_Y,Largeur,Hauteur);
|
UpdateRect(Pos_X,Pos_Y,Largeur,Hauteur);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Clear_brush_Double(word Pos_X,word Pos_Y,__attribute__((unused)) word Decalage_X,__attribute__((unused)) word Decalage_Y,word Largeur,word Hauteur,__attribute__((unused))byte Couleur_de_transparence,word Largeur_image)
|
void Clear_brush_Double(word Pos_X,word Pos_Y,__attribute__((unused)) word x_offset,__attribute__((unused)) word y_offset,word Largeur,word Hauteur,__attribute__((unused))byte Couleur_de_transparence,word Largeur_image)
|
||||||
{
|
{
|
||||||
byte* Dest=Ecran+Pos_X*2+Pos_Y*4*Largeur_ecran; //On va se mettre en 0,0 dans l'écran (Dest)
|
byte* Dest=Ecran+Pos_X*2+Pos_Y*4*Largeur_ecran; //On va se mettre en 0,0 dans l'écran (Dest)
|
||||||
byte* Src = ( Pos_Y + Principal_Decalage_Y ) * Largeur_image + Pos_X + Principal_Decalage_X + Principal_Ecran; //Coords de départ ds la source (Src)
|
byte* Src = ( Pos_Y + Principal_Decalage_Y ) * Largeur_image + Pos_X + Principal_Decalage_X + Principal_Ecran; //Coords de départ ds la source (Src)
|
||||||
@ -238,12 +238,12 @@ void Clear_brush_Double(word Pos_X,word Pos_Y,__attribute__((unused)) word Decal
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Affiche une brosse (arbitraire) à l'écran
|
// Affiche une brosse (arbitraire) à l'écran
|
||||||
void Affiche_brosse_Double(byte * brush, word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse)
|
void Affiche_brosse_Double(byte * brush, word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse)
|
||||||
{
|
{
|
||||||
// Dest = Position à l'écran
|
// Dest = Position à l'écran
|
||||||
byte* Dest = Ecran + Pos_Y * 4 * Largeur_ecran + Pos_X * 2;
|
byte* Dest = Ecran + Pos_Y * 4 * Largeur_ecran + Pos_X * 2;
|
||||||
// Src = Position dans la brosse
|
// Src = Position dans la brosse
|
||||||
byte* Src = brush + Decalage_Y * Largeur_brosse + Decalage_X;
|
byte* Src = brush + y_offset * Largeur_brosse + x_offset;
|
||||||
|
|
||||||
word x,y;
|
word x,y;
|
||||||
|
|
||||||
@ -345,7 +345,7 @@ void Afficher_partie_de_l_ecran_zoomee_Double(
|
|||||||
{
|
{
|
||||||
byte* Src = Principal_Ecran + Loupe_Decalage_Y * Largeur_image
|
byte* Src = Principal_Ecran + Loupe_Decalage_Y * Largeur_image
|
||||||
+ Loupe_Decalage_X;
|
+ Loupe_Decalage_X;
|
||||||
int EDX = 0; // Ligne en cours de traitement
|
int y = 0; // Ligne en cours de traitement
|
||||||
|
|
||||||
// Pour chaque ligne à zoomer
|
// Pour chaque ligne à zoomer
|
||||||
while(1)
|
while(1)
|
||||||
@ -360,12 +360,12 @@ void Afficher_partie_de_l_ecran_zoomee_Double(
|
|||||||
do{
|
do{
|
||||||
// On affiche la ligne zoomée
|
// On affiche la ligne zoomée
|
||||||
Afficher_une_ligne_ecran_fast_Double(
|
Afficher_une_ligne_ecran_fast_Double(
|
||||||
Principal_X_Zoom, EDX, Largeur*Loupe_Facteur,
|
Principal_X_Zoom, y, Largeur*Loupe_Facteur,
|
||||||
Buffer
|
Buffer
|
||||||
);
|
);
|
||||||
// On passe à la suivante
|
// On passe à la suivante
|
||||||
EDX++;
|
y++;
|
||||||
if(EDX==Hauteur/**ZOOMY*/)
|
if(y==Hauteur/**ZOOMY*/)
|
||||||
{
|
{
|
||||||
UpdateRect(Principal_X_Zoom,0,
|
UpdateRect(Principal_X_Zoom,0,
|
||||||
Largeur*Loupe_Facteur,Hauteur);
|
Largeur*Loupe_Facteur,Hauteur);
|
||||||
@ -380,13 +380,13 @@ void Afficher_partie_de_l_ecran_zoomee_Double(
|
|||||||
|
|
||||||
// Affiche une partie de la brosse couleur zoomée
|
// Affiche une partie de la brosse couleur zoomée
|
||||||
void Display_brush_Color_zoom_Double(word Pos_X,word Pos_Y,
|
void Display_brush_Color_zoom_Double(word Pos_X,word Pos_Y,
|
||||||
word Decalage_X,word Decalage_Y,
|
word x_offset,word y_offset,
|
||||||
word Largeur, // Largeur non zoomée
|
word Largeur, // Largeur non zoomée
|
||||||
word Pos_Y_Fin,byte Couleur_de_transparence,
|
word Pos_Y_Fin,byte Couleur_de_transparence,
|
||||||
word Largeur_brosse, // Largeur réelle de la brosse
|
word Largeur_brosse, // Largeur réelle de la brosse
|
||||||
byte * Buffer)
|
byte * Buffer)
|
||||||
{
|
{
|
||||||
byte* Src = Brosse+Decalage_Y*Largeur_brosse + Decalage_X;
|
byte* Src = Brosse+y_offset*Largeur_brosse + x_offset;
|
||||||
word y = Pos_Y;
|
word y = Pos_Y;
|
||||||
byte bx;
|
byte bx;
|
||||||
|
|
||||||
@ -412,7 +412,7 @@ void Display_brush_Color_zoom_Double(word Pos_X,word Pos_Y,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Display_brush_Mono_zoom_Double(word Pos_X, word Pos_Y,
|
void Display_brush_Mono_zoom_Double(word Pos_X, word Pos_Y,
|
||||||
word Decalage_X, word Decalage_Y,
|
word x_offset, word y_offset,
|
||||||
word Largeur, // Largeur non zoomée
|
word Largeur, // Largeur non zoomée
|
||||||
word Pos_Y_Fin,
|
word Pos_Y_Fin,
|
||||||
byte Couleur_de_transparence, byte Couleur,
|
byte Couleur_de_transparence, byte Couleur,
|
||||||
@ -421,7 +421,7 @@ void Display_brush_Mono_zoom_Double(word Pos_X, word Pos_Y,
|
|||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
byte* Src = Brosse + Decalage_Y * Largeur_brosse + Decalage_X;
|
byte* Src = Brosse + y_offset * Largeur_brosse + x_offset;
|
||||||
int y=Pos_Y*ZOOMY;
|
int y=Pos_Y*ZOOMY;
|
||||||
|
|
||||||
//Pour chaque ligne à zoomer :
|
//Pour chaque ligne à zoomer :
|
||||||
@ -462,11 +462,11 @@ void Display_brush_Mono_zoom_Double(word Pos_X, word Pos_Y,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Clear_brush_zoom_Double(word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Pos_Y_Fin,__attribute__((unused)) byte Couleur_de_transparence,word Largeur_image,byte * Buffer)
|
void Clear_brush_zoom_Double(word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Pos_Y_Fin,__attribute__((unused)) byte Couleur_de_transparence,word Largeur_image,byte * Buffer)
|
||||||
{
|
{
|
||||||
|
|
||||||
// En fait on va recopier l'image non zoomée dans la partie zoomée !
|
// En fait on va recopier l'image non zoomée dans la partie zoomée !
|
||||||
byte* Src = Principal_Ecran + Decalage_Y * Largeur_image + Decalage_X;
|
byte* Src = Principal_Ecran + y_offset * Largeur_image + x_offset;
|
||||||
int y = Pos_Y;
|
int y = Pos_Y;
|
||||||
int bx;
|
int bx;
|
||||||
|
|
||||||
|
|||||||
14
pxdouble.h
14
pxdouble.h
@ -28,17 +28,17 @@
|
|||||||
void Pixel_Preview_Loupe_Double (word X,word Y,byte Couleur);
|
void Pixel_Preview_Loupe_Double (word X,word Y,byte Couleur);
|
||||||
void Ligne_horizontale_XOR_Double (word Pos_X,word Pos_Y,word Largeur);
|
void Ligne_horizontale_XOR_Double (word Pos_X,word Pos_Y,word Largeur);
|
||||||
void Ligne_verticale_XOR_Double (word Pos_X,word Pos_Y,word Hauteur);
|
void Ligne_verticale_XOR_Double (word Pos_X,word Pos_Y,word Hauteur);
|
||||||
void Display_brush_Color_Double (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse);
|
void Display_brush_Color_Double (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse);
|
||||||
void Display_brush_Mono_Double (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,byte Couleur,word Largeur_brosse);
|
void Display_brush_Mono_Double (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,byte Couleur,word Largeur_brosse);
|
||||||
void Clear_brush_Double (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_image);
|
void Clear_brush_Double (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_image);
|
||||||
void Remap_screen_Double (word Pos_X,word Pos_Y,word Largeur,word Hauteur,byte * Table_de_conversion);
|
void Remap_screen_Double (word Pos_X,word Pos_Y,word Largeur,word Hauteur,byte * Table_de_conversion);
|
||||||
void Afficher_partie_de_l_ecran_Double (word Largeur,word Hauteur,word Largeur_image);
|
void Afficher_partie_de_l_ecran_Double (word Largeur,word Hauteur,word Largeur_image);
|
||||||
void Afficher_une_ligne_ecran_Double (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
void Afficher_une_ligne_ecran_Double (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
||||||
void Lire_une_ligne_ecran_Double (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
void Lire_une_ligne_ecran_Double (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
||||||
void Afficher_partie_de_l_ecran_zoomee_Double(word Largeur,word Hauteur,word Largeur_image,byte * Buffer);
|
void Afficher_partie_de_l_ecran_zoomee_Double(word Largeur,word Hauteur,word Largeur_image,byte * Buffer);
|
||||||
void Display_brush_Color_zoom_Double (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,word Largeur_brosse,byte * Buffer);
|
void Display_brush_Color_zoom_Double (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,word Largeur_brosse,byte * Buffer);
|
||||||
void Display_brush_Mono_zoom_Double (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,byte Couleur,word Largeur_brosse,byte * Buffer);
|
void Display_brush_Mono_zoom_Double (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,byte Couleur,word Largeur_brosse,byte * Buffer);
|
||||||
void Clear_brush_zoom_Double (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,word Largeur_image,byte * Buffer);
|
void Clear_brush_zoom_Double (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,word Largeur_image,byte * Buffer);
|
||||||
void Affiche_brosse_Double (byte * brush, word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse);
|
void Affiche_brosse_Double (byte * brush, word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse);
|
||||||
|
|
||||||
void Afficher_une_ligne_ecran_fast_Double (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
void Afficher_une_ligne_ecran_fast_Double (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
||||||
|
|||||||
34
pxsimple.c
34
pxsimple.c
@ -130,12 +130,12 @@ void Ligne_verticale_XOR_Simple(word Pos_X,word Pos_Y,word Hauteur)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Display_brush_Color_Simple(word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse)
|
void Display_brush_Color_Simple(word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse)
|
||||||
{
|
{
|
||||||
// Dest = Position à l'écran
|
// Dest = Position à l'écran
|
||||||
byte* Dest = Ecran + Pos_Y * Largeur_ecran + Pos_X;
|
byte* Dest = Ecran + Pos_Y * Largeur_ecran + Pos_X;
|
||||||
// Src = Position dans la brosse
|
// Src = Position dans la brosse
|
||||||
byte* Src = Brosse + Decalage_Y * Largeur_brosse + Decalage_X;
|
byte* Src = Brosse + y_offset * Largeur_brosse + x_offset;
|
||||||
|
|
||||||
word x,y;
|
word x,y;
|
||||||
|
|
||||||
@ -163,13 +163,13 @@ void Display_brush_Color_Simple(word Pos_X,word Pos_Y,word Decalage_X,word Decal
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Display_brush_Mono_Simple(word Pos_X, word Pos_Y,
|
void Display_brush_Mono_Simple(word Pos_X, word Pos_Y,
|
||||||
word Decalage_X, word Decalage_Y, word Largeur, word Hauteur,
|
word x_offset, word y_offset, word Largeur, word Hauteur,
|
||||||
byte Couleur_de_transparence, byte Couleur, word Largeur_brosse)
|
byte Couleur_de_transparence, byte Couleur, word Largeur_brosse)
|
||||||
/* On affiche la brosse en monochrome */
|
/* On affiche la brosse en monochrome */
|
||||||
{
|
{
|
||||||
byte* Dest=Pos_Y*Largeur_ecran+Pos_X+Ecran; // Dest = adr Destination à
|
byte* Dest=Pos_Y*Largeur_ecran+Pos_X+Ecran; // Dest = adr Destination à
|
||||||
// l'écran
|
// l'écran
|
||||||
byte* Src=Largeur_brosse*Decalage_Y+Decalage_X+Brosse; // Src = adr ds
|
byte* Src=Largeur_brosse*y_offset+x_offset+Brosse; // Src = adr ds
|
||||||
// la brosse
|
// la brosse
|
||||||
int x,y;
|
int x,y;
|
||||||
|
|
||||||
@ -194,7 +194,7 @@ void Display_brush_Mono_Simple(word Pos_X, word Pos_Y,
|
|||||||
UpdateRect(Pos_X,Pos_Y,Largeur,Hauteur);
|
UpdateRect(Pos_X,Pos_Y,Largeur,Hauteur);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Clear_brush_Simple(word Pos_X,word Pos_Y,__attribute__((unused)) word Decalage_X,__attribute__((unused)) word Decalage_Y,word Largeur,word Hauteur,__attribute__((unused))byte Couleur_de_transparence,word Largeur_image)
|
void Clear_brush_Simple(word Pos_X,word Pos_Y,__attribute__((unused)) word x_offset,__attribute__((unused)) word y_offset,word Largeur,word Hauteur,__attribute__((unused))byte Couleur_de_transparence,word Largeur_image)
|
||||||
{
|
{
|
||||||
byte* Dest=Ecran+Pos_X+Pos_Y*Largeur_ecran; //On va se mettre en 0,0 dans l'écran (Dest)
|
byte* Dest=Ecran+Pos_X+Pos_Y*Largeur_ecran; //On va se mettre en 0,0 dans l'écran (Dest)
|
||||||
byte* Src = ( Pos_Y + Principal_Decalage_Y ) * Largeur_image + Pos_X + Principal_Decalage_X + Principal_Ecran; //Coords de départ ds la source (Src)
|
byte* Src = ( Pos_Y + Principal_Decalage_Y ) * Largeur_image + Pos_X + Principal_Decalage_X + Principal_Ecran; //Coords de départ ds la source (Src)
|
||||||
@ -214,12 +214,12 @@ void Clear_brush_Simple(word Pos_X,word Pos_Y,__attribute__((unused)) word Decal
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Affiche une brosse (arbitraire) à l'écran
|
// Affiche une brosse (arbitraire) à l'écran
|
||||||
void Affiche_brosse_Simple(byte * brush, word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse)
|
void Affiche_brosse_Simple(byte * brush, word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse)
|
||||||
{
|
{
|
||||||
// Dest = Position à l'écran
|
// Dest = Position à l'écran
|
||||||
byte* Dest = Ecran + Pos_Y * Largeur_ecran + Pos_X;
|
byte* Dest = Ecran + Pos_Y * Largeur_ecran + Pos_X;
|
||||||
// Src = Position dans la brosse
|
// Src = Position dans la brosse
|
||||||
byte* Src = brush + Decalage_Y * Largeur_brosse + Decalage_X;
|
byte* Src = brush + y_offset * Largeur_brosse + x_offset;
|
||||||
|
|
||||||
word x,y;
|
word x,y;
|
||||||
|
|
||||||
@ -303,7 +303,7 @@ void Afficher_partie_de_l_ecran_zoomee_Simple(
|
|||||||
{
|
{
|
||||||
byte* Src = Principal_Ecran + Loupe_Decalage_Y * Largeur_image
|
byte* Src = Principal_Ecran + Loupe_Decalage_Y * Largeur_image
|
||||||
+ Loupe_Decalage_X;
|
+ Loupe_Decalage_X;
|
||||||
int EDX = 0; // Ligne en cours de traitement
|
int y = 0; // Ligne en cours de traitement
|
||||||
|
|
||||||
// Pour chaque ligne à zoomer
|
// Pour chaque ligne à zoomer
|
||||||
while(1)
|
while(1)
|
||||||
@ -318,12 +318,12 @@ void Afficher_partie_de_l_ecran_zoomee_Simple(
|
|||||||
do{
|
do{
|
||||||
// On affiche la ligne zoomée
|
// On affiche la ligne zoomée
|
||||||
Afficher_une_ligne_ecran_Simple(
|
Afficher_une_ligne_ecran_Simple(
|
||||||
Principal_X_Zoom, EDX, Largeur*Loupe_Facteur,
|
Principal_X_Zoom, y, Largeur*Loupe_Facteur,
|
||||||
Buffer
|
Buffer
|
||||||
);
|
);
|
||||||
// On passe à la suivante
|
// On passe à la suivante
|
||||||
EDX++;
|
y++;
|
||||||
if(EDX==Hauteur)
|
if(y==Hauteur)
|
||||||
{
|
{
|
||||||
UpdateRect(Principal_X_Zoom,0,
|
UpdateRect(Principal_X_Zoom,0,
|
||||||
Largeur*Loupe_Facteur,Hauteur);
|
Largeur*Loupe_Facteur,Hauteur);
|
||||||
@ -355,13 +355,13 @@ void Afficher_une_ligne_transparente_a_l_ecran_Simple(word Pos_X,word Pos_Y,word
|
|||||||
|
|
||||||
// Affiche une partie de la brosse couleur zoomée
|
// Affiche une partie de la brosse couleur zoomée
|
||||||
void Display_brush_Color_zoom_Simple(word Pos_X,word Pos_Y,
|
void Display_brush_Color_zoom_Simple(word Pos_X,word Pos_Y,
|
||||||
word Decalage_X,word Decalage_Y,
|
word x_offset,word y_offset,
|
||||||
word Largeur, // Largeur non zoomée
|
word Largeur, // Largeur non zoomée
|
||||||
word Pos_Y_Fin,byte Couleur_de_transparence,
|
word Pos_Y_Fin,byte Couleur_de_transparence,
|
||||||
word Largeur_brosse, // Largeur réelle de la brosse
|
word Largeur_brosse, // Largeur réelle de la brosse
|
||||||
byte * Buffer)
|
byte * Buffer)
|
||||||
{
|
{
|
||||||
byte* Src = Brosse+Decalage_Y*Largeur_brosse + Decalage_X;
|
byte* Src = Brosse+y_offset*Largeur_brosse + x_offset;
|
||||||
word y = Pos_Y;
|
word y = Pos_Y;
|
||||||
byte bx;
|
byte bx;
|
||||||
|
|
||||||
@ -385,7 +385,7 @@ void Display_brush_Color_zoom_Simple(word Pos_X,word Pos_Y,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Display_brush_Mono_zoom_Simple(word Pos_X, word Pos_Y,
|
void Display_brush_Mono_zoom_Simple(word Pos_X, word Pos_Y,
|
||||||
word Decalage_X, word Decalage_Y,
|
word x_offset, word y_offset,
|
||||||
word Largeur, // Largeur non zoomée
|
word Largeur, // Largeur non zoomée
|
||||||
word Pos_Y_Fin,
|
word Pos_Y_Fin,
|
||||||
byte Couleur_de_transparence, byte Couleur,
|
byte Couleur_de_transparence, byte Couleur,
|
||||||
@ -394,7 +394,7 @@ void Display_brush_Mono_zoom_Simple(word Pos_X, word Pos_Y,
|
|||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
byte* Src = Brosse + Decalage_Y * Largeur_brosse + Decalage_X;
|
byte* Src = Brosse + y_offset * Largeur_brosse + x_offset;
|
||||||
int y=Pos_Y;
|
int y=Pos_Y;
|
||||||
|
|
||||||
//Pour chaque ligne à zoomer :
|
//Pour chaque ligne à zoomer :
|
||||||
@ -435,10 +435,10 @@ void Display_brush_Mono_zoom_Simple(word Pos_X, word Pos_Y,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Clear_brush_zoom_Simple(word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Pos_Y_Fin,__attribute__((unused)) byte Couleur_de_transparence,word Largeur_image,byte * Buffer)
|
void Clear_brush_zoom_Simple(word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Pos_Y_Fin,__attribute__((unused)) byte Couleur_de_transparence,word Largeur_image,byte * Buffer)
|
||||||
{
|
{
|
||||||
// En fait on va recopier l'image non zoomée dans la partie zoomée !
|
// En fait on va recopier l'image non zoomée dans la partie zoomée !
|
||||||
byte* Src = Principal_Ecran + Decalage_Y * Largeur_image + Decalage_X;
|
byte* Src = Principal_Ecran + y_offset * Largeur_image + x_offset;
|
||||||
int y = Pos_Y;
|
int y = Pos_Y;
|
||||||
int bx;
|
int bx;
|
||||||
|
|
||||||
|
|||||||
14
pxsimple.h
14
pxsimple.h
@ -28,18 +28,18 @@
|
|||||||
void Pixel_Preview_Loupe_Simple (word X,word Y,byte Couleur);
|
void Pixel_Preview_Loupe_Simple (word X,word Y,byte Couleur);
|
||||||
void Ligne_horizontale_XOR_Simple (word Pos_X,word Pos_Y,word Largeur);
|
void Ligne_horizontale_XOR_Simple (word Pos_X,word Pos_Y,word Largeur);
|
||||||
void Ligne_verticale_XOR_Simple (word Pos_X,word Pos_Y,word Hauteur);
|
void Ligne_verticale_XOR_Simple (word Pos_X,word Pos_Y,word Hauteur);
|
||||||
void Display_brush_Color_Simple (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse);
|
void Display_brush_Color_Simple (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse);
|
||||||
void Display_brush_Mono_Simple (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,byte Couleur,word Largeur_brosse);
|
void Display_brush_Mono_Simple (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,byte Couleur,word Largeur_brosse);
|
||||||
void Clear_brush_Simple (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_image);
|
void Clear_brush_Simple (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_image);
|
||||||
void Remap_screen_Simple (word Pos_X,word Pos_Y,word Largeur,word Hauteur,byte * Table_de_conversion);
|
void Remap_screen_Simple (word Pos_X,word Pos_Y,word Largeur,word Hauteur,byte * Table_de_conversion);
|
||||||
void Afficher_partie_de_l_ecran_Simple (word Largeur,word Hauteur,word Largeur_image);
|
void Afficher_partie_de_l_ecran_Simple (word Largeur,word Hauteur,word Largeur_image);
|
||||||
void Afficher_une_ligne_ecran_Simple (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
void Afficher_une_ligne_ecran_Simple (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
||||||
void Lire_une_ligne_ecran_Simple (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
void Lire_une_ligne_ecran_Simple (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
||||||
void Afficher_partie_de_l_ecran_zoomee_Simple(word Largeur,word Hauteur,word Largeur_image,byte * Buffer);
|
void Afficher_partie_de_l_ecran_zoomee_Simple(word Largeur,word Hauteur,word Largeur_image,byte * Buffer);
|
||||||
void Display_brush_Color_zoom_Simple (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,word Largeur_brosse,byte * Buffer);
|
void Display_brush_Color_zoom_Simple (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,word Largeur_brosse,byte * Buffer);
|
||||||
void Display_brush_Mono_zoom_Simple (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,byte Couleur,word Largeur_brosse,byte * Buffer);
|
void Display_brush_Mono_zoom_Simple (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,byte Couleur,word Largeur_brosse,byte * Buffer);
|
||||||
void Clear_brush_zoom_Simple (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,word Largeur_image,byte * Buffer);
|
void Clear_brush_zoom_Simple (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,word Largeur_image,byte * Buffer);
|
||||||
void Affiche_brosse_Simple (byte * brush, word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse);
|
void Affiche_brosse_Simple (byte * brush, word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse);
|
||||||
|
|
||||||
void Afficher_une_ligne_transparente_mono_a_l_ecran_Simple(
|
void Afficher_une_ligne_transparente_mono_a_l_ecran_Simple(
|
||||||
word Pos_X, word Pos_Y, word Largeur, byte* Ligne,
|
word Pos_X, word Pos_Y, word Largeur, byte* Ligne,
|
||||||
|
|||||||
34
pxtall.c
34
pxtall.c
@ -138,12 +138,12 @@ void Ligne_verticale_XOR_Tall(word Pos_X,word Pos_Y,word Hauteur)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Display_brush_Color_Tall(word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse)
|
void Display_brush_Color_Tall(word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse)
|
||||||
{
|
{
|
||||||
// Dest = Position à l'écran
|
// Dest = Position à l'écran
|
||||||
byte* Dest = Ecran + Pos_Y * 2 * Largeur_ecran + Pos_X;
|
byte* Dest = Ecran + Pos_Y * 2 * Largeur_ecran + Pos_X;
|
||||||
// Src = Position dans la brosse
|
// Src = Position dans la brosse
|
||||||
byte* Src = Brosse + Decalage_Y * Largeur_brosse + Decalage_X;
|
byte* Src = Brosse + y_offset * Largeur_brosse + x_offset;
|
||||||
|
|
||||||
word x,y;
|
word x,y;
|
||||||
|
|
||||||
@ -172,13 +172,13 @@ void Display_brush_Color_Tall(word Pos_X,word Pos_Y,word Decalage_X,word Decalag
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Display_brush_Mono_Tall(word Pos_X, word Pos_Y,
|
void Display_brush_Mono_Tall(word Pos_X, word Pos_Y,
|
||||||
word Decalage_X, word Decalage_Y, word Largeur, word Hauteur,
|
word x_offset, word y_offset, word Largeur, word Hauteur,
|
||||||
byte Couleur_de_transparence, byte Couleur, word Largeur_brosse)
|
byte Couleur_de_transparence, byte Couleur, word Largeur_brosse)
|
||||||
/* On affiche la brosse en monochrome */
|
/* On affiche la brosse en monochrome */
|
||||||
{
|
{
|
||||||
byte* Dest=Pos_Y*2*Largeur_ecran+Pos_X+Ecran; // Dest = adr Destination à
|
byte* Dest=Pos_Y*2*Largeur_ecran+Pos_X+Ecran; // Dest = adr Destination à
|
||||||
// l'écran
|
// l'écran
|
||||||
byte* Src=Largeur_brosse*Decalage_Y+Decalage_X+Brosse; // Src = adr ds
|
byte* Src=Largeur_brosse*y_offset+x_offset+Brosse; // Src = adr ds
|
||||||
// la brosse
|
// la brosse
|
||||||
int x,y;
|
int x,y;
|
||||||
|
|
||||||
@ -206,7 +206,7 @@ void Display_brush_Mono_Tall(word Pos_X, word Pos_Y,
|
|||||||
UpdateRect(Pos_X,Pos_Y,Largeur,Hauteur);
|
UpdateRect(Pos_X,Pos_Y,Largeur,Hauteur);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Clear_brush_Tall(word Pos_X,word Pos_Y,__attribute__((unused)) word Decalage_X,__attribute__((unused)) word Decalage_Y,word Largeur,word Hauteur,__attribute__((unused))byte Couleur_de_transparence,word Largeur_image)
|
void Clear_brush_Tall(word Pos_X,word Pos_Y,__attribute__((unused)) word x_offset,__attribute__((unused)) word y_offset,word Largeur,word Hauteur,__attribute__((unused))byte Couleur_de_transparence,word Largeur_image)
|
||||||
{
|
{
|
||||||
byte* Dest=Ecran+Pos_X+Pos_Y*2*Largeur_ecran; //On va se mettre en 0,0 dans l'écran (Dest)
|
byte* Dest=Ecran+Pos_X+Pos_Y*2*Largeur_ecran; //On va se mettre en 0,0 dans l'écran (Dest)
|
||||||
byte* Src = ( Pos_Y + Principal_Decalage_Y ) * Largeur_image + Pos_X + Principal_Decalage_X + Principal_Ecran; //Coords de départ ds la source (Src)
|
byte* Src = ( Pos_Y + Principal_Decalage_Y ) * Largeur_image + Pos_X + Principal_Decalage_X + Principal_Ecran; //Coords de départ ds la source (Src)
|
||||||
@ -228,12 +228,12 @@ void Clear_brush_Tall(word Pos_X,word Pos_Y,__attribute__((unused)) word Decalag
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Affiche une brosse (arbitraire) à l'écran
|
// Affiche une brosse (arbitraire) à l'écran
|
||||||
void Affiche_brosse_Tall(byte * brush, word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse)
|
void Affiche_brosse_Tall(byte * brush, word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse)
|
||||||
{
|
{
|
||||||
// Dest = Position à l'écran
|
// Dest = Position à l'écran
|
||||||
byte* Dest = Ecran + Pos_Y * 2 * Largeur_ecran + Pos_X;
|
byte* Dest = Ecran + Pos_Y * 2 * Largeur_ecran + Pos_X;
|
||||||
// Src = Position dans la brosse
|
// Src = Position dans la brosse
|
||||||
byte* Src = brush + Decalage_Y * Largeur_brosse + Decalage_X;
|
byte* Src = brush + y_offset * Largeur_brosse + x_offset;
|
||||||
|
|
||||||
word x,y;
|
word x,y;
|
||||||
|
|
||||||
@ -301,7 +301,7 @@ void Afficher_partie_de_l_ecran_zoomee_Tall(
|
|||||||
{
|
{
|
||||||
byte* Src = Principal_Ecran + Loupe_Decalage_Y * Largeur_image
|
byte* Src = Principal_Ecran + Loupe_Decalage_Y * Largeur_image
|
||||||
+ Loupe_Decalage_X;
|
+ Loupe_Decalage_X;
|
||||||
int EDX = 0; // Ligne en cours de traitement
|
int y = 0; // Ligne en cours de traitement
|
||||||
|
|
||||||
// Pour chaque ligne à zoomer
|
// Pour chaque ligne à zoomer
|
||||||
while(1)
|
while(1)
|
||||||
@ -316,12 +316,12 @@ void Afficher_partie_de_l_ecran_zoomee_Tall(
|
|||||||
do{
|
do{
|
||||||
// On affiche la ligne zoomée
|
// On affiche la ligne zoomée
|
||||||
Afficher_une_ligne_ecran_Simple(
|
Afficher_une_ligne_ecran_Simple(
|
||||||
Principal_X_Zoom, EDX, Largeur*Loupe_Facteur,
|
Principal_X_Zoom, y, Largeur*Loupe_Facteur,
|
||||||
Buffer
|
Buffer
|
||||||
);
|
);
|
||||||
// On passe à la suivante
|
// On passe à la suivante
|
||||||
EDX++;
|
y++;
|
||||||
if(EDX==Hauteur*2)
|
if(y==Hauteur*2)
|
||||||
{
|
{
|
||||||
UpdateRect(Principal_X_Zoom,0,
|
UpdateRect(Principal_X_Zoom,0,
|
||||||
Largeur*Loupe_Facteur,Hauteur);
|
Largeur*Loupe_Facteur,Hauteur);
|
||||||
@ -336,13 +336,13 @@ void Afficher_partie_de_l_ecran_zoomee_Tall(
|
|||||||
|
|
||||||
// Affiche une partie de la brosse couleur zoomée
|
// Affiche une partie de la brosse couleur zoomée
|
||||||
void Display_brush_Color_zoom_Tall(word Pos_X,word Pos_Y,
|
void Display_brush_Color_zoom_Tall(word Pos_X,word Pos_Y,
|
||||||
word Decalage_X,word Decalage_Y,
|
word x_offset,word y_offset,
|
||||||
word Largeur, // Largeur non zoomée
|
word Largeur, // Largeur non zoomée
|
||||||
word Pos_Y_Fin,byte Couleur_de_transparence,
|
word Pos_Y_Fin,byte Couleur_de_transparence,
|
||||||
word Largeur_brosse, // Largeur réelle de la brosse
|
word Largeur_brosse, // Largeur réelle de la brosse
|
||||||
byte * Buffer)
|
byte * Buffer)
|
||||||
{
|
{
|
||||||
byte* Src = Brosse+Decalage_Y*Largeur_brosse + Decalage_X;
|
byte* Src = Brosse+y_offset*Largeur_brosse + x_offset;
|
||||||
word y = Pos_Y;
|
word y = Pos_Y;
|
||||||
byte bx;
|
byte bx;
|
||||||
|
|
||||||
@ -367,7 +367,7 @@ void Display_brush_Color_zoom_Tall(word Pos_X,word Pos_Y,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Display_brush_Mono_zoom_Tall(word Pos_X, word Pos_Y,
|
void Display_brush_Mono_zoom_Tall(word Pos_X, word Pos_Y,
|
||||||
word Decalage_X, word Decalage_Y,
|
word x_offset, word y_offset,
|
||||||
word Largeur, // Largeur non zoomée
|
word Largeur, // Largeur non zoomée
|
||||||
word Pos_Y_Fin,
|
word Pos_Y_Fin,
|
||||||
byte Couleur_de_transparence, byte Couleur,
|
byte Couleur_de_transparence, byte Couleur,
|
||||||
@ -376,7 +376,7 @@ void Display_brush_Mono_zoom_Tall(word Pos_X, word Pos_Y,
|
|||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
byte* Src = Brosse + Decalage_Y * Largeur_brosse + Decalage_X;
|
byte* Src = Brosse + y_offset * Largeur_brosse + x_offset;
|
||||||
int y=Pos_Y*2;
|
int y=Pos_Y*2;
|
||||||
|
|
||||||
//Pour chaque ligne à zoomer :
|
//Pour chaque ligne à zoomer :
|
||||||
@ -417,10 +417,10 @@ void Display_brush_Mono_zoom_Tall(word Pos_X, word Pos_Y,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Clear_brush_zoom_Tall(word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Pos_Y_Fin,__attribute__((unused)) byte Couleur_de_transparence,word Largeur_image,byte * Buffer)
|
void Clear_brush_zoom_Tall(word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Pos_Y_Fin,__attribute__((unused)) byte Couleur_de_transparence,word Largeur_image,byte * Buffer)
|
||||||
{
|
{
|
||||||
// En fait on va recopier l'image non zoomée dans la partie zoomée !
|
// En fait on va recopier l'image non zoomée dans la partie zoomée !
|
||||||
byte* Src = Principal_Ecran + Decalage_Y * Largeur_image + Decalage_X;
|
byte* Src = Principal_Ecran + y_offset * Largeur_image + x_offset;
|
||||||
int y = Pos_Y;
|
int y = Pos_Y;
|
||||||
int bx;
|
int bx;
|
||||||
|
|
||||||
|
|||||||
14
pxtall.h
14
pxtall.h
@ -28,15 +28,15 @@
|
|||||||
void Pixel_Preview_Loupe_Tall (word X,word Y,byte Couleur);
|
void Pixel_Preview_Loupe_Tall (word X,word Y,byte Couleur);
|
||||||
void Ligne_horizontale_XOR_Tall (word Pos_X,word Pos_Y,word Largeur);
|
void Ligne_horizontale_XOR_Tall (word Pos_X,word Pos_Y,word Largeur);
|
||||||
void Ligne_verticale_XOR_Tall (word Pos_X,word Pos_Y,word Hauteur);
|
void Ligne_verticale_XOR_Tall (word Pos_X,word Pos_Y,word Hauteur);
|
||||||
void Display_brush_Color_Tall (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse);
|
void Display_brush_Color_Tall (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse);
|
||||||
void Display_brush_Mono_Tall (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,byte Couleur,word Largeur_brosse);
|
void Display_brush_Mono_Tall (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,byte Couleur,word Largeur_brosse);
|
||||||
void Clear_brush_Tall (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_image);
|
void Clear_brush_Tall (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_image);
|
||||||
void Remap_screen_Tall (word Pos_X,word Pos_Y,word Largeur,word Hauteur,byte * Table_de_conversion);
|
void Remap_screen_Tall (word Pos_X,word Pos_Y,word Largeur,word Hauteur,byte * Table_de_conversion);
|
||||||
void Afficher_partie_de_l_ecran_Tall (word Largeur,word Hauteur,word Largeur_image);
|
void Afficher_partie_de_l_ecran_Tall (word Largeur,word Hauteur,word Largeur_image);
|
||||||
void Afficher_une_ligne_ecran_Tall (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
void Afficher_une_ligne_ecran_Tall (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
||||||
void Lire_une_ligne_ecran_Tall (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
void Lire_une_ligne_ecran_Tall (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
||||||
void Afficher_partie_de_l_ecran_zoomee_Tall(word Largeur,word Hauteur,word Largeur_image,byte * Buffer);
|
void Afficher_partie_de_l_ecran_zoomee_Tall(word Largeur,word Hauteur,word Largeur_image,byte * Buffer);
|
||||||
void Display_brush_Color_zoom_Tall (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,word Largeur_brosse,byte * Buffer);
|
void Display_brush_Color_zoom_Tall (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,word Largeur_brosse,byte * Buffer);
|
||||||
void Display_brush_Mono_zoom_Tall (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,byte Couleur,word Largeur_brosse,byte * Buffer);
|
void Display_brush_Mono_zoom_Tall (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,byte Couleur,word Largeur_brosse,byte * Buffer);
|
||||||
void Clear_brush_zoom_Tall (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,word Largeur_image,byte * Buffer);
|
void Clear_brush_zoom_Tall (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,word Largeur_image,byte * Buffer);
|
||||||
void Affiche_brosse_Tall (byte * brush, word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse);
|
void Affiche_brosse_Tall (byte * brush, word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse);
|
||||||
|
|||||||
34
pxwide.c
34
pxwide.c
@ -140,12 +140,12 @@ void Ligne_verticale_XOR_Wide(word Pos_X,word Pos_Y,word Hauteur)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Display_brush_Color_Wide(word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse)
|
void Display_brush_Color_Wide(word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse)
|
||||||
{
|
{
|
||||||
// Dest = Position à l'écran
|
// Dest = Position à l'écran
|
||||||
byte* Dest = Ecran + Pos_Y * 2 * Largeur_ecran + Pos_X * 2;
|
byte* Dest = Ecran + Pos_Y * 2 * Largeur_ecran + Pos_X * 2;
|
||||||
// Src = Position dans la brosse
|
// Src = Position dans la brosse
|
||||||
byte* Src = Brosse + Decalage_Y * Largeur_brosse + Decalage_X;
|
byte* Src = Brosse + y_offset * Largeur_brosse + x_offset;
|
||||||
|
|
||||||
word x,y;
|
word x,y;
|
||||||
|
|
||||||
@ -174,13 +174,13 @@ void Display_brush_Color_Wide(word Pos_X,word Pos_Y,word Decalage_X,word Decalag
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Display_brush_Mono_Wide(word Pos_X, word Pos_Y,
|
void Display_brush_Mono_Wide(word Pos_X, word Pos_Y,
|
||||||
word Decalage_X, word Decalage_Y, word Largeur, word Hauteur,
|
word x_offset, word y_offset, word Largeur, word Hauteur,
|
||||||
byte Couleur_de_transparence, byte Couleur, word Largeur_brosse)
|
byte Couleur_de_transparence, byte Couleur, word Largeur_brosse)
|
||||||
/* On affiche la brosse en monochrome */
|
/* On affiche la brosse en monochrome */
|
||||||
{
|
{
|
||||||
byte* Dest=Pos_Y*2*Largeur_ecran+Pos_X*2+Ecran; // Dest = adr Destination à
|
byte* Dest=Pos_Y*2*Largeur_ecran+Pos_X*2+Ecran; // Dest = adr Destination à
|
||||||
// l'écran
|
// l'écran
|
||||||
byte* Src=Largeur_brosse*Decalage_Y+Decalage_X+Brosse; // Src = adr ds
|
byte* Src=Largeur_brosse*y_offset+x_offset+Brosse; // Src = adr ds
|
||||||
// la brosse
|
// la brosse
|
||||||
int x,y;
|
int x,y;
|
||||||
|
|
||||||
@ -205,7 +205,7 @@ void Display_brush_Mono_Wide(word Pos_X, word Pos_Y,
|
|||||||
UpdateRect(Pos_X,Pos_Y,Largeur,Hauteur);
|
UpdateRect(Pos_X,Pos_Y,Largeur,Hauteur);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Clear_brush_Wide(word Pos_X,word Pos_Y,__attribute__((unused)) word Decalage_X,__attribute__((unused)) word Decalage_Y,word Largeur,word Hauteur,__attribute__((unused))byte Couleur_de_transparence,word Largeur_image)
|
void Clear_brush_Wide(word Pos_X,word Pos_Y,__attribute__((unused)) word x_offset,__attribute__((unused)) word y_offset,word Largeur,word Hauteur,__attribute__((unused))byte Couleur_de_transparence,word Largeur_image)
|
||||||
{
|
{
|
||||||
byte* Dest=Ecran+Pos_X*2+Pos_Y*2*Largeur_ecran; //On va se mettre en 0,0 dans l'écran (Dest)
|
byte* Dest=Ecran+Pos_X*2+Pos_Y*2*Largeur_ecran; //On va se mettre en 0,0 dans l'écran (Dest)
|
||||||
byte* Src = ( Pos_Y + Principal_Decalage_Y ) * Largeur_image + Pos_X + Principal_Decalage_X + Principal_Ecran; //Coords de départ ds la source (Src)
|
byte* Src = ( Pos_Y + Principal_Decalage_Y ) * Largeur_image + Pos_X + Principal_Decalage_X + Principal_Ecran; //Coords de départ ds la source (Src)
|
||||||
@ -233,12 +233,12 @@ void Clear_brush_Wide(word Pos_X,word Pos_Y,__attribute__((unused)) word Decalag
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Affiche une brosse (arbitraire) à l'écran
|
// Affiche une brosse (arbitraire) à l'écran
|
||||||
void Affiche_brosse_Wide(byte * brush, word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse)
|
void Affiche_brosse_Wide(byte * brush, word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse)
|
||||||
{
|
{
|
||||||
// Dest = Position à l'écran
|
// Dest = Position à l'écran
|
||||||
byte* Dest = Ecran + Pos_Y * 2 * Largeur_ecran + Pos_X * 2;
|
byte* Dest = Ecran + Pos_Y * 2 * Largeur_ecran + Pos_X * 2;
|
||||||
// Src = Position dans la brosse
|
// Src = Position dans la brosse
|
||||||
byte* Src = brush + Decalage_Y * Largeur_brosse + Decalage_X;
|
byte* Src = brush + y_offset * Largeur_brosse + x_offset;
|
||||||
|
|
||||||
word x,y;
|
word x,y;
|
||||||
|
|
||||||
@ -341,7 +341,7 @@ void Afficher_partie_de_l_ecran_zoomee_Wide(
|
|||||||
{
|
{
|
||||||
byte* Src = Principal_Ecran + Loupe_Decalage_Y * Largeur_image
|
byte* Src = Principal_Ecran + Loupe_Decalage_Y * Largeur_image
|
||||||
+ Loupe_Decalage_X;
|
+ Loupe_Decalage_X;
|
||||||
int EDX = 0; // Ligne en cours de traitement
|
int y = 0; // Ligne en cours de traitement
|
||||||
|
|
||||||
// Pour chaque ligne à zoomer
|
// Pour chaque ligne à zoomer
|
||||||
while(1)
|
while(1)
|
||||||
@ -356,12 +356,12 @@ void Afficher_partie_de_l_ecran_zoomee_Wide(
|
|||||||
do{
|
do{
|
||||||
// On affiche la ligne zoomée
|
// On affiche la ligne zoomée
|
||||||
Afficher_une_ligne_ecran_fast_Wide(
|
Afficher_une_ligne_ecran_fast_Wide(
|
||||||
Principal_X_Zoom, EDX, Largeur*Loupe_Facteur,
|
Principal_X_Zoom, y, Largeur*Loupe_Facteur,
|
||||||
Buffer
|
Buffer
|
||||||
);
|
);
|
||||||
// On passe à la suivante
|
// On passe à la suivante
|
||||||
EDX++;
|
y++;
|
||||||
if(EDX==Hauteur)
|
if(y==Hauteur)
|
||||||
{
|
{
|
||||||
UpdateRect(Principal_X_Zoom,0,
|
UpdateRect(Principal_X_Zoom,0,
|
||||||
Largeur*Loupe_Facteur,Hauteur);
|
Largeur*Loupe_Facteur,Hauteur);
|
||||||
@ -396,13 +396,13 @@ void Afficher_une_ligne_transparente_a_l_ecran_Wide(word Pos_X,word Pos_Y,word L
|
|||||||
|
|
||||||
// Affiche une partie de la brosse couleur zoomée
|
// Affiche une partie de la brosse couleur zoomée
|
||||||
void Display_brush_Color_zoom_Wide(word Pos_X,word Pos_Y,
|
void Display_brush_Color_zoom_Wide(word Pos_X,word Pos_Y,
|
||||||
word Decalage_X,word Decalage_Y,
|
word x_offset,word y_offset,
|
||||||
word Largeur, // Largeur non zoomée
|
word Largeur, // Largeur non zoomée
|
||||||
word Pos_Y_Fin,byte Couleur_de_transparence,
|
word Pos_Y_Fin,byte Couleur_de_transparence,
|
||||||
word Largeur_brosse, // Largeur réelle de la brosse
|
word Largeur_brosse, // Largeur réelle de la brosse
|
||||||
byte * Buffer)
|
byte * Buffer)
|
||||||
{
|
{
|
||||||
byte* Src = Brosse+Decalage_Y*Largeur_brosse + Decalage_X;
|
byte* Src = Brosse+y_offset*Largeur_brosse + x_offset;
|
||||||
word y = Pos_Y;
|
word y = Pos_Y;
|
||||||
byte bx;
|
byte bx;
|
||||||
|
|
||||||
@ -426,7 +426,7 @@ void Display_brush_Color_zoom_Wide(word Pos_X,word Pos_Y,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Display_brush_Mono_zoom_Wide(word Pos_X, word Pos_Y,
|
void Display_brush_Mono_zoom_Wide(word Pos_X, word Pos_Y,
|
||||||
word Decalage_X, word Decalage_Y,
|
word x_offset, word y_offset,
|
||||||
word Largeur, // Largeur non zoomée
|
word Largeur, // Largeur non zoomée
|
||||||
word Pos_Y_Fin,
|
word Pos_Y_Fin,
|
||||||
byte Couleur_de_transparence, byte Couleur,
|
byte Couleur_de_transparence, byte Couleur,
|
||||||
@ -435,7 +435,7 @@ void Display_brush_Mono_zoom_Wide(word Pos_X, word Pos_Y,
|
|||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
byte* Src = Brosse + Decalage_Y * Largeur_brosse + Decalage_X;
|
byte* Src = Brosse + y_offset * Largeur_brosse + x_offset;
|
||||||
int y=Pos_Y;
|
int y=Pos_Y;
|
||||||
|
|
||||||
//Pour chaque ligne à zoomer :
|
//Pour chaque ligne à zoomer :
|
||||||
@ -476,10 +476,10 @@ void Display_brush_Mono_zoom_Wide(word Pos_X, word Pos_Y,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Clear_brush_zoom_Wide(word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Pos_Y_Fin,__attribute__((unused)) byte Couleur_de_transparence,word Largeur_image,byte * Buffer)
|
void Clear_brush_zoom_Wide(word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Pos_Y_Fin,__attribute__((unused)) byte Couleur_de_transparence,word Largeur_image,byte * Buffer)
|
||||||
{
|
{
|
||||||
// En fait on va recopier l'image non zoomée dans la partie zoomée !
|
// En fait on va recopier l'image non zoomée dans la partie zoomée !
|
||||||
byte* Src = Principal_Ecran + Decalage_Y * Largeur_image + Decalage_X;
|
byte* Src = Principal_Ecran + y_offset * Largeur_image + x_offset;
|
||||||
int y = Pos_Y;
|
int y = Pos_Y;
|
||||||
int bx;
|
int bx;
|
||||||
|
|
||||||
|
|||||||
14
pxwide.h
14
pxwide.h
@ -28,18 +28,18 @@
|
|||||||
void Pixel_Preview_Loupe_Wide (word X,word Y,byte Couleur);
|
void Pixel_Preview_Loupe_Wide (word X,word Y,byte Couleur);
|
||||||
void Ligne_horizontale_XOR_Wide (word Pos_X,word Pos_Y,word Largeur);
|
void Ligne_horizontale_XOR_Wide (word Pos_X,word Pos_Y,word Largeur);
|
||||||
void Ligne_verticale_XOR_Wide (word Pos_X,word Pos_Y,word Hauteur);
|
void Ligne_verticale_XOR_Wide (word Pos_X,word Pos_Y,word Hauteur);
|
||||||
void Display_brush_Color_Wide (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse);
|
void Display_brush_Color_Wide (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse);
|
||||||
void Display_brush_Mono_Wide (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,byte Couleur,word Largeur_brosse);
|
void Display_brush_Mono_Wide (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,byte Couleur,word Largeur_brosse);
|
||||||
void Clear_brush_Wide (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_image);
|
void Clear_brush_Wide (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_image);
|
||||||
void Remap_screen_Wide (word Pos_X,word Pos_Y,word Largeur,word Hauteur,byte * Table_de_conversion);
|
void Remap_screen_Wide (word Pos_X,word Pos_Y,word Largeur,word Hauteur,byte * Table_de_conversion);
|
||||||
void Afficher_partie_de_l_ecran_Wide (word Largeur,word Hauteur,word Largeur_image);
|
void Afficher_partie_de_l_ecran_Wide (word Largeur,word Hauteur,word Largeur_image);
|
||||||
void Afficher_une_ligne_ecran_Wide (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
void Afficher_une_ligne_ecran_Wide (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
||||||
void Lire_une_ligne_ecran_Wide (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
void Lire_une_ligne_ecran_Wide (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
||||||
void Afficher_partie_de_l_ecran_zoomee_Wide(word Largeur,word Hauteur,word Largeur_image,byte * Buffer);
|
void Afficher_partie_de_l_ecran_zoomee_Wide(word Largeur,word Hauteur,word Largeur_image,byte * Buffer);
|
||||||
void Display_brush_Color_zoom_Wide (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,word Largeur_brosse,byte * Buffer);
|
void Display_brush_Color_zoom_Wide (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,word Largeur_brosse,byte * Buffer);
|
||||||
void Display_brush_Mono_zoom_Wide (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,byte Couleur,word Largeur_brosse,byte * Buffer);
|
void Display_brush_Mono_zoom_Wide (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,byte Couleur,word Largeur_brosse,byte * Buffer);
|
||||||
void Clear_brush_zoom_Wide (word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,word Largeur_image,byte * Buffer);
|
void Clear_brush_zoom_Wide (word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Pos_Y_Fin,byte Couleur_de_transparence,word Largeur_image,byte * Buffer);
|
||||||
void Affiche_brosse_Wide (byte * brush, word Pos_X,word Pos_Y,word Decalage_X,word Decalage_Y,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse);
|
void Affiche_brosse_Wide (byte * brush, word Pos_X,word Pos_Y,word x_offset,word y_offset,word Largeur,word Hauteur,byte Couleur_de_transparence,word Largeur_brosse);
|
||||||
|
|
||||||
void Afficher_une_ligne_ecran_fast_Wide (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
void Afficher_une_ligne_ecran_fast_Wide (word Pos_X,word Pos_Y,word Largeur,byte * Ligne);
|
||||||
void Afficher_une_ligne_transparente_a_l_ecran_Wide(word Pos_X,word Pos_Y,word Largeur,byte* Ligne,byte Couleur_transparence);
|
void Afficher_une_ligne_transparente_a_l_ecran_Wide(word Pos_X,word Pos_Y,word Largeur,byte* Ligne,byte Couleur_transparence);
|
||||||
|
|||||||
42
saveini.c
42
saveini.c
@ -102,7 +102,7 @@ int Sauver_INI_char_in_value_alphabet(char Char)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Sauver_INI_Set_value(char * Destination,char * Source,int Nb_values_to_set,int * Values,int Litteral)
|
void Sauver_INI_Set_value(char * dest,char * Source,int Nb_values_to_set,int * Values,int Litteral)
|
||||||
{
|
{
|
||||||
int Indice_destination;
|
int Indice_destination;
|
||||||
int Indice_source;
|
int Indice_source;
|
||||||
@ -110,15 +110,15 @@ void Sauver_INI_Set_value(char * Destination,char * Source,int Nb_values_to_set,
|
|||||||
|
|
||||||
// On commence par recopier tout jusqu'au symbole '=':
|
// On commence par recopier tout jusqu'au symbole '=':
|
||||||
for (Indice_source=0;Source[Indice_source]!='=';Indice_source++)
|
for (Indice_source=0;Source[Indice_source]!='=';Indice_source++)
|
||||||
Destination[Indice_source]=Source[Indice_source];
|
dest[Indice_source]=Source[Indice_source];
|
||||||
|
|
||||||
// Puis on recopie le symbole '=':
|
// Puis on recopie le symbole '=':
|
||||||
Destination[Indice_source]=Source[Indice_source];
|
dest[Indice_source]=Source[Indice_source];
|
||||||
Indice_source++;
|
Indice_source++;
|
||||||
|
|
||||||
// Puis on recopie tous les espaces qui suivent:
|
// Puis on recopie tous les espaces qui suivent:
|
||||||
for (;Source[Indice_source]==' ';Indice_source++)
|
for (;Source[Indice_source]==' ';Indice_source++)
|
||||||
Destination[Indice_source]=Source[Indice_source];
|
dest[Indice_source]=Source[Indice_source];
|
||||||
|
|
||||||
// Pour l'instant, la source et la destination en sont au même point:
|
// Pour l'instant, la source et la destination en sont au même point:
|
||||||
Indice_destination=Indice_source;
|
Indice_destination=Indice_source;
|
||||||
@ -135,14 +135,14 @@ void Sauver_INI_Set_value(char * Destination,char * Source,int Nb_values_to_set,
|
|||||||
{
|
{
|
||||||
// La valeur <=> Yes
|
// La valeur <=> Yes
|
||||||
|
|
||||||
memcpy(Destination+Indice_destination,"yes",3);
|
memcpy(dest+Indice_destination,"yes",3);
|
||||||
Indice_destination+=3;
|
Indice_destination+=3;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// La valeur <=> No
|
// La valeur <=> No
|
||||||
|
|
||||||
memcpy(Destination+Indice_destination,"no",2);
|
memcpy(dest+Indice_destination,"no",2);
|
||||||
Indice_destination+=2;
|
Indice_destination+=2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -155,18 +155,18 @@ void Sauver_INI_Set_value(char * Destination,char * Source,int Nb_values_to_set,
|
|||||||
// On va écrire la valeur sous forme hexadécimale:
|
// On va écrire la valeur sous forme hexadécimale:
|
||||||
|
|
||||||
// On commence par inscrire le symbole '$':
|
// On commence par inscrire le symbole '$':
|
||||||
Destination[Indice_destination]='$';
|
dest[Indice_destination]='$';
|
||||||
|
|
||||||
// Puis on y concatène la valeur:
|
// Puis on y concatène la valeur:
|
||||||
sprintf(Destination+Indice_destination+1,"%x",Values[Indice_valeur]);
|
sprintf(dest+Indice_destination+1,"%x",Values[Indice_valeur]);
|
||||||
Indice_destination+=strlen(Destination+Indice_destination);
|
Indice_destination+=strlen(dest+Indice_destination);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// On va écrire la valeur sous forme décimale:
|
// On va écrire la valeur sous forme décimale:
|
||||||
|
|
||||||
sprintf(Destination+Indice_destination,"%d",Values[Indice_valeur]);
|
sprintf(dest+Indice_destination,"%d",Values[Indice_valeur]);
|
||||||
Indice_destination+=strlen(Destination+Indice_destination);
|
Indice_destination+=strlen(dest+Indice_destination);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ void Sauver_INI_Set_value(char * Destination,char * Source,int Nb_values_to_set,
|
|||||||
// On recopie tous les caractères de la source jusqu'au suivant qui
|
// On recopie tous les caractères de la source jusqu'au suivant qui
|
||||||
// désigne une valeur:
|
// désigne une valeur:
|
||||||
for (;(!Sauver_INI_char_in_value_alphabet(Source[Indice_source])) && (Source[Indice_source]!='\0');Indice_source++,Indice_destination++)
|
for (;(!Sauver_INI_char_in_value_alphabet(Source[Indice_source])) && (Source[Indice_source]!='\0');Indice_source++,Indice_destination++)
|
||||||
Destination[Indice_destination]=Source[Indice_source];
|
dest[Indice_destination]=Source[Indice_source];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -188,36 +188,36 @@ void Sauver_INI_Set_value(char * Destination,char * Source,int Nb_values_to_set,
|
|||||||
|
|
||||||
// On recopie toute la fin de la ligne:
|
// On recopie toute la fin de la ligne:
|
||||||
for (;Source[Indice_source]!='\0';Indice_source++,Indice_destination++)
|
for (;Source[Indice_source]!='\0';Indice_source++,Indice_destination++)
|
||||||
Destination[Indice_destination]=Source[Indice_source];
|
dest[Indice_destination]=Source[Indice_source];
|
||||||
|
|
||||||
// Et on n'oublie pas d'y mettre l''\0':
|
// Et on n'oublie pas d'y mettre l''\0':
|
||||||
Destination[Indice_destination]='\0';
|
dest[Indice_destination]='\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sauver_INI_Set_string(char * Destination,char * Source,char * Value)
|
void Sauver_INI_Set_string(char * dest,char * Source,char * Value)
|
||||||
{
|
{
|
||||||
int Indice_destination;
|
int Indice_destination;
|
||||||
int Indice_source;
|
int Indice_source;
|
||||||
|
|
||||||
// On commence par recopier tout jusqu'au symbole '=':
|
// On commence par recopier tout jusqu'au symbole '=':
|
||||||
for (Indice_source=0;Source[Indice_source]!='=';Indice_source++)
|
for (Indice_source=0;Source[Indice_source]!='=';Indice_source++)
|
||||||
Destination[Indice_source]=Source[Indice_source];
|
dest[Indice_source]=Source[Indice_source];
|
||||||
|
|
||||||
// Puis on recopie le symbole '=':
|
// Puis on recopie le symbole '=':
|
||||||
Destination[Indice_source]=Source[Indice_source];
|
dest[Indice_source]=Source[Indice_source];
|
||||||
Indice_source++;
|
Indice_source++;
|
||||||
|
|
||||||
// Puis on recopie tous les espaces qui suivent:
|
// Puis on recopie tous les espaces qui suivent:
|
||||||
for (;Source[Indice_source]==' ';Indice_source++)
|
for (;Source[Indice_source]==' ';Indice_source++)
|
||||||
Destination[Indice_source]=Source[Indice_source];
|
dest[Indice_source]=Source[Indice_source];
|
||||||
|
|
||||||
// Pour l'instant, la source et la destination en sont au même point:
|
// Pour l'instant, la source et la destination en sont au même point:
|
||||||
Indice_destination=Indice_source;
|
Indice_destination=Indice_source;
|
||||||
|
|
||||||
// Dans la destination, on écrit la valeur:
|
// Dans la destination, on écrit la valeur:
|
||||||
strcpy(Destination+Indice_destination,Value);
|
strcpy(dest+Indice_destination,Value);
|
||||||
Indice_destination+=strlen(Value);
|
Indice_destination+=strlen(Value);
|
||||||
|
|
||||||
// Dans la source, on saute la valeur:
|
// Dans la source, on saute la valeur:
|
||||||
@ -225,10 +225,10 @@ void Sauver_INI_Set_string(char * Destination,char * Source,char * Value)
|
|||||||
|
|
||||||
// On recopie toute la fin de la ligne:
|
// On recopie toute la fin de la ligne:
|
||||||
for (;Source[Indice_source]!='\0';Indice_source++,Indice_destination++)
|
for (;Source[Indice_source]!='\0';Indice_source++,Indice_destination++)
|
||||||
Destination[Indice_destination]=Source[Indice_source];
|
dest[Indice_destination]=Source[Indice_source];
|
||||||
|
|
||||||
// Et on n'oublie pas d'y mettre l''\0':
|
// Et on n'oublie pas d'y mettre l''\0':
|
||||||
Destination[Indice_destination]='\0';
|
dest[Indice_destination]='\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
int Sauver_INI_Set_strings(FILE * Old_file,FILE * New_file,char * Buffer,char * Option,char * Value)
|
int Sauver_INI_Set_strings(FILE * Old_file,FILE * New_file,char * Buffer,char * Option,char * Value)
|
||||||
|
|||||||
10
sdlscreen.c
10
sdlscreen.c
@ -140,7 +140,7 @@ void UpdateRect(short X, short Y, unsigned short Largeur, unsigned short Hauteur
|
|||||||
// Convertit une SDL_Surface (couleurs indexées ou RGB) en tableau de bytes (couleurs indexées)
|
// Convertit une SDL_Surface (couleurs indexées ou RGB) en tableau de bytes (couleurs indexées)
|
||||||
// Si on passe NULL comme destination, elle est allouée par malloc(). Sinon,
|
// Si on passe NULL comme destination, elle est allouée par malloc(). Sinon,
|
||||||
// attention aux dimensions!
|
// attention aux dimensions!
|
||||||
byte * Surface_en_bytefield(SDL_Surface *Source, byte * Destination)
|
byte * Surface_en_bytefield(SDL_Surface *Source, byte * dest)
|
||||||
{
|
{
|
||||||
byte *Src;
|
byte *Src;
|
||||||
byte *Dst;
|
byte *Dst;
|
||||||
@ -156,10 +156,10 @@ byte * Surface_en_bytefield(SDL_Surface *Source, byte * Destination)
|
|||||||
else
|
else
|
||||||
Reste=0;
|
Reste=0;
|
||||||
|
|
||||||
if (Destination==NULL)
|
if (dest==NULL)
|
||||||
Destination=(byte *)malloc(Source->w*Source->h);
|
dest=(byte *)malloc(Source->w*Source->h);
|
||||||
|
|
||||||
Dst=Destination;
|
Dst=dest;
|
||||||
Src=(byte *)(Source->pixels);
|
Src=(byte *)(Source->pixels);
|
||||||
for(Y=0; Y < Source->h; Y++)
|
for(Y=0; Y < Source->h; Y++)
|
||||||
{
|
{
|
||||||
@ -167,7 +167,7 @@ byte * Surface_en_bytefield(SDL_Surface *Source, byte * Destination)
|
|||||||
Dst += Source->w;
|
Dst += Source->w;
|
||||||
Src += Source->w + Reste;
|
Src += Source->w + Reste;
|
||||||
}
|
}
|
||||||
return Destination;
|
return dest;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
void UpdateRect(short X, short Y, unsigned short Largeur, unsigned short Hauteur);
|
void UpdateRect(short X, short Y, unsigned short Largeur, unsigned short Hauteur);
|
||||||
void Flush_update(void);
|
void Flush_update(void);
|
||||||
byte * Surface_en_bytefield(SDL_Surface *Source, byte * Destination);
|
byte * Surface_en_bytefield(SDL_Surface *Source, byte * dest);
|
||||||
SDL_Color Conversion_couleur_SDL(byte);
|
SDL_Color Conversion_couleur_SDL(byte);
|
||||||
byte Sdl_Get_pixel_8(SDL_Surface *Bmp, int X, int Y);
|
byte Sdl_Get_pixel_8(SDL_Surface *Bmp, int X, int Y);
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
34
windows.c
34
windows.c
@ -1082,14 +1082,14 @@ void Afficher_palette_du_menu_en_evitant_la_fenetre(byte * Table)
|
|||||||
// Cela permet au bloc de couleur d'apparaitre si on déplace la fenetre.
|
// Cela permet au bloc de couleur d'apparaitre si on déplace la fenetre.
|
||||||
short Pos_X;
|
short Pos_X;
|
||||||
short Pos_Y;
|
short Pos_Y;
|
||||||
short Deb_X; // besoin d'une variable signée
|
short relative_x; // besoin d'une variable signée
|
||||||
short Deb_Y; // besoin d'une variable signée
|
short relative_y; // besoin d'une variable signée
|
||||||
// Attention aux unités
|
// Attention aux unités
|
||||||
Deb_X = ((short)Debut_X - (short)Fenetre_Pos_X);
|
relative_x = ((short)Debut_X - (short)Fenetre_Pos_X);
|
||||||
Deb_Y = ((short)Debut_Y - (short)Fenetre_Pos_Y);
|
relative_y = ((short)Debut_Y - (short)Fenetre_Pos_Y);
|
||||||
|
|
||||||
for (Pos_Y=Deb_Y;Pos_Y<(Deb_Y+Hauteur)&&Pos_Y<Fenetre_Hauteur*Menu_Facteur_Y;Pos_Y++)
|
for (Pos_Y=relative_y;Pos_Y<(relative_y+Hauteur)&&Pos_Y<Fenetre_Hauteur*Menu_Facteur_Y;Pos_Y++)
|
||||||
for (Pos_X=Deb_X;Pos_X<(Deb_X+Largeur)&&Pos_X<Fenetre_Largeur*Menu_Facteur_X;Pos_X++)
|
for (Pos_X=relative_x;Pos_X<(relative_x+Largeur)&&Pos_X<Fenetre_Largeur*Menu_Facteur_X;Pos_X++)
|
||||||
if (Pos_X>=0&&Pos_Y>=0)
|
if (Pos_X>=0&&Pos_Y>=0)
|
||||||
Pixel_fond(Pos_X,Pos_Y,Vraie_couleur);
|
Pixel_fond(Pos_X,Pos_Y,Vraie_couleur);
|
||||||
}
|
}
|
||||||
@ -1185,9 +1185,9 @@ void Calculer_coordonnees_pinceau(void)
|
|||||||
// -- Affichage de la limite de l'image -------------------------------------
|
// -- Affichage de la limite de l'image -------------------------------------
|
||||||
void Afficher_limites_de_l_image(void)
|
void Afficher_limites_de_l_image(void)
|
||||||
{
|
{
|
||||||
short Debut;
|
short start;
|
||||||
short Pos;
|
short Pos;
|
||||||
short Fin;
|
short end;
|
||||||
byte Droite_visible;
|
byte Droite_visible;
|
||||||
byte Bas_visible;
|
byte Bas_visible;
|
||||||
short Ancienne_Limite_Zoom;
|
short Ancienne_Limite_Zoom;
|
||||||
@ -1199,22 +1199,22 @@ void Afficher_limites_de_l_image(void)
|
|||||||
// On vérifie que la limite à droite est visible:
|
// On vérifie que la limite à droite est visible:
|
||||||
if (Droite_visible)
|
if (Droite_visible)
|
||||||
{
|
{
|
||||||
Debut=Limite_Haut;
|
start=Limite_Haut;
|
||||||
Fin=(Limite_Bas<Principal_Hauteur_image)?
|
end=(Limite_Bas<Principal_Hauteur_image)?
|
||||||
Limite_Bas:Principal_Hauteur_image;
|
Limite_Bas:Principal_Hauteur_image;
|
||||||
|
|
||||||
if (Bas_visible)
|
if (Bas_visible)
|
||||||
Fin++;
|
end++;
|
||||||
|
|
||||||
// Juste le temps d'afficher les limites, on étend les limites de la loupe
|
// Juste le temps d'afficher les limites, on étend les limites de la loupe
|
||||||
// aux limites visibles, car sinon Pixel_Preview ne voudra pas afficher.
|
// aux limites visibles, car sinon Pixel_Preview ne voudra pas afficher.
|
||||||
Ancienne_Limite_Zoom=Limite_Droite_Zoom;
|
Ancienne_Limite_Zoom=Limite_Droite_Zoom;
|
||||||
Limite_Droite_Zoom=Limite_visible_Droite_Zoom;
|
Limite_Droite_Zoom=Limite_visible_Droite_Zoom;
|
||||||
|
|
||||||
for (Pos=Debut;Pos<=Fin;Pos++)
|
for (Pos=start;Pos<=end;Pos++)
|
||||||
Pixel_Preview(Principal_Largeur_image,Pos,((Pos+Principal_Hauteur_image)&1)?CM_Blanc:CM_Noir);
|
Pixel_Preview(Principal_Largeur_image,Pos,((Pos+Principal_Hauteur_image)&1)?CM_Blanc:CM_Noir);
|
||||||
|
|
||||||
UpdateRect(Principal_Largeur_image,Debut,1,Fin-Debut + 1);
|
UpdateRect(Principal_Largeur_image,start,1,end-start + 1);
|
||||||
// On restaure la bonne valeur des limites
|
// On restaure la bonne valeur des limites
|
||||||
Limite_Droite_Zoom=Ancienne_Limite_Zoom;
|
Limite_Droite_Zoom=Ancienne_Limite_Zoom;
|
||||||
}
|
}
|
||||||
@ -1222,18 +1222,18 @@ void Afficher_limites_de_l_image(void)
|
|||||||
// On vérifie que la limite en bas est visible:
|
// On vérifie que la limite en bas est visible:
|
||||||
if (Bas_visible)
|
if (Bas_visible)
|
||||||
{
|
{
|
||||||
Debut=Limite_Gauche;
|
start=Limite_Gauche;
|
||||||
Fin=(Limite_Droite<Principal_Largeur_image)?
|
end=(Limite_Droite<Principal_Largeur_image)?
|
||||||
Limite_Droite:Principal_Largeur_image;
|
Limite_Droite:Principal_Largeur_image;
|
||||||
|
|
||||||
// On étend également les limites en bas (comme pour la limite droit)
|
// On étend également les limites en bas (comme pour la limite droit)
|
||||||
Ancienne_Limite_Zoom=Limite_Bas_Zoom;
|
Ancienne_Limite_Zoom=Limite_Bas_Zoom;
|
||||||
Limite_Bas_Zoom=Limite_visible_Bas_Zoom;
|
Limite_Bas_Zoom=Limite_visible_Bas_Zoom;
|
||||||
|
|
||||||
for (Pos=Debut;Pos<=Fin;Pos++)
|
for (Pos=start;Pos<=end;Pos++)
|
||||||
Pixel_Preview(Pos,Principal_Hauteur_image,((Pos+Principal_Hauteur_image)&1)?CM_Blanc:CM_Noir);
|
Pixel_Preview(Pos,Principal_Hauteur_image,((Pos+Principal_Hauteur_image)&1)?CM_Blanc:CM_Noir);
|
||||||
|
|
||||||
UpdateRect(Debut,Principal_Hauteur_image,Fin-Debut + 1,1);
|
UpdateRect(start,Principal_Hauteur_image,end-start + 1,1);
|
||||||
|
|
||||||
// On restaure la bonne valeur des limites
|
// On restaure la bonne valeur des limites
|
||||||
Limite_Bas_Zoom=Ancienne_Limite_Zoom;
|
Limite_Bas_Zoom=Ancienne_Limite_Zoom;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user