From 4427fe9093dc9212d5e6b5314a15dfbd5bcb5764 Mon Sep 17 00:00:00 2001 From: tth Date: Mon, 4 Jul 2022 11:17:33 +0200 Subject: [PATCH] compile time configuration --- Lib/cadres4.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/Lib/cadres4.c b/Lib/cadres4.c index 34dc684..d27b99a 100644 --- a/Lib/cadres4.c +++ b/Lib/cadres4.c @@ -66,15 +66,19 @@ return FUNC_IS_BETA; } /*::------------------------------------------------------------------::*/ /* - * 13 Juin 2002: grosse colère, je vais faire du codage à la Gruuik. + * 13 Juin 2002: grosse colere, je vais faire du codage a la Gruuik. + * 1er Juillet 2022: la colere est toujours la, mais ce n'est pas la + * meme qu'il y a vingt ans... */ int Image_cadre_burp_1(Image_Desc *img, int p1, int p2, int flags) { int x, xx, y, yy, v; +#define TOPV 170 + #if DEBUG_LEVEL -fprintf(stderr, "%s ( %p %d %d $%x )\n", __func__, img, p1, p2, flags); +fprintf(stderr, ">>> %s ( %p %d %d $%x )\n", __func__, img, p1, p2, flags); #endif for (x=0; xwidth; x++) @@ -86,14 +90,14 @@ for (x=0; xwidth; x++) for (yy=0; yyRpix[y])[x] = 255-v; - (img->Gpix[y])[x] = 255; + (img->Rpix[y])[x] = TOPV-v; + (img->Gpix[y])[x] = TOPV; (img->Bpix[y])[x] = v; y = img->height-yy-1; (img->Rpix[y])[x] = v; - (img->Gpix[y])[x] = 255; - (img->Bpix[y])[x] = 255-v; + (img->Gpix[y])[x] = TOPV; + (img->Bpix[y])[x] = TOPV-v; } } @@ -104,13 +108,13 @@ for (y=p1; yheight-p1; y++) { x = xx; (img->Rpix[y])[x] = 0; - (img->Gpix[y])[x] = 255; + (img->Gpix[y])[x] = TOPV; (img->Bpix[y])[x] = v; x = img->width-xx-1; (img->Rpix[y])[x] = 0; - (img->Gpix[y])[x] = 255; - (img->Bpix[y])[x] = 255-v; + (img->Gpix[y])[x] = TOPV; + (img->Bpix[y])[x] = TOPV-v; } } @@ -119,12 +123,15 @@ if (flags & 1) fprintf(stderr, "plop from %s\n", __func__); } +#undef TOPV /* molly guard */ + return OLL_KORRECT; } /*::------------------------------------------------------------------::*/ /* * new 10 decembre 2007 - ave St Exupery - fait pour l'affichage web * des exemples des objets POV de tTh + * */ int Image_cadre_burp_2(Image_Desc *img, int taille, int pr, int pg, int pb) @@ -132,7 +139,7 @@ Image_cadre_burp_2(Image_Desc *img, int taille, int pr, int pg, int pb) int x, y, zz; #if DEBUG_LEVEL -fprintf(stderr, "%s: sz %d, rgb %d %d %d\n", __func__, taille, pr, pg, pb); +fprintf(stderr, ">>> %s: sz %d, rgb %d %d %d\n", __func__, taille, pr, pg, pb); #endif for (x=0; xwidth; x++) @@ -197,7 +204,7 @@ int r, g, b; fprintf(stderr, "%s : img at %p, taille=%d\n", __func__, img, taille); #endif -#define RASTA_RAND 2 +#define RASTA_RAND 4 rect.x = rect.y = 0; rect.w = img->width;