Smoothing, QuickShade.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@117 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues 2008-08-12 16:52:20 +00:00
parent 48cadad912
commit 027ffd4bf5
2 changed files with 6 additions and 4 deletions

View File

@ -525,8 +525,7 @@ void Copier_image_dans_brosse(short Debut_X,short Debut_Y,short Brosse_Largeur,s
byte Lit_pixel_dans_ecran_feedback (word X,word Y) byte Lit_pixel_dans_ecran_feedback (word X,word Y)
{ {
UNIMPLEMENTED return *(FX_Feedback_Ecran+Y*Principal_Largeur_image+X);
return 0;
} }
dword Round_div(dword Numerateur,dword Diviseur) dword Round_div(dword Numerateur,dword Diviseur)

7
op_c.c
View File

@ -146,8 +146,6 @@ byte TC_Get(Table_conversion * t,int r,int v,int b)
// On recherche la couleur la plus proche dans la table de conversion // On recherche la couleur la plus proche dans la table de conversion
indice=(r<<t->dec_r) | (v<<t->dec_v) | (b<<t->dec_b); indice=(r<<t->dec_r) | (v<<t->dec_v) | (b<<t->dec_b);
if(r!=0 && v != 0 && b != 0)
printf("%d %d %d %d\n",indice,r,v,b);
return t->table[indice]; return t->table[indice];
} }
@ -266,6 +264,11 @@ void TO_Compter_occurences(Table_occurence * t,Bitmap24B image,int taille)
Bitmap24B ptr; Bitmap24B ptr;
int indice; int indice;
DEBUG("reduction",t->red_r);
DEBUG("decalage rouge",t->dec_r);
DEBUG("decalage vert",t->dec_v);
DEBUG("decalage bleu",t->dec_b);
for (indice=taille,ptr=image;indice>0;indice--,ptr++) for (indice=taille,ptr=image;indice>0;indice--,ptr++)
TO_Inc(t,ptr->R,ptr->V,ptr->B); TO_Inc(t,ptr->R,ptr->V,ptr->B);
} }