translations
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@690 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
84
pxdouble.c
84
pxdouble.c
@@ -123,10 +123,10 @@ void Pixel_Preview_Loupe_Double (word X,word Y,byte Couleur)
|
||||
}
|
||||
}
|
||||
|
||||
void Ligne_horizontale_XOR_Double(word Pos_X,word Pos_Y,word width)
|
||||
void Ligne_horizontale_XOR_Double(word x_pos,word y_pos,word width)
|
||||
{
|
||||
//On calcule la valeur initiale de Dest:
|
||||
byte* Dest=Pos_Y*4*Largeur_ecran+Pos_X*2+Ecran;
|
||||
byte* Dest=y_pos*4*Largeur_ecran+x_pos*2+Ecran;
|
||||
|
||||
int X;
|
||||
|
||||
@@ -134,10 +134,10 @@ void Ligne_horizontale_XOR_Double(word Pos_X,word Pos_Y,word width)
|
||||
*(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 height)
|
||||
void Ligne_verticale_XOR_Double(word x_pos,word y_pos,word height)
|
||||
{
|
||||
int i;
|
||||
byte *Dest=Ecran+Pos_X*2+Pos_Y*Largeur_ecran*4;
|
||||
byte *Dest=Ecran+x_pos*2+y_pos*Largeur_ecran*4;
|
||||
for (i=height;i>0;i--)
|
||||
{
|
||||
*Dest=*(Dest+1)=*(Dest+Largeur_ecran*2)=*(Dest+Largeur_ecran*2+1)=~*Dest;
|
||||
@@ -145,10 +145,10 @@ void Ligne_verticale_XOR_Double(word Pos_X,word Pos_Y,word height)
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
void Display_brush_Color_Double(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 * 4 * Largeur_ecran + Pos_X * 2;
|
||||
byte* Dest = Ecran + y_pos * 4 * Largeur_ecran + x_pos * 2;
|
||||
// Src = Position dans la brosse
|
||||
byte* Src = Brosse + y_offset * Largeur_brosse + x_offset;
|
||||
|
||||
@@ -175,15 +175,15 @@ void Display_brush_Color_Double(word Pos_X,word Pos_Y,word x_offset,word y_offse
|
||||
Dest = Dest + Largeur_ecran*4 - width*2;
|
||||
Src = Src + Largeur_brosse - width;
|
||||
}
|
||||
UpdateRect(Pos_X,Pos_Y,width,height);
|
||||
UpdateRect(x_pos,y_pos,width,height);
|
||||
}
|
||||
|
||||
void Display_brush_Mono_Double(word Pos_X, word Pos_Y,
|
||||
void Display_brush_Mono_Double(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*4*Largeur_ecran+Pos_X*2+Ecran; // Dest = adr destination à
|
||||
byte* Dest=y_pos*4*Largeur_ecran+x_pos*2+Ecran; // Dest = adr destination à
|
||||
// l'écran
|
||||
byte* Src=Largeur_brosse*y_offset+x_offset+Brosse; // Src = adr ds
|
||||
// la brosse
|
||||
@@ -207,13 +207,13 @@ void Display_brush_Mono_Double(word Pos_X, word Pos_Y,
|
||||
Src+=Largeur_brosse-width;
|
||||
Dest+=Largeur_ecran*4-width*2;
|
||||
}
|
||||
UpdateRect(Pos_X,Pos_Y,width,height);
|
||||
UpdateRect(x_pos,y_pos,width,height);
|
||||
}
|
||||
|
||||
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)
|
||||
void Clear_brush_Double(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*2+Pos_Y*4*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*2+y_pos*4*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;
|
||||
int x;
|
||||
|
||||
@@ -234,14 +234,14 @@ void Clear_brush_Double(word Pos_X,word Pos_Y,__attribute__((unused)) word x_off
|
||||
Src+=image_width-width;
|
||||
Dest+=Largeur_ecran*4-width*2;
|
||||
}
|
||||
UpdateRect(Pos_X,Pos_Y,width,height);
|
||||
UpdateRect(x_pos,y_pos,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 width,word height,byte Couleur_de_transparence,word Largeur_brosse)
|
||||
void Affiche_brosse_Double(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 * 4 * Largeur_ecran + Pos_X * 2;
|
||||
byte* Dest = Ecran + y_pos * 4 * Largeur_ecran + x_pos * 2;
|
||||
// Src = Position dans la brosse
|
||||
byte* Src = brush + y_offset * Largeur_brosse + x_offset;
|
||||
|
||||
@@ -269,10 +269,10 @@ void Affiche_brosse_Double(byte * brush, word Pos_X,word Pos_Y,word x_offset,wor
|
||||
}
|
||||
}
|
||||
|
||||
void Remap_screen_Double(word Pos_X,word Pos_Y,word width,word height,byte * Table_de_conversion)
|
||||
void Remap_screen_Double(word x_pos,word y_pos,word width,word height,byte * Table_de_conversion)
|
||||
{
|
||||
// Dest = coords a l'écran
|
||||
byte* Dest = Ecran + Pos_Y * 4 * Largeur_ecran + Pos_X * 2;
|
||||
byte* Dest = Ecran + y_pos * 4 * Largeur_ecran + x_pos * 2;
|
||||
int x,y;
|
||||
|
||||
// Pour chaque ligne
|
||||
@@ -289,23 +289,23 @@ void Remap_screen_Double(word Pos_X,word Pos_Y,word width,word height,byte * Tab
|
||||
Dest = Dest + Largeur_ecran*4 - width*2;
|
||||
}
|
||||
|
||||
UpdateRect(Pos_X,Pos_Y,width,height);
|
||||
UpdateRect(x_pos,y_pos,width,height);
|
||||
}
|
||||
|
||||
void Afficher_une_ligne_ecran_fast_Double(word Pos_X,word Pos_Y,word width,byte * line)
|
||||
void Afficher_une_ligne_ecran_fast_Double(word x_pos,word y_pos,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,line,width*2);
|
||||
memcpy(Ecran+Pos_X*2+(Pos_Y*4+2)*Largeur_ecran,line,width*2);
|
||||
memcpy(Ecran+x_pos*2+y_pos*4*Largeur_ecran,line,width*2);
|
||||
memcpy(Ecran+x_pos*2+(y_pos*4+2)*Largeur_ecran,line,width*2);
|
||||
}
|
||||
|
||||
void Afficher_une_ligne_ecran_Double(word Pos_X,word Pos_Y,word width,byte * line)
|
||||
void Afficher_une_ligne_ecran_Double(word x_pos,word y_pos,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;
|
||||
Dest=Ecran+x_pos*2+y_pos*4*Largeur_ecran;
|
||||
for(x=width;x>0;x--)
|
||||
{
|
||||
*(Dest+Largeur_ecran*2+1)=*(Dest+Largeur_ecran*2)=*(Dest+1)=*Dest=*line;
|
||||
@@ -314,12 +314,12 @@ void Afficher_une_ligne_ecran_Double(word Pos_X,word Pos_Y,word width,byte * lin
|
||||
}
|
||||
}
|
||||
void Afficher_une_ligne_transparente_mono_a_l_ecran_Double(
|
||||
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*ZOOMX*Largeur_ecran + Pos_X*ZOOMX;
|
||||
byte* Dest = Ecran+ y_pos*ZOOMX*Largeur_ecran + x_pos*ZOOMX;
|
||||
int x;
|
||||
// Pour chaque pixel
|
||||
for(x=0;x<width;x++)
|
||||
@@ -333,9 +333,9 @@ void Afficher_une_ligne_transparente_mono_a_l_ecran_Double(
|
||||
}
|
||||
}
|
||||
|
||||
void Lire_une_ligne_ecran_Double(word Pos_X,word Pos_Y,word width,byte * line)
|
||||
void Lire_une_ligne_ecran_Double(word x_pos,word y_pos,word width,byte * line)
|
||||
{
|
||||
memcpy(line,Largeur_ecran * 4 * Pos_Y + Pos_X * 2 + Ecran,width*2);
|
||||
memcpy(line,Largeur_ecran * 4 * y_pos + x_pos * 2 + Ecran,width*2);
|
||||
}
|
||||
|
||||
void Afficher_partie_de_l_ecran_zoomee_Double(
|
||||
@@ -379,7 +379,7 @@ 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,
|
||||
void Display_brush_Color_zoom_Double(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,
|
||||
@@ -387,7 +387,7 @@ void Display_brush_Color_zoom_Double(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
|
||||
@@ -397,9 +397,9 @@ void Display_brush_Color_zoom_Double(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_Wide(Pos_X,y*ZOOMX,width*Loupe_Facteur,Buffer,Couleur_de_transparence);
|
||||
Afficher_une_ligne_transparente_a_l_ecran_Wide(x_pos,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, width*ZOOMX*Loupe_Facteur);
|
||||
memcpy(Ecran + (y*ZOOMY+1)*ZOOMX*Largeur_ecran + x_pos*ZOOMX, Ecran + y*ZOOMX*ZOOMY*Largeur_ecran + x_pos*ZOOMX, width*ZOOMX*Loupe_Facteur);
|
||||
y++;
|
||||
if(y==Pos_Y_Fin)
|
||||
{
|
||||
@@ -411,7 +411,7 @@ void Display_brush_Color_zoom_Double(word Pos_X,word Pos_Y,
|
||||
// ATTENTION zone jamais atteinte
|
||||
}
|
||||
|
||||
void Display_brush_Mono_zoom_Double(word Pos_X, word Pos_Y,
|
||||
void Display_brush_Mono_zoom_Double(word x_pos, word y_pos,
|
||||
word x_offset, word y_offset,
|
||||
word width, // width non zoomée
|
||||
word Pos_Y_Fin,
|
||||
@@ -422,7 +422,7 @@ void Display_brush_Mono_zoom_Double(word Pos_X, word Pos_Y,
|
||||
|
||||
{
|
||||
byte* Src = Brosse + y_offset * Largeur_brosse + x_offset;
|
||||
int y=Pos_Y*ZOOMY;
|
||||
int y=y_pos*ZOOMY;
|
||||
|
||||
//Pour chaque ligne à zoomer :
|
||||
while(1)
|
||||
@@ -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, width * Loupe_Facteur,
|
||||
x_pos, y, width * Loupe_Facteur,
|
||||
Buffer, Couleur_de_transparence, Couleur
|
||||
);
|
||||
// On passe à la ligne suivante
|
||||
@@ -449,8 +449,8 @@ void Display_brush_Mono_zoom_Double(word Pos_X, word Pos_Y,
|
||||
// On vérifie qu'on est pas à la ligne finale
|
||||
if(y == Pos_Y_Fin*ZOOMX)
|
||||
{
|
||||
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 --;
|
||||
@@ -462,12 +462,12 @@ 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 width,word Pos_Y_Fin,__attribute__((unused)) byte Couleur_de_transparence,word image_width,byte * Buffer)
|
||||
void Clear_brush_zoom_Double(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
|
||||
@@ -479,15 +479,15 @@ void Clear_brush_zoom_Double(word Pos_X,word Pos_Y,word x_offset,word y_offset,w
|
||||
// Pour chaque ligne
|
||||
do{
|
||||
// TODO a verifier
|
||||
Afficher_une_ligne_ecran_fast_Double(Pos_X,y,
|
||||
Afficher_une_ligne_ecran_fast_Double(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--;
|
||||
|
||||
Reference in New Issue
Block a user