Set_color did not divide colors by 4 for VGAcompatibility
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@115 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
2c187ef632
commit
d9cc87b669
22
divers.c
22
divers.c
@ -484,9 +484,23 @@ void Rotate_90_deg_LOWLEVEL(byte * Source,byte * Destination)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remplacer une couleur par une autre dans un buffer
|
||||||
|
|
||||||
void Remap_general_LOWLEVEL(byte * Table_conv,byte * Buffer,short Largeur,short Hauteur,short Largeur_buffer)
|
void Remap_general_LOWLEVEL(byte * Table_conv,byte * Buffer,short Largeur,short Hauteur,short Largeur_buffer)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
int dx,cx;
|
||||||
|
|
||||||
|
// Pour chaque ligne
|
||||||
|
for(dx=Hauteur;dx>0;dx--)
|
||||||
|
{
|
||||||
|
// Pour chaque pixel
|
||||||
|
for(cx=Largeur;cx>0;cx--)
|
||||||
|
{
|
||||||
|
*Buffer = Table_conv[*Buffer];
|
||||||
|
Buffer++;
|
||||||
|
}
|
||||||
|
Buffer += Largeur_buffer-Largeur;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Copier_image_dans_brosse(short Debut_X,short Debut_Y,short Brosse_Largeur,short Brosse_Hauteur,word Largeur_image)
|
void Copier_image_dans_brosse(short Debut_X,short Debut_Y,short Brosse_Largeur,short Brosse_Hauteur,word Largeur_image)
|
||||||
@ -779,9 +793,9 @@ byte Meilleure_couleur_sans_exclusion(byte Rouge,byte Vert,byte Bleu)
|
|||||||
void Set_color(byte Couleur, byte Rouge, byte Vert, byte Bleu)
|
void Set_color(byte Couleur, byte Rouge, byte Vert, byte Bleu)
|
||||||
{
|
{
|
||||||
SDL_Color comp;
|
SDL_Color comp;
|
||||||
comp.r=Rouge;
|
comp.r=Rouge << 2;
|
||||||
comp.g=Vert;
|
comp.g=Vert << 2;
|
||||||
comp.b=Bleu;
|
comp.b=Bleu << 2;
|
||||||
SDL_SetColors(Ecran_SDL,&comp,Couleur,1);
|
SDL_SetColors(Ecran_SDL,&comp,Couleur,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user