From f6b184cd9b979089739b73a92006eb4b268415b4 Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Tue, 17 Feb 2009 00:44:47 +0000 Subject: [PATCH] Fix color remapping problems in wide/double pixels (window background and FG color) git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@638 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- moteur.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/moteur.c b/moteur.c index b9d53c25..9dc10c4d 100644 --- a/moteur.c +++ b/moteur.c @@ -162,7 +162,9 @@ void Restaure_fond(byte *Buffer, int Pos_X, int Pos_Y, int Largeur, int Hauteur) // Ecrit un pixel dans un fond de fenêtre void Pixel_fond(int Pos_X, int Pos_Y, byte Couleur) { - (Fond_fenetre[0][Pos_X+Pos_Y*Fenetre_Largeur*Menu_Facteur_X])=Couleur; + int Repetitions_X=Pixel_width; + while (Repetitions_X--) + (Fond_fenetre[0][Pos_X*Pixel_width+Repetitions_X+Pos_Y*Fenetre_Largeur*Pixel_width*Menu_Facteur_X])=Couleur; } @@ -2301,11 +2303,11 @@ void Remappe_fond_fenetres(byte * Table_de_conversion, int Min_Y, int Max_Y) return; if (dx+Pile_Fenetre_Pos_Y[Indice_fenetre]0;cx--) + for(cx=Pile_Fenetre_Largeur[Indice_fenetre]*Menu_Facteur_X*Pixel_width;cx>0;cx--) { *EDI = Table_de_conversion[*EDI]; EDI ++;