From 568e4b734999ad45f5e85a544162a872d2284126 Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Fri, 17 Oct 2008 23:24:41 +0000 Subject: [PATCH] Implemented the Additive and Substractive modes, missing from the DOS version git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@286 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- divers.c | 28 ++++++++++++++++++++++------ gfx2.cfg | Bin 10062 -> 10062 bytes 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/divers.c b/divers.c index f6b60aa5..28b3de47 100644 --- a/divers.c +++ b/divers.c @@ -634,8 +634,6 @@ byte Effet_Colorize_interpole (word X,word Y,byte Couleur) byte Rouge=Principal_Palette[Couleur].R; // On récupère les 3 composantes RVB - - // Bleu Bleu = (Table_de_multiplication_par_Facteur_B[Bleu] @@ -650,14 +648,32 @@ byte Effet_Colorize_interpole (word X,word Y,byte Couleur) byte Effet_Colorize_additif (word X,word Y,byte Couleur) { - UNIMPLEMENTED - return 0; + byte Bleu_dessous=Principal_Palette[*(FX_Feedback_Ecran + Y * Principal_Largeur_image + X)].B; + byte Vert_dessous=Principal_Palette[*(FX_Feedback_Ecran + Y * Principal_Largeur_image + X)].V; + byte Rouge_dessous=Principal_Palette[*(FX_Feedback_Ecran + Y * Principal_Largeur_image + X)].R; + byte Bleu=Principal_Palette[Couleur].B; + byte Vert=Principal_Palette[Couleur].V; + byte Rouge=Principal_Palette[Couleur].R; + + return Meilleure_couleur( + Rouge>Rouge_dessous?Rouge:Rouge_dessous, + Vert>Vert_dessous?Vert:Vert_dessous, + Bleu>Bleu_dessous?Bleu:Bleu_dessous); } byte Effet_Colorize_soustractif(word X,word Y,byte Couleur) { - UNIMPLEMENTED - return 0; + byte Bleu_dessous=Principal_Palette[*(FX_Feedback_Ecran + Y * Principal_Largeur_image + X)].B; + byte Vert_dessous=Principal_Palette[*(FX_Feedback_Ecran + Y * Principal_Largeur_image + X)].V; + byte Rouge_dessous=Principal_Palette[*(FX_Feedback_Ecran + Y * Principal_Largeur_image + X)].R; + byte Bleu=Principal_Palette[Couleur].B; + byte Vert=Principal_Palette[Couleur].V; + byte Rouge=Principal_Palette[Couleur].R; + + return Meilleure_couleur( + Rouge=P5}-k21W)>4h9ee0Ra5I6yN{= delta 537 zcmZwFM{iS65QgFB+K#z_gs?*q8;c;etg=Qd*hb1f;Ge|wUN61(UIM1~-U6ogmH?p> zdauWUg^BnUM`z}H=ZrLSiVekv=K6GBA}MJZ6|%aCRqC#XD%E7yU2O6^eq&%KilZr2e|4 yCi&WmHgaL|!XSkmlJAUagWHk}=wFj7Jy@<1Tdt(BUu&;86@EZv92OsUdcOgC%y=&V