More translations (about 500)

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@687 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2009-03-19 03:18:42 +00:00
parent b6f529c90f
commit f342ff5ff7
51 changed files with 2519 additions and 2523 deletions

View File

@@ -47,43 +47,43 @@ byte Lit_Pixel_Double (word X,word Y)
return *( Ecran + Y * 4 * Largeur_ecran + X * 2);
}
void Block_Double (word Debut_X,word Debut_Y,word Largeur,word Hauteur,byte Couleur)
void Block_Double (word Debut_X,word Debut_Y,word width,word height,byte Couleur)
/* On affiche un rectangle de la couleur donnée */
{
SDL_Rect rectangle;
rectangle.x=Debut_X*2;
rectangle.y=Debut_Y*2;
rectangle.w=Largeur*2;
rectangle.h=Hauteur*2;
rectangle.w=width*2;
rectangle.h=height*2;
SDL_FillRect(Ecran_SDL,&rectangle,Couleur);
}
void Afficher_partie_de_l_ecran_Double (word Largeur,word Hauteur,word Largeur_image)
void Afficher_partie_de_l_ecran_Double (word width,word height,word image_width)
/* Afficher une partie de l'image telle quelle sur l'écran */
{
byte* Dest=Ecran; //On va se mettre en 0,0 dans l'écran (Dest)
byte* Src=Principal_Decalage_Y*Largeur_image+Principal_Decalage_X+Principal_Ecran; //Coords de départ ds la source (Src)
byte* Src=Principal_Decalage_Y*image_width+Principal_Decalage_X+Principal_Ecran; //Coords de départ ds la source (Src)
int y;
int dy;
for(y=Hauteur;y!=0;y--)
for(y=height;y!=0;y--)
// Pour chaque ligne
{
// On fait une copie de la ligne
for (dy=Largeur;dy>0;dy--)
for (dy=width;dy>0;dy--)
{
*(Dest+1)=*Dest=*Src;
Src++;
Dest+=2;
}
// On double la ligne qu'on vient de copier
memcpy(Dest-Largeur*ZOOMX+Largeur_ecran*ZOOMX,Dest-Largeur*ZOOMX,Largeur*ZOOMX);
memcpy(Dest-width*ZOOMX+Largeur_ecran*ZOOMX,Dest-width*ZOOMX,width*ZOOMX);
// On passe à la ligne suivante
Src+=Largeur_image-Largeur;
Dest+=Largeur_ecran*4 - Largeur*2;
Src+=image_width-width;
Dest+=Largeur_ecran*4 - width*2;
}
//UpdateRect(0,0,Largeur,Hauteur);
//UpdateRect(0,0,width,height);
}
void Pixel_Preview_Normal_Double (word X,word Y,byte Couleur)
@@ -106,46 +106,46 @@ void Pixel_Preview_Loupe_Double (word X,word Y,byte Couleur)
&& X >= Limite_Gauche_Zoom && X <= Limite_visible_Droite_Zoom)
{
// On est dedans
int Hauteur;
int height;
int Y_Zoom = Table_mul_facteur_zoom[Y-Loupe_Decalage_Y];
if (Menu_Ordonnee - Y_Zoom < Loupe_Facteur)
// On ne doit dessiner qu'un morceau du pixel
// sinon on dépasse sur le menu
Hauteur = Menu_Ordonnee - Y_Zoom;
height = Menu_Ordonnee - Y_Zoom;
else
Hauteur = Loupe_Facteur;
height = Loupe_Facteur;
Block_Double(
Table_mul_facteur_zoom[X-Loupe_Decalage_X]+Principal_X_Zoom,
Y_Zoom, Loupe_Facteur, Hauteur, Couleur
Y_Zoom, Loupe_Facteur, height, 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 width)
{
//On calcule la valeur initiale de Dest:
byte* Dest=Pos_Y*4*Largeur_ecran+Pos_X*2+Ecran;
int X;
for (X=0;X<Largeur*2;X+=2)
for (X=0;X<width*2;X+=2)
*(Dest+X+2*Largeur_ecran+1)=*(Dest+X+2*Largeur_ecran)=*(Dest+X+1)=*(Dest+X)=~*(Dest+X);
}
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 height)
{
int i;
byte *Dest=Ecran+Pos_X*2+Pos_Y*Largeur_ecran*4;
for (i=Hauteur;i>0;i--)
for (i=height;i>0;i--)
{
*Dest=*(Dest+1)=*(Dest+Largeur_ecran*2)=*(Dest+Largeur_ecran*2+1)=~*Dest;
Dest+=Largeur_ecran*4;
}
}
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_Color_Double(word Pos_X,word Pos_Y,word x_offset,word y_offset,word width,word height,byte Couleur_de_transparence,word Largeur_brosse)
{
// Dest = Position à l'écran
byte* Dest = Ecran + Pos_Y * 4 * Largeur_ecran + Pos_X * 2;
@@ -155,10 +155,10 @@ void Display_brush_Color_Double(word Pos_X,word Pos_Y,word x_offset,word y_offse
word x,y;
// Pour chaque ligne
for(y = Hauteur;y > 0; y--)
for(y = height;y > 0; y--)
{
// Pour chaque pixel
for(x = Largeur;x > 0; x--)
for(x = width;x > 0; x--)
{
// On vérifie que ce n'est pas la transparence
if(*Src != Couleur_de_transparence)
@@ -172,14 +172,14 @@ void Display_brush_Color_Double(word Pos_X,word Pos_Y,word x_offset,word y_offse
}
// On passe à la ligne suivante
Dest = Dest + Largeur_ecran*4 - Largeur*2;
Src = Src + Largeur_brosse - Largeur;
Dest = Dest + Largeur_ecran*4 - width*2;
Src = Src + Largeur_brosse - width;
}
UpdateRect(Pos_X,Pos_Y,Largeur,Hauteur);
UpdateRect(Pos_X,Pos_Y,width,height);
}
void Display_brush_Mono_Double(word Pos_X, word Pos_Y,
word x_offset, word y_offset, word Largeur, word Hauteur,
word x_offset, word y_offset, word width, word height,
byte Couleur_de_transparence, byte Couleur, word Largeur_brosse)
/* On affiche la brosse en monochrome */
{
@@ -189,10 +189,10 @@ void Display_brush_Mono_Double(word Pos_X, word Pos_Y,
// la brosse
int x,y;
for(y=Hauteur;y!=0;y--)
for(y=height;y!=0;y--)
//Pour chaque ligne
{
for(x=Largeur;x!=0;x--)
for(x=width;x!=0;x--)
//Pour chaque pixel
{
if (*Src!=Couleur_de_transparence)
@@ -204,23 +204,23 @@ void Display_brush_Mono_Double(word Pos_X, word Pos_Y,
}
// On passe à la ligne suivante
Src+=Largeur_brosse-Largeur;
Dest+=Largeur_ecran*4-Largeur*2;
Src+=Largeur_brosse-width;
Dest+=Largeur_ecran*4-width*2;
}
UpdateRect(Pos_X,Pos_Y,Largeur,Hauteur);
UpdateRect(Pos_X,Pos_Y,width,height);
}
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)
void Clear_brush_Double(word Pos_X,word Pos_Y,__attribute__((unused)) word x_offset,__attribute__((unused)) word y_offset,word width,word height,__attribute__((unused))byte Couleur_de_transparence,word image_width)
{
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 ) * image_width + Pos_X + Principal_Decalage_X + Principal_Ecran; //Coords de départ ds la source (Src)
int y;
int x;
for(y=Hauteur;y!=0;y--)
for(y=height;y!=0;y--)
// Pour chaque ligne
{
for(x=Largeur;x!=0;x--)
for(x=width;x!=0;x--)
//Pour chaque pixel
{
*(Dest+Largeur_ecran*2+1)=*(Dest+Largeur_ecran*2)=*(Dest+1)=*Dest=*Src;
@@ -231,14 +231,14 @@ void Clear_brush_Double(word Pos_X,word Pos_Y,__attribute__((unused)) word x_off
}
// On passe à la ligne suivante
Src+=Largeur_image-Largeur;
Dest+=Largeur_ecran*4-Largeur*2;
Src+=image_width-width;
Dest+=Largeur_ecran*4-width*2;
}
UpdateRect(Pos_X,Pos_Y,Largeur,Hauteur);
UpdateRect(Pos_X,Pos_Y,width,height);
}
// Affiche une brosse (arbitraire) à l'écran
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 Affiche_brosse_Double(byte * brush, word Pos_X,word Pos_Y,word x_offset,word y_offset,word width,word height,byte Couleur_de_transparence,word Largeur_brosse)
{
// Dest = Position à l'écran
byte* Dest = Ecran + Pos_Y * 4 * Largeur_ecran + Pos_X * 2;
@@ -248,10 +248,10 @@ void Affiche_brosse_Double(byte * brush, word Pos_X,word Pos_Y,word x_offset,wor
word x,y;
// Pour chaque ligne
for(y = Hauteur;y > 0; y--)
for(y = height;y > 0; y--)
{
// Pour chaque pixel
for(x = Largeur;x > 0; x--)
for(x = width;x > 0; x--)
{
// On vérifie que ce n'est pas la transparence
if(*Src != Couleur_de_transparence)
@@ -264,57 +264,57 @@ void Affiche_brosse_Double(byte * brush, word Pos_X,word Pos_Y,word x_offset,wor
}
// On passe à la ligne suivante
Dest = Dest + Largeur_ecran*4 - Largeur*2;
Src = Src + Largeur_brosse - Largeur;
Dest = Dest + Largeur_ecran*4 - width*2;
Src = Src + Largeur_brosse - width;
}
}
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 width,word height,byte * Table_de_conversion)
{
// Dest = coords a l'écran
byte* Dest = Ecran + Pos_Y * 4 * Largeur_ecran + Pos_X * 2;
int x,y;
// Pour chaque ligne
for(y=Hauteur;y>0;y--)
for(y=height;y>0;y--)
{
// Pour chaque pixel
for(x=Largeur;x>0;x--)
for(x=width;x>0;x--)
{
*(Dest+Largeur_ecran*2+1)=*(Dest+Largeur_ecran*2)=*(Dest+1)=*Dest=
Table_de_conversion[*Dest];
Dest +=2;
}
Dest = Dest + Largeur_ecran*4 - Largeur*2;
Dest = Dest + Largeur_ecran*4 - width*2;
}
UpdateRect(Pos_X,Pos_Y,Largeur,Hauteur);
UpdateRect(Pos_X,Pos_Y,width,height);
}
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 width,byte * line)
/* On affiche toute une ligne de pixels telle quelle. */
/* Utilisée si le buffer contient déja des pixel doublés. */
{
memcpy(Ecran+Pos_X*2+Pos_Y*4*Largeur_ecran,Ligne,Largeur*2);
memcpy(Ecran+Pos_X*2+(Pos_Y*4+2)*Largeur_ecran,Ligne,Largeur*2);
memcpy(Ecran+Pos_X*2+Pos_Y*4*Largeur_ecran,line,width*2);
memcpy(Ecran+Pos_X*2+(Pos_Y*4+2)*Largeur_ecran,line,width*2);
}
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 width,byte * line)
/* On affiche une ligne de pixels en les doublant. */
{
int x;
byte *Dest;
Dest=Ecran+Pos_X*2+Pos_Y*4*Largeur_ecran;
for(x=Largeur;x>0;x--)
for(x=width;x>0;x--)
{
*(Dest+Largeur_ecran*2+1)=*(Dest+Largeur_ecran*2)=*(Dest+1)=*Dest=*Ligne;
*(Dest+Largeur_ecran*2+1)=*(Dest+Largeur_ecran*2)=*(Dest+1)=*Dest=*line;
Dest+=2;
Ligne++;
line++;
}
}
void Afficher_une_ligne_transparente_mono_a_l_ecran_Double(
word Pos_X, word Pos_Y, word Largeur, byte* Ligne,
word Pos_X, word Pos_Y, word width, byte* line,
byte Couleur_transparence, byte Couleur)
// Affiche une ligne à l'écran avec une couleur + transparence.
// Utilisé par les brosses en mode zoom
@@ -322,28 +322,28 @@ void Afficher_une_ligne_transparente_mono_a_l_ecran_Double(
byte* Dest = Ecran+ Pos_Y*ZOOMX*Largeur_ecran + Pos_X*ZOOMX;
int x;
// Pour chaque pixel
for(x=0;x<Largeur;x++)
for(x=0;x<width;x++)
{
if (Couleur_transparence!=*Ligne)
if (Couleur_transparence!=*line)
{
*(Dest+1)=*Dest=Couleur;
}
Ligne ++; // Pixel suivant
line ++; // Pixel suivant
Dest+=2;
}
}
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 width,byte * line)
{
memcpy(Ligne,Largeur_ecran * 4 * Pos_Y + Pos_X * 2 + Ecran,Largeur*2);
memcpy(line,Largeur_ecran * 4 * Pos_Y + Pos_X * 2 + Ecran,width*2);
}
void Afficher_partie_de_l_ecran_zoomee_Double(
word Largeur, // Largeur non zoomée
word Hauteur, // Hauteur zoomée
word Largeur_image,byte * Buffer)
word width, // width non zoomée
word height, // height zoomée
word image_width,byte * Buffer)
{
byte* Src = Principal_Ecran + Loupe_Decalage_Y * Largeur_image
byte* Src = Principal_Ecran + Loupe_Decalage_Y * image_width
+ Loupe_Decalage_X;
int y = 0; // Ligne en cours de traitement
@@ -353,27 +353,27 @@ void Afficher_partie_de_l_ecran_zoomee_Double(
int x;
// On éclate la ligne
Zoomer_une_ligne(Src,Buffer,Loupe_Facteur*ZOOMX,Largeur);
Zoomer_une_ligne(Src,Buffer,Loupe_Facteur*ZOOMX,width);
// On l'affiche Facteur fois, sur des lignes consécutives
x = Loupe_Facteur/**ZOOMY*/;
// Pour chaque ligne
do{
// On affiche la ligne zoomée
Afficher_une_ligne_ecran_fast_Double(
Principal_X_Zoom, y, Largeur*Loupe_Facteur,
Principal_X_Zoom, y, width*Loupe_Facteur,
Buffer
);
// On passe à la suivante
y++;
if(y==Hauteur/**ZOOMY*/)
if(y==height/**ZOOMY*/)
{
UpdateRect(Principal_X_Zoom,0,
Largeur*Loupe_Facteur,Hauteur);
width*Loupe_Facteur,height);
return;
}
x--;
}while (x > 0);
Src += Largeur_image;
Src += image_width;
}
// ATTENTION on n'arrive jamais ici !
}
@@ -381,9 +381,9 @@ void Afficher_partie_de_l_ecran_zoomee_Double(
// Affiche une partie de la brosse couleur zoomée
void Display_brush_Color_zoom_Double(word Pos_X,word Pos_Y,
word x_offset,word y_offset,
word Largeur, // Largeur non zoomée
word width, // width non zoomée
word Pos_Y_Fin,byte Couleur_de_transparence,
word Largeur_brosse, // Largeur réelle de la brosse
word Largeur_brosse, // width réelle de la brosse
byte * Buffer)
{
byte* Src = Brosse+y_offset*Largeur_brosse + x_offset;
@@ -393,13 +393,13 @@ void Display_brush_Color_zoom_Double(word Pos_X,word Pos_Y,
// Pour chaque ligne
while(1)
{
Zoomer_une_ligne(Src,Buffer,Loupe_Facteur,Largeur);
Zoomer_une_ligne(Src,Buffer,Loupe_Facteur,width);
// On affiche facteur fois la ligne zoomée
for(bx=Loupe_Facteur;bx>0;bx--)
{
Afficher_une_ligne_transparente_a_l_ecran_Wide(Pos_X,y*ZOOMX,Largeur*Loupe_Facteur,Buffer,Couleur_de_transparence);
Afficher_une_ligne_transparente_a_l_ecran_Wide(Pos_X,y*ZOOMX,width*Loupe_Facteur,Buffer,Couleur_de_transparence);
// TODO: pas clair ici
memcpy(Ecran + (y*ZOOMY+1)*ZOOMX*Largeur_ecran + Pos_X*ZOOMX, Ecran + y*ZOOMX*ZOOMY*Largeur_ecran + Pos_X*ZOOMX, Largeur*ZOOMX*Loupe_Facteur);
memcpy(Ecran + (y*ZOOMY+1)*ZOOMX*Largeur_ecran + Pos_X*ZOOMX, Ecran + y*ZOOMX*ZOOMY*Largeur_ecran + Pos_X*ZOOMX, width*ZOOMX*Loupe_Facteur);
y++;
if(y==Pos_Y_Fin)
{
@@ -413,10 +413,10 @@ void Display_brush_Color_zoom_Double(word Pos_X,word Pos_Y,
void Display_brush_Mono_zoom_Double(word Pos_X, word Pos_Y,
word x_offset, word y_offset,
word Largeur, // Largeur non zoomée
word width, // width non zoomée
word Pos_Y_Fin,
byte Couleur_de_transparence, byte Couleur,
word Largeur_brosse, // Largeur réelle de la brosse
word Largeur_brosse, // width réelle de la brosse
byte * Buffer
)
@@ -430,7 +430,7 @@ void Display_brush_Mono_zoom_Double(word Pos_X, word Pos_Y,
int BX;
// Src = Ligne originale
// On éclate la ligne
Zoomer_une_ligne(Src,Buffer,Loupe_Facteur,Largeur);
Zoomer_une_ligne(Src,Buffer,Loupe_Facteur,width);
// On affiche la ligne Facteur fois à l'écran (sur des
// lignes consécutives)
@@ -441,7 +441,7 @@ void Display_brush_Mono_zoom_Double(word Pos_X, word Pos_Y,
{
// On affiche la ligne zoomée
Afficher_une_ligne_transparente_mono_a_l_ecran_Double(
Pos_X, y, Largeur * Loupe_Facteur,
Pos_X, y, width * Loupe_Facteur,
Buffer, Couleur_de_transparence, Couleur
);
// On passe à la ligne suivante
@@ -450,7 +450,7 @@ void Display_brush_Mono_zoom_Double(word Pos_X, word Pos_Y,
if(y == Pos_Y_Fin*ZOOMX)
{
UpdateRect( Pos_X, Pos_Y,
Largeur * Loupe_Facteur, Pos_Y_Fin - Pos_Y );
width * Loupe_Facteur, Pos_Y_Fin - Pos_Y );
return;
}
BX --;
@@ -462,17 +462,17 @@ void Display_brush_Mono_zoom_Double(word Pos_X, word Pos_Y,
}
}
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)
void Clear_brush_zoom_Double(word Pos_X,word Pos_Y,word x_offset,word y_offset,word width,word Pos_Y_Fin,__attribute__((unused)) byte Couleur_de_transparence,word image_width,byte * Buffer)
{
// En fait on va recopier l'image non zoomée dans la partie zoomée !
byte* Src = Principal_Ecran + y_offset * Largeur_image + x_offset;
byte* Src = Principal_Ecran + y_offset * image_width + x_offset;
int y = Pos_Y;
int bx;
// Pour chaque ligne à zoomer
while(1){
Zoomer_une_ligne(Src,Buffer,Loupe_Facteur*2,Largeur);
Zoomer_une_ligne(Src,Buffer,Loupe_Facteur*2,width);
bx=Loupe_Facteur;
@@ -480,20 +480,20 @@ void Clear_brush_zoom_Double(word Pos_X,word Pos_Y,word x_offset,word y_offset,w
do{
// TODO a verifier
Afficher_une_ligne_ecran_fast_Double(Pos_X,y,
Largeur * Loupe_Facteur,Buffer);
width * Loupe_Facteur,Buffer);
// Ligne suivante
y++;
if(y==Pos_Y_Fin)
{
UpdateRect(Pos_X,Pos_Y,
Largeur*Loupe_Facteur,Pos_Y_Fin-Pos_Y);
width*Loupe_Facteur,Pos_Y_Fin-Pos_Y);
return;
}
bx--;
}while(bx!=0);
Src+= Largeur_image;
Src+= image_width;
}
}