All code ready for mass translation
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@691 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
40
pxdouble.c
40
pxdouble.c
@@ -32,19 +32,19 @@
|
||||
#define ZOOMX 2
|
||||
#define ZOOMY 2
|
||||
|
||||
void Pixel_Double (word X,word Y,byte Couleur)
|
||||
/* Affiche un pixel de la Couleur aux coords X;Y à l'écran */
|
||||
void Pixel_Double (word x,word y,byte Couleur)
|
||||
/* Affiche un pixel de la Couleur aux coords x;y à l'écran */
|
||||
{
|
||||
*(Ecran + X * 2 + Y * 4 * Largeur_ecran)=Couleur;
|
||||
*(Ecran + X * 2 + Y * 4 * Largeur_ecran + 1)=Couleur;
|
||||
*(Ecran + X * 2 + (Y * 4 + 2 )* Largeur_ecran)=Couleur;
|
||||
*(Ecran + X * 2 + (Y * 4 + 2 )* Largeur_ecran + 1)=Couleur;
|
||||
*(Ecran + x * 2 + y * 4 * Largeur_ecran)=Couleur;
|
||||
*(Ecran + x * 2 + y * 4 * Largeur_ecran + 1)=Couleur;
|
||||
*(Ecran + x * 2 + (y * 4 + 2 )* Largeur_ecran)=Couleur;
|
||||
*(Ecran + x * 2 + (y * 4 + 2 )* Largeur_ecran + 1)=Couleur;
|
||||
}
|
||||
|
||||
byte Lit_Pixel_Double (word X,word Y)
|
||||
byte Lit_Pixel_Double (word x,word y)
|
||||
/* On retourne la couleur du pixel aux coords données */
|
||||
{
|
||||
return *( Ecran + Y * 4 * Largeur_ecran + X * 2);
|
||||
return *( Ecran + y * 4 * Largeur_ecran + x * 2);
|
||||
}
|
||||
|
||||
void Block_Double (word Debut_X,word Debut_Y,word width,word height,byte Couleur)
|
||||
@@ -86,28 +86,28 @@ void Afficher_partie_de_l_ecran_Double (word width,word height,word image_width)
|
||||
//UpdateRect(0,0,width,height);
|
||||
}
|
||||
|
||||
void Pixel_Preview_Normal_Double (word X,word Y,byte Couleur)
|
||||
void Pixel_Preview_Normal_Double (word x,word y,byte Couleur)
|
||||
/* Affichage d'un pixel dans l'écran, par rapport au décalage de l'image
|
||||
* dans l'écran, en mode normal (pas en mode loupe)
|
||||
* Note: si on modifie cette procédure, il faudra penser à faire également
|
||||
* la modif dans la procédure Pixel_Preview_Loupe_SDL. */
|
||||
{
|
||||
// if(X-Principal_Decalage_X >= 0 && Y - Principal_Decalage_Y >= 0)
|
||||
Pixel_Double(X-Principal_Decalage_X,Y-Principal_Decalage_Y,Couleur);
|
||||
// if(x-Principal_Decalage_X >= 0 && y - Principal_Decalage_Y >= 0)
|
||||
Pixel_Double(x-Principal_Decalage_X,y-Principal_Decalage_Y,Couleur);
|
||||
}
|
||||
|
||||
void Pixel_Preview_Loupe_Double (word X,word Y,byte Couleur)
|
||||
void Pixel_Preview_Loupe_Double (word x,word y,byte Couleur)
|
||||
{
|
||||
// Affiche le pixel dans la partie non zoomée
|
||||
Pixel_Double(X-Principal_Decalage_X,Y-Principal_Decalage_Y,Couleur);
|
||||
Pixel_Double(x-Principal_Decalage_X,y-Principal_Decalage_Y,Couleur);
|
||||
|
||||
// Regarde si on doit aussi l'afficher dans la partie zoomée
|
||||
if (Y >= Limite_Haut_Zoom && Y <= Limite_visible_Bas_Zoom
|
||||
&& X >= Limite_Gauche_Zoom && X <= Limite_visible_Droite_Zoom)
|
||||
if (y >= Limite_Haut_Zoom && y <= Limite_visible_Bas_Zoom
|
||||
&& x >= Limite_Gauche_Zoom && x <= Limite_visible_Droite_Zoom)
|
||||
{
|
||||
// On est dedans
|
||||
int height;
|
||||
int Y_Zoom = Table_mul_facteur_zoom[Y-Loupe_Decalage_Y];
|
||||
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
|
||||
@@ -117,7 +117,7 @@ void Pixel_Preview_Loupe_Double (word X,word Y,byte Couleur)
|
||||
height = Loupe_Facteur;
|
||||
|
||||
Block_Double(
|
||||
Table_mul_facteur_zoom[X-Loupe_Decalage_X]+Principal_X_Zoom,
|
||||
Table_mul_facteur_zoom[x-Loupe_Decalage_X]+Principal_X_Zoom,
|
||||
Y_Zoom, Loupe_Facteur, height, Couleur
|
||||
);
|
||||
}
|
||||
@@ -128,10 +128,10 @@ void Ligne_horizontale_XOR_Double(word x_pos,word y_pos,word width)
|
||||
//On calcule la valeur initiale de Dest:
|
||||
byte* Dest=y_pos*4*Largeur_ecran+x_pos*2+Ecran;
|
||||
|
||||
int X;
|
||||
int x;
|
||||
|
||||
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);
|
||||
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 x_pos,word y_pos,word height)
|
||||
|
||||
Reference in New Issue
Block a user