translations

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@690 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2009-03-23 02:33:21 +00:00
parent c324adfff2
commit f8c7c6730b
45 changed files with 2021 additions and 2023 deletions

View File

@@ -108,10 +108,10 @@ void Pixel_Preview_Loupe_Simple (word X,word Y,byte Couleur)
}
}
void Ligne_horizontale_XOR_Simple(word Pos_X,word Pos_Y,word width)
void Ligne_horizontale_XOR_Simple(word x_pos,word y_pos,word width)
{
//On calcule la valeur initiale de Dest:
byte* Dest=Pos_Y*Largeur_ecran+Pos_X+Ecran;
byte* Dest=y_pos*Largeur_ecran+x_pos+Ecran;
int X;
@@ -119,21 +119,21 @@ void Ligne_horizontale_XOR_Simple(word Pos_X,word Pos_Y,word width)
*(Dest+X)=~*(Dest+X);
}
void Ligne_verticale_XOR_Simple(word Pos_X,word Pos_Y,word height)
void Ligne_verticale_XOR_Simple(word x_pos,word y_pos,word height)
{
int i;
byte color;
for (i=Pos_Y;i<Pos_Y+height;i++)
for (i=y_pos;i<y_pos+height;i++)
{
color=*(Ecran+Pos_X+i*Largeur_ecran);
*(Ecran+Pos_X+i*Largeur_ecran)=~color;
color=*(Ecran+x_pos+i*Largeur_ecran);
*(Ecran+x_pos+i*Largeur_ecran)=~color;
}
}
void Display_brush_Color_Simple(word Pos_X,word Pos_Y,word x_offset,word y_offset,word width,word height,byte Couleur_de_transparence,word Largeur_brosse)
void Display_brush_Color_Simple(word x_pos,word y_pos,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 * Largeur_ecran + Pos_X;
byte* Dest = Ecran + y_pos * Largeur_ecran + x_pos;
// Src = Position dans la brosse
byte* Src = Brosse + y_offset * Largeur_brosse + x_offset;
@@ -159,15 +159,15 @@ void Display_brush_Color_Simple(word Pos_X,word Pos_Y,word x_offset,word y_offse
Dest = Dest + Largeur_ecran - width;
Src = Src + Largeur_brosse - width;
}
UpdateRect(Pos_X,Pos_Y,width,height);
UpdateRect(x_pos,y_pos,width,height);
}
void Display_brush_Mono_Simple(word Pos_X, word Pos_Y,
void Display_brush_Mono_Simple(word x_pos, word y_pos,
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 */
{
byte* Dest=Pos_Y*Largeur_ecran+Pos_X+Ecran; // Dest = adr Destination à
byte* Dest=y_pos*Largeur_ecran+x_pos+Ecran; // Dest = adr Destination à
// l'écran
byte* Src=Largeur_brosse*y_offset+x_offset+Brosse; // Src = adr ds
// la brosse
@@ -191,13 +191,13 @@ void Display_brush_Mono_Simple(word Pos_X, word Pos_Y,
Src+=Largeur_brosse-width;
Dest+=Largeur_ecran-width;
}
UpdateRect(Pos_X,Pos_Y,width,height);
UpdateRect(x_pos,y_pos,width,height);
}
void Clear_brush_Simple(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)
void Clear_brush_Simple(word x_pos,word y_pos,__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*Largeur_ecran; //On va se mettre en 0,0 dans l'écran (Dest)
byte* Src = ( Pos_Y + Principal_Decalage_Y ) * image_width + Pos_X + Principal_Decalage_X + Principal_Ecran; //Coords de départ ds la source (Src)
byte* Dest=Ecran+x_pos+y_pos*Largeur_ecran; //On va se mettre en 0,0 dans l'écran (Dest)
byte* Src = ( y_pos + Principal_Decalage_Y ) * image_width + x_pos + Principal_Decalage_X + Principal_Ecran; //Coords de départ ds la source (Src)
int y;
for(y=height;y!=0;y--)
@@ -210,14 +210,14 @@ void Clear_brush_Simple(word Pos_X,word Pos_Y,__attribute__((unused)) word x_off
Src+=image_width;
Dest+=Largeur_ecran;
}
UpdateRect(Pos_X,Pos_Y,width,height);
UpdateRect(x_pos,y_pos,width,height);
}
// Affiche une brosse (arbitraire) à l'écran
void Affiche_brosse_Simple(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)
void Affiche_brosse_Simple(byte * brush, word x_pos,word y_pos,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 * Largeur_ecran + Pos_X;
byte* Dest = Ecran + y_pos * Largeur_ecran + x_pos;
// Src = Position dans la brosse
byte* Src = brush + y_offset * Largeur_brosse + x_offset;
@@ -245,10 +245,10 @@ void Affiche_brosse_Simple(byte * brush, word Pos_X,word Pos_Y,word x_offset,wor
}
}
void Remap_screen_Simple(word Pos_X,word Pos_Y,word width,word height,byte * Table_de_conversion)
void Remap_screen_Simple(word x_pos,word y_pos,word width,word height,byte * Table_de_conversion)
{
// Dest = coords a l'écran
byte* Dest = Ecran + Pos_Y * Largeur_ecran + Pos_X;
byte* Dest = Ecran + y_pos * Largeur_ecran + x_pos;
int x,y;
// Pour chaque ligne
@@ -264,22 +264,22 @@ void Remap_screen_Simple(word Pos_X,word Pos_Y,word width,word height,byte * Tab
Dest = Dest + Largeur_ecran - width;
}
UpdateRect(Pos_X,Pos_Y,width,height);
UpdateRect(x_pos,y_pos,width,height);
}
void Afficher_une_ligne_ecran_Simple(word Pos_X,word Pos_Y,word width,byte * line)
void Afficher_une_ligne_ecran_Simple(word x_pos,word y_pos,word width,byte * line)
/* On affiche toute une ligne de pixels. Utilisé pour les textes. */
{
memcpy(Ecran+Pos_X+Pos_Y*Largeur_ecran,line,width);
memcpy(Ecran+x_pos+y_pos*Largeur_ecran,line,width);
}
void Afficher_une_ligne_transparente_mono_a_l_ecran_Simple(
word Pos_X, word Pos_Y, word width, byte* line,
word x_pos, word y_pos, 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
{
byte* Dest = Ecran+ Pos_Y * Largeur_ecran + Pos_X;
byte* Dest = Ecran+ y_pos * Largeur_ecran + x_pos;
int x;
// Pour chaque pixel
for(x=0;x<width;x++)
@@ -291,9 +291,9 @@ void Afficher_une_ligne_transparente_mono_a_l_ecran_Simple(
}
}
void Lire_une_ligne_ecran_Simple(word Pos_X,word Pos_Y,word width,byte * line)
void Lire_une_ligne_ecran_Simple(word x_pos,word y_pos,word width,byte * line)
{
memcpy(line,Largeur_ecran * Pos_Y + Pos_X + Ecran,width);
memcpy(line,Largeur_ecran * y_pos + x_pos + Ecran,width);
}
void Afficher_partie_de_l_ecran_zoomee_Simple(
@@ -336,10 +336,10 @@ void Afficher_partie_de_l_ecran_zoomee_Simple(
// ATTENTION on n'arrive jamais ici !
}
void Afficher_une_ligne_transparente_a_l_ecran_Simple(word Pos_X,word Pos_Y,word width,byte* line,byte Couleur_transparence)
void Afficher_une_ligne_transparente_a_l_ecran_Simple(word x_pos,word y_pos,word width,byte* line,byte Couleur_transparence)
{
byte* Src = line;
byte* Dest = Ecran + Pos_Y * Largeur_ecran + Pos_X;
byte* Dest = Ecran + y_pos * Largeur_ecran + x_pos;
word x;
@@ -354,7 +354,7 @@ 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
void Display_brush_Color_zoom_Simple(word Pos_X,word Pos_Y,
void Display_brush_Color_zoom_Simple(word x_pos,word y_pos,
word x_offset,word y_offset,
word width, // width non zoomée
word Pos_Y_Fin,byte Couleur_de_transparence,
@@ -362,7 +362,7 @@ void Display_brush_Color_zoom_Simple(word Pos_X,word Pos_Y,
byte * Buffer)
{
byte* Src = Brosse+y_offset*Largeur_brosse + x_offset;
word y = Pos_Y;
word y = y_pos;
byte bx;
// Pour chaque ligne
@@ -372,7 +372,7 @@ void Display_brush_Color_zoom_Simple(word Pos_X,word Pos_Y,
// 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,width*Loupe_Facteur,Buffer,Couleur_de_transparence);
Afficher_une_ligne_transparente_a_l_ecran_Simple(x_pos,y,width*Loupe_Facteur,Buffer,Couleur_de_transparence);
y++;
if(y==Pos_Y_Fin)
{
@@ -384,7 +384,7 @@ void Display_brush_Color_zoom_Simple(word Pos_X,word Pos_Y,
// ATTENTION zone jamais atteinte
}
void Display_brush_Mono_zoom_Simple(word Pos_X, word Pos_Y,
void Display_brush_Mono_zoom_Simple(word x_pos, word y_pos,
word x_offset, word y_offset,
word width, // width non zoomée
word Pos_Y_Fin,
@@ -395,7 +395,7 @@ void Display_brush_Mono_zoom_Simple(word Pos_X, word Pos_Y,
{
byte* Src = Brosse + y_offset * Largeur_brosse + x_offset;
int y=Pos_Y;
int y=y_pos;
//Pour chaque ligne à zoomer :
while(1)
@@ -414,7 +414,7 @@ void Display_brush_Mono_zoom_Simple(word Pos_X, word Pos_Y,
{
// On affiche la ligne zoomée
Afficher_une_ligne_transparente_mono_a_l_ecran_Simple(
Pos_X, y, width * Loupe_Facteur,
x_pos, y, width * Loupe_Facteur,
Buffer, Couleur_de_transparence, Couleur
);
// On passe à la ligne suivante
@@ -422,8 +422,8 @@ void Display_brush_Mono_zoom_Simple(word Pos_X, word Pos_Y,
// On vérifie qu'on est pas à la ligne finale
if(y == Pos_Y_Fin)
{
UpdateRect( Pos_X, Pos_Y,
width * Loupe_Facteur, Pos_Y_Fin - Pos_Y );
UpdateRect( x_pos, y_pos,
width * Loupe_Facteur, Pos_Y_Fin - y_pos );
return;
}
BX --;
@@ -435,11 +435,11 @@ void Display_brush_Mono_zoom_Simple(word Pos_X, word Pos_Y,
}
}
void Clear_brush_zoom_Simple(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)
void Clear_brush_zoom_Simple(word x_pos,word y_pos,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 * image_width + x_offset;
int y = Pos_Y;
int y = y_pos;
int bx;
// Pour chaque ligne à zoomer
@@ -450,15 +450,15 @@ void Clear_brush_zoom_Simple(word Pos_X,word Pos_Y,word x_offset,word y_offset,w
// Pour chaque ligne
do{
Afficher_une_ligne_ecran_Simple(Pos_X,y,
Afficher_une_ligne_ecran_Simple(x_pos,y,
width * Loupe_Facteur,Buffer);
// Ligne suivante
y++;
if(y==Pos_Y_Fin)
{
UpdateRect(Pos_X,Pos_Y,
width*Loupe_Facteur,Pos_Y_Fin-Pos_Y);
UpdateRect(x_pos,y_pos,
width*Loupe_Facteur,Pos_Y_Fin-y_pos);
return;
}
bx--;