diff --git a/Lib/cadres4.c b/Lib/cadres4.c index d27b99a..d6f7b05 100644 --- a/Lib/cadres4.c +++ b/Lib/cadres4.c @@ -11,26 +11,23 @@ /*::------------------------------------------------------------------::*/ /* * fonction en chantier -> coredump probable - * je ne sais pas à quoi va servir le paramètre 'flags' ... + * je ne sais pas a quoi va servir le parametre 'flags' ... * 7 nov 2007: * le flag a disparu, il contient maintenant la valeur de * la composante verte. lol. */ -int -Image_cadre_burp_0(Image_Desc *img, int p1, int p2, int gval) +int Image_cadre_burp_0(Image_Desc *img, int p1, int p2, int gval) { int x, y, zz, v; #if DEBUG_LEVEL -fprintf(stderr, "%s p1=%d p2=%d flg=0x%02x\n", __func__, p1, p2, gval); +fprintf(stderr, ">>> %s ( %p %d %d 0x%02x )\n", __func__, img, p1, p2, gval); #endif -for (x=0; xwidth; x++) - { +for (x=0; xwidth; x++) { v = (x * 256) / img->width; - for (zz=0; zzRpix[y])[x] = 0; (img->Gpix[y])[x] = gval; @@ -43,11 +40,9 @@ for (x=0; xwidth; x++) } } -for (y=p1; yheight-p1; y++) - { +for (y=p1; yheight-p1; y++) { v = (y * 256) / img->height; - for (zz=0; zzRpix[y])[x] = 0; (img->Gpix[y])[x] = gval; @@ -70,8 +65,7 @@ return FUNC_IS_BETA; * 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 Image_cadre_burp_1(Image_Desc *img, int p1, int p2, int flags) { int x, xx, y, yy, v; @@ -81,14 +75,12 @@ int x, xx, y, yy, v; fprintf(stderr, ">>> %s ( %p %d %d $%x )\n", __func__, img, p1, p2, flags); #endif -for (x=0; xwidth; x++) - { +for (x=0; xwidth; x++) { v = (x * 256) / img->width; #if DEBUG_LEVEL > 1 printf("%s : debug %d %d\n", __func__, x, v); #endif - for (yy=0; yyRpix[y])[x] = TOPV-v; (img->Gpix[y])[x] = TOPV; @@ -101,11 +93,9 @@ for (x=0; xwidth; x++) } } -for (y=p1; yheight-p1; y++) - { +for (y=p1; yheight-p1; y++) { v = (y * 256) / img->height; - for (xx=0; xxRpix[y])[x] = 0; (img->Gpix[y])[x] = TOPV; @@ -118,8 +108,7 @@ for (y=p1; yheight-p1; y++) } } -if (flags & 1) - { +if (flags & 1) { fprintf(stderr, "plop from %s\n", __func__); } @@ -133,8 +122,7 @@ return OLL_KORRECT; * des exemples des objets POV de tTh * */ -int -Image_cadre_burp_2(Image_Desc *img, int taille, int pr, int pg, int pb) +int Image_cadre_burp_2(Image_Desc *img, int taille, int pr, int pg, int pb) { int x, y, zz; @@ -142,10 +130,8 @@ int x, y, zz; fprintf(stderr, ">>> %s: sz %d, rgb %d %d %d\n", __func__, taille, pr, pg, pb); #endif -for (x=0; xwidth; x++) - { - for (zz=0; zzwidth; x++) { + for (zz=0; zzRpix[y])[x] |= pr; (img->Gpix[y])[x] ^= pg; @@ -158,10 +144,8 @@ for (x=0; xwidth; x++) } } -for (y=taille; yheight-taille; y++) - { - for (zz=0; zzheight-taille; y++) { + for (zz=0; zzRpix[y])[x] |= pr; (img->Gpix[y])[x] ^= pg; @@ -177,13 +161,13 @@ for (y=taille; yheight-taille; y++) return OLL_KORRECT; } /*::------------------------------------------------------------------::*/ -int -Image_cadre_burp_3(Image_Desc *img, int taille, int pr, int pg, int pb) +int Image_cadre_burp_3(Image_Desc *img, int taille, int pr, int pg, int pb) { int foo; #if DEBUG_LEVEL -fprintf(stderr, "Cadre burp3 on %p\n", img); +fprintf(stderr, ">>> %s ( %p %d %d %d %d)\n", __func__, img, taille, + pr, pg, pb); #endif foo = Image_cadre_burp_2(img, taille, pr, pg, pb); @@ -201,7 +185,7 @@ int foo; int r, g, b; #if DEBUG_LEVEL -fprintf(stderr, "%s : img at %p, taille=%d\n", __func__, img, taille); +fprintf(stderr, ">>> %s ( %p %d )\n", __func__, img, taille); #endif #define RASTA_RAND 4 @@ -210,33 +194,30 @@ rect.x = rect.y = 0; rect.w = img->width; rect.h = img->height; -for (foo=0; foomodified = 1; -return FUNC_IS_BETA; +return OLL_KORRECT; } /*::------------------------------------------------------------------::*/