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

156
pxtall.c
View File

@@ -42,37 +42,37 @@ byte Lit_Pixel_Tall (word X,word Y)
return *( Ecran + Y * 2 * Largeur_ecran + X );
}
void Block_Tall (word Debut_X,word Debut_Y,word Largeur,word Hauteur,byte Couleur)
void Block_Tall (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;
rectangle.y=Debut_Y*2;
rectangle.w=Largeur;
rectangle.h=Hauteur*2;
rectangle.w=width;
rectangle.h=height*2;
SDL_FillRect(Ecran_SDL,&rectangle,Couleur);
}
void Afficher_partie_de_l_ecran_Tall (word Largeur,word Hauteur,word Largeur_image)
void Afficher_partie_de_l_ecran_Tall (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;
for(y=Hauteur;y!=0;y--)
for(y=height;y!=0;y--)
// Pour chaque ligne
{
// On fait une copie de la ligne
memcpy(Dest,Src,Largeur);
memcpy(Dest,Src,width);
Dest+=Largeur_ecran;
memcpy(Dest,Src,Largeur);
memcpy(Dest,Src,width);
// On passe à la ligne suivante
Src+=Largeur_image;
Src+=image_width;
Dest+=Largeur_ecran;
}
//UpdateRect(0,0,Largeur,Hauteur);
//UpdateRect(0,0,width,height);
}
void Pixel_Preview_Normal_Tall (word X,word Y,byte Couleur)
@@ -95,50 +95,50 @@ void Pixel_Preview_Loupe_Tall (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_Tall(
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_Tall(word Pos_X,word Pos_Y,word Largeur)
void Ligne_horizontale_XOR_Tall(word Pos_X,word Pos_Y,word width)
{
//On calcule la valeur initiale de Dest:
byte* Dest=Pos_Y*2*Largeur_ecran+Pos_X+Ecran;
int X;
for (X=0;X<Largeur;X++)
for (X=0;X<width;X++)
*(Dest+X)=~*(Dest+X);
Dest=(Pos_Y*2+1)*Largeur_ecran+Pos_X+Ecran;
for (X=0;X<Largeur;X++)
for (X=0;X<width;X++)
*(Dest+X)=~*(Dest+X);
}
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 height)
{
int i;
byte color;
for (i=Pos_Y*2;i<(Pos_Y+Hauteur)*2;i++)
for (i=Pos_Y*2;i<(Pos_Y+height)*2;i++)
{
color=*(Ecran+Pos_X+i*Largeur_ecran);
*(Ecran+Pos_X+i*Largeur_ecran)=~color;
}
}
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_Color_Tall(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 * 2 * Largeur_ecran + Pos_X;
@@ -148,10 +148,10 @@ void Display_brush_Color_Tall(word Pos_X,word Pos_Y,word x_offset,word y_offset,
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)
@@ -165,14 +165,14 @@ void Display_brush_Color_Tall(word Pos_X,word Pos_Y,word x_offset,word y_offset,
}
// On passe à la ligne suivante
Dest = Dest + 2 * Largeur_ecran - Largeur;
Src = Src + Largeur_brosse - Largeur;
Dest = Dest + 2 * Largeur_ecran - width;
Src = Src + Largeur_brosse - width;
}
UpdateRect(Pos_X,Pos_Y,Largeur,Hauteur);
UpdateRect(Pos_X,Pos_Y,width,height);
}
void Display_brush_Mono_Tall(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 */
{
@@ -182,10 +182,10 @@ void Display_brush_Mono_Tall(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)
@@ -200,35 +200,35 @@ void Display_brush_Mono_Tall(word Pos_X, word Pos_Y,
}
// On passe à la ligne suivante
Src+=Largeur_brosse-Largeur;
Dest+=2*Largeur_ecran-Largeur;
Src+=Largeur_brosse-width;
Dest+=2*Largeur_ecran-width;
}
UpdateRect(Pos_X,Pos_Y,Largeur,Hauteur);
UpdateRect(Pos_X,Pos_Y,width,height);
}
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)
void Clear_brush_Tall(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+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 ) * image_width + Pos_X + Principal_Decalage_X + Principal_Ecran; //Coords de départ ds la source (Src)
int y;
for(y=Hauteur;y!=0;y--)
for(y=height;y!=0;y--)
// Pour chaque ligne
{
// On fait une copie de la ligne
memcpy(Dest,Src,Largeur);
memcpy(Dest,Src,width);
Dest+=Largeur_ecran;
memcpy(Dest,Src,Largeur);
memcpy(Dest,Src,width);
// On passe à la ligne suivante
Src+=Largeur_image;
Src+=image_width;
Dest+=Largeur_ecran;
}
UpdateRect(Pos_X,Pos_Y,Largeur,Hauteur);
UpdateRect(Pos_X,Pos_Y,width,height);
}
// Affiche une brosse (arbitraire) à l'écran
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)
void Affiche_brosse_Tall(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 * 2 * Largeur_ecran + Pos_X;
@@ -238,10 +238,10 @@ void Affiche_brosse_Tall(byte * brush, word Pos_X,word Pos_Y,word x_offset,word
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)
@@ -255,51 +255,51 @@ void Affiche_brosse_Tall(byte * brush, word Pos_X,word Pos_Y,word x_offset,word
}
// On passe à la ligne suivante
Dest = Dest + Largeur_ecran * 2 - Largeur;
Src = Src + Largeur_brosse - Largeur;
Dest = Dest + Largeur_ecran * 2 - width;
Src = Src + Largeur_brosse - width;
}
}
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 width,word height,byte * Table_de_conversion)
{
// Dest = coords a l'écran
byte* Dest = Ecran + Pos_Y * 2 * Largeur_ecran + Pos_X;
int x,y;
// Pour chaque ligne
for(y=Hauteur*2;y>0;y--)
for(y=height*2;y>0;y--)
{
// Pour chaque pixel
for(x=Largeur;x>0;x--)
for(x=width;x>0;x--)
{
*Dest = Table_de_conversion[*Dest];
Dest ++;
}
Dest = Dest + Largeur_ecran - Largeur;
Dest = Dest + Largeur_ecran - width;
}
UpdateRect(Pos_X,Pos_Y,Largeur,Hauteur);
UpdateRect(Pos_X,Pos_Y,width,height);
}
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 width,byte * line)
/* On affiche toute une ligne de pixels. Utilisé pour les textes. */
{
memcpy(Ecran+Pos_X+Pos_Y*2*Largeur_ecran,Ligne,Largeur);
memcpy(Ecran+Pos_X+(Pos_Y*2+1)*Largeur_ecran,Ligne,Largeur);
memcpy(Ecran+Pos_X+Pos_Y*2*Largeur_ecran,line,width);
memcpy(Ecran+Pos_X+(Pos_Y*2+1)*Largeur_ecran,line,width);
}
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 width,byte * line)
{
memcpy(Ligne,Largeur_ecran * 2 * Pos_Y + Pos_X + Ecran,Largeur);
memcpy(line,Largeur_ecran * 2 * Pos_Y + Pos_X + Ecran,width);
}
void Afficher_partie_de_l_ecran_zoomee_Tall(
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
@@ -309,27 +309,27 @@ void Afficher_partie_de_l_ecran_zoomee_Tall(
int x;
// On éclate la ligne
Zoomer_une_ligne(Src,Buffer,Loupe_Facteur,Largeur);
Zoomer_une_ligne(Src,Buffer,Loupe_Facteur,width);
// On l'affiche Facteur fois, sur des lignes consécutives
x = Loupe_Facteur*2;
// Pour chaque ligne
do{
// On affiche la ligne zoomée
Afficher_une_ligne_ecran_Simple(
Principal_X_Zoom, y, Largeur*Loupe_Facteur,
Principal_X_Zoom, y, width*Loupe_Facteur,
Buffer
);
// On passe à la suivante
y++;
if(y==Hauteur*2)
if(y==height*2)
{
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 !
}
@@ -337,9 +337,9 @@ void Afficher_partie_de_l_ecran_zoomee_Tall(
// Affiche une partie de la brosse couleur zoomée
void Display_brush_Color_zoom_Tall(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;
@@ -349,12 +349,12 @@ void Display_brush_Color_zoom_Tall(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_Simple(Pos_X,y*2,Largeur*Loupe_Facteur,Buffer,Couleur_de_transparence);
memcpy(Ecran + (y*2 +1) * Largeur_ecran + Pos_X, Ecran + y*2* Largeur_ecran + Pos_X, Largeur*Loupe_Facteur);
Afficher_une_ligne_transparente_a_l_ecran_Simple(Pos_X,y*2,width*Loupe_Facteur,Buffer,Couleur_de_transparence);
memcpy(Ecran + (y*2 +1) * Largeur_ecran + Pos_X, Ecran + y*2* Largeur_ecran + Pos_X, width*Loupe_Facteur);
y++;
if(y==Pos_Y_Fin)
{
@@ -368,10 +368,10 @@ void Display_brush_Color_zoom_Tall(word Pos_X,word Pos_Y,
void Display_brush_Mono_zoom_Tall(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
)
@@ -385,7 +385,7 @@ void Display_brush_Mono_zoom_Tall(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)
@@ -396,7 +396,7 @@ void Display_brush_Mono_zoom_Tall(word Pos_X, word Pos_Y,
{
// On affiche la ligne zoomée
Afficher_une_ligne_transparente_mono_a_l_ecran_Simple(
Pos_X, y, Largeur * Loupe_Facteur,
Pos_X, y, width * Loupe_Facteur,
Buffer, Couleur_de_transparence, Couleur
);
// On passe à la ligne suivante
@@ -405,7 +405,7 @@ void Display_brush_Mono_zoom_Tall(word Pos_X, word Pos_Y,
if(y == Pos_Y_Fin*2)
{
UpdateRect( Pos_X, Pos_Y,
Largeur * Loupe_Facteur, Pos_Y_Fin - Pos_Y );
width * Loupe_Facteur, Pos_Y_Fin - Pos_Y );
return;
}
BX --;
@@ -417,35 +417,35 @@ void Display_brush_Mono_zoom_Tall(word Pos_X, word Pos_Y,
}
}
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)
void Clear_brush_zoom_Tall(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,Largeur);
Zoomer_une_ligne(Src,Buffer,Loupe_Facteur,width);
bx=Loupe_Facteur;
// Pour chaque ligne
do{
Afficher_une_ligne_ecran_Tall(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;
}
}