diff options
-rw-r--r-- | src/post/goom/filters.c | 118 | ||||
-rw-r--r-- | src/post/goom/filters.h | 6 | ||||
-rw-r--r-- | src/post/goom/goom_config.h | 18 | ||||
-rw-r--r-- | src/post/goom/goom_core.c | 114 | ||||
-rw-r--r-- | src/post/goom/goom_tools.h | 2 | ||||
-rw-r--r-- | src/post/goom/ifs.c | 54 | ||||
-rw-r--r-- | src/post/goom/ifs.h | 10 | ||||
-rw-r--r-- | src/post/goom/lines.c | 14 | ||||
-rw-r--r-- | src/post/goom/lines.h | 14 |
9 files changed, 179 insertions, 171 deletions
diff --git a/src/post/goom/filters.c b/src/post/goom/filters.c index 701619705..26402c2f3 100644 --- a/src/post/goom/filters.c +++ b/src/post/goom/filters.c @@ -10,7 +10,7 @@ * la vitesse est maintenant comprise dans [0..128] au lieu de [0..100] */ -//#define _DEBUG_PIXEL; +/* #define _DEBUG_PIXEL; */ #include "filters.h" #include "graphic.h" @@ -53,12 +53,12 @@ unsigned int ppcsize4; #endif /* PowerPC */ -signed int *brutS = 0, *freebrutS = 0; // source -signed int *brutD = 0, *freebrutD = 0; // dest -signed int *brutT = 0, *freebrutT = 0; // temp (en cours de génération) +signed int *brutS = 0, *freebrutS = 0; /* source */ +signed int *brutD = 0, *freebrutD = 0; /* dest */ +signed int *brutT = 0, *freebrutT = 0; /* temp (en cours de génération) */ -guint32 *expix1 = 0; // pointeur exporte vers p1 -guint32 *expix2 = 0; // pointeur exporte vers p2 +guint32 *expix1 = 0; /* pointeur exporte vers p1 */ +guint32 *expix2 = 0; /* pointeur exporte vers p2 */ guint32 zoom_width; int prevX=0,prevY=0; @@ -72,25 +72,25 @@ static int vPlaneEffect = 0; static int hPlaneEffect = 0; static char noisify = 2; static int middleX , middleY ; -//static unsigned char sqrtperte = 16 ; +/* static unsigned char sqrtperte = 16 ; */ /** modif by jeko : fixedpoint : buffration = (16:16) (donc 0<=buffration<=2^16) */ -//static int buffratio = 0; +/* static int buffratio = 0; */ int buffratio = 0; #define BUFFPOINTNB 16 #define BUFFPOINTMASK 0xffff #define BUFFINCR 0xff #define sqrtperte 16 -// faire : a % sqrtperte <=> a & pertemask +/* faire : a % sqrtperte <=> a & pertemask */ #define PERTEMASK 0xf -// faire : a / sqrtperte <=> a >> PERTEDEC +/* faire : a / sqrtperte <=> a >> PERTEDEC */ #define PERTEDEC 4 static int * firedec = 0 ; -// retourne x>>s , en testant le signe de x +/* retourne x>>s , en testant le signe de x */ inline int ShiftRight (int x, const unsigned char s) { if (x<0) @@ -109,10 +109,10 @@ void generatePrecalCoef () { int coefh,coefv; firstime = 0; - // precalCoef = (int**) malloc (17*sizeof (int*)); + /* precalCoef = (int**) malloc (17*sizeof (int*)); */ for (coefh=0;coefh<16;coefh++) { - // precalCoef [coefh] = (int *) malloc (17*sizeof (int)); + /* precalCoef [coefh] = (int *) malloc (17*sizeof (int)); */ for (coefv=0;coefv<16;coefv++) { int i; @@ -122,7 +122,7 @@ void generatePrecalCoef () { diffcoeffh = sqrtperte - coefh; diffcoeffv = sqrtperte - coefv; - // coeffs[myPos] = ((px >> PERTEDEC) + prevX * (py >> PERTEDEC)) << 2; + /* coeffs[myPos] = ((px >> PERTEDEC) + prevX * (py >> PERTEDEC)) << 2; */ if (!(coefh || coefv)) i = 255 ; else { int i1,i2,i3,i4; @@ -185,10 +185,10 @@ inline void calculatePXandPY (int x, int y, int *px, int *py) vy = (y - middleY) << 9; if (hPlaneEffect) vx += hPlaneEffect * (y - middleY); - // else vx = (x - middleX) << 9 ; + /* else vx = (x - middleX) << 9 ; */ if (vPlaneEffect) vy += vPlaneEffect * (x - middleX); - // else vy = (y - middleY) << 9 ; + /* else vy = (y - middleY) << 9 ; */ if (waveEffect) { fvitesse *= 1024 + ShiftRight ( @@ -235,7 +235,7 @@ inline void calculatePXandPY (int x, int y, int *px, int *py) if (fvitesse < -3024) fvitesse = -3024; - if (vx<0) // pb avec decalage sur nb negatif + if (vx<0) /* pb avec decalage sur nb negatif */ ppx = - (-(vx * fvitesse) >> 16); /* 16 = 9 + 7 (7 = nb chiffre virgule de vitesse * (v = 128 => immobile) @@ -253,28 +253,28 @@ inline void calculatePXandPY (int x, int y, int *px, int *py) } } -//#define _DEBUG +/* #define _DEBUG */ inline void setPixelRGB(Uint *buffer, Uint x, Uint y, Color c) { - // buffer[ y*WIDTH + x ] = (c.r<<16)|(c.v<<8)|c.b + /* buffer[ y*WIDTH + x ] = (c.r<<16)|(c.v<<8)|c.b */ #ifdef _DEBUG_PIXEL if ( x+y*resolx >= resolx * resoly) { fprintf (stderr,"setPixel ERROR : hors du tableau... %i, %i\n", x,y) ; - //exit (1) ; + /* exit (1) ; */ } #endif -//#ifdef USE_DGA -// buffer[ y*resolx + x ] = (c.b<<16)|(c.v<<8)|c.r ; -//#else -//#ifdef COLOR_BGRA +/* #ifdef USE_DGA */ +/* buffer[ y*resolx + x ] = (c.b<<16)|(c.v<<8)|c.r ; */ +/* #else */ +/* #ifdef COLOR_BGRA */ buffer[ y*resolx + x ] = (c.b<<(BLEU*8))|(c.v<<(VERT*8))|(c.r<<(ROUGE*8)) ; -//#else -// buffer[ y*resolx + x ] = (c.r<<16)|(c.v<<8)|c.b ; -//#endif -//#endif +/* #else */ +/* buffer[ y*resolx + x ] = (c.r<<16)|(c.v<<8)|c.b ; */ +/* #endif */ +/* #endif */ } @@ -284,49 +284,51 @@ inline void setPixelRGB_ (Uint *buffer, Uint x, Color c) if ( x >= resolx*c_resoly ) { printf ("setPixel ERROR : hors du tableau... %i\n", x) ; - // exit (1) ; + /* exit (1) ; */ } #endif -//#ifdef USE_DGA -// buffer[ x ] = (c.b<<16)|(c.v<<8)|c.r ; -//#else -//#ifdef COLOR_BGRA -// buffer[ x ] = (c.b<<24)|(c.v<<16)|(c.r<<8) ; -//#else +/* #ifdef USE_DGA */ +/* buffer[ x ] = (c.b<<16)|(c.v<<8)|c.r ; */ +/* #else */ +/* #ifdef COLOR_BGRA */ +/* buffer[ x ] = (c.b<<24)|(c.v<<16)|(c.r<<8) ; */ +/* #else */ buffer[ x ] = (c.r<<(ROUGE*8))|(c.v<<(VERT*8))|c.b<<(BLEU*8) ; -//#endif -//#endif +/* #endif */ +/* #endif */ } inline void getPixelRGB (Uint *buffer, Uint x, Uint y, Color *c) { -// register unsigned char *tmp8; +/* register unsigned char *tmp8; */ unsigned int i; #ifdef _DEBUG if (x + y * resolx >= resolx * c_resoly) { printf ("getPixel ERROR : hors du tableau... %i, %i\n", x,y) ; - // exit (1) ; + /* exit (1) ; */ } #endif - //#ifdef __BIG_ENDIAN__ - // c->b = *(unsigned char *)(tmp8 = (unsigned char*)(buffer + (x + y*resolx))); - // c->r = *(unsigned char *)(++tmp8); - // c->v = *(unsigned char *)(++tmp8); - // c->b = *(unsigned char *)(++tmp8); + /* + #ifdef __BIG_ENDIAN__ + c->b = *(unsigned char *)(tmp8 = (unsigned char*)(buffer + (x + y*resolx))); + c->r = *(unsigned char *)(++tmp8); + c->v = *(unsigned char *)(++tmp8); + c->b = *(unsigned char *)(++tmp8); - //#else + #else + */ /* ATTENTION AU PETIT INDIEN */ i = *(buffer + (x + y*resolx)); c->b = (i>>(BLEU*8)) & 0xff; c->v = (i>>(VERT*8)) & 0xff; c->r = (i>>(ROUGE*8)) & 0xff; - // *c = (Color) buffer[x+y*WIDTH] ; -//#endif + /* *c = (Color) buffer[x+y*WIDTH] ; */ +/* #endif */ } @@ -338,7 +340,7 @@ inline void getPixelRGB_ (Uint *buffer, Uint x, Color *c) if ( x >= resolx * c_resoly ) { printf ("getPixel ERROR : hors du tableau... %i\n", x) ; - // exit (1) ; + /* exit (1) ; */ } #endif @@ -353,7 +355,7 @@ inline void getPixelRGB_ (Uint *buffer, Uint x, Color *c) c->b = *(unsigned char *)(tmp8 = (unsigned char*)(buffer + x)); c->v = *(unsigned char *)(++tmp8); c->r = *(unsigned char *)(++tmp8); - // *c = (Color) buffer[x+y*WIDTH] ; + /* *c = (Color) buffer[x+y*WIDTH] ; */ #endif } @@ -386,7 +388,7 @@ void c_zoom () { } else { pos = ((px >> PERTEDEC) + prevX * (py >> PERTEDEC)); - // coef en modulo 15 + /* coef en modulo 15 */ coeffs = precalCoef [px & PERTEMASK][py & PERTEMASK]; } @@ -445,7 +447,7 @@ void zoomFilterFastRGB (Uint *pix1, { register Uint x, y; - static char reverse = 0 ; //vitesse inversé..(zoom out) + static char reverse = 0 ; /* vitesse inversé..(zoom out) */ static unsigned char pertedec = 8 ; static char firstTime = 1; @@ -494,7 +496,7 @@ void zoomFilterFastRGB (Uint *pix1, if (firstTime || zf) { - // generation d'une table de sinus + /* generation d'une table de sinus */ if (firstTime) { unsigned short us ; @@ -576,7 +578,7 @@ void zoomFilterFastRGB (Uint *pix1, } } - // generation du buffer de trans + /* generation du buffer de trans */ { /* sauvegarde de l'etat actuel dans la nouvelle source */ @@ -596,7 +598,7 @@ void zoomFilterFastRGB (Uint *pix1, for (x = 0; x < prevX ; x++) { int px,py; - //unsigned char coefv,coefh; + /* unsigned char coefv,coefh; */ calculatePXandPY (x,y,&px, &py) ; @@ -636,7 +638,7 @@ void zoomFilterFastRGB (Uint *pix1, #ifdef USE_ASM #ifdef MMX -// mmx_zoom () ; +/* mmx_zoom () ; */ if (use_asm) { zoom_filter_mmx (prevX, prevY, expix1, expix2, brutS, brutD, buffratio, precalCoef); } @@ -649,9 +651,9 @@ void zoomFilterFastRGB (Uint *pix1, zoom_width = prevX; if (useAltivec) { - //ppcsize4 = ((unsigned int)(prevX*prevY))/4; - //ppc_zoom_altivec(); - ppc_zoom(expix1,expix2,prevX,prevY, brutS, brutD, buffratio, precalCoef); // FIXME Altivec disabled since dynamic zooms +/* ppcsize4 = ((unsigned int)(prevX*prevY))/4; */ +/* ppc_zoom_altivec(); */ + ppc_zoom(expix1,expix2,prevX,prevY, brutS, brutD, buffratio, precalCoef); /* FIXME Altivec disabled since dynamic zooms */ } else { diff --git a/src/post/goom/filters.h b/src/post/goom/filters.h index 29727f11b..94e9a91aa 100644 --- a/src/post/goom/filters.h +++ b/src/post/goom/filters.h @@ -73,8 +73,8 @@ void sinFilter(Uint *pix1,Uint *pix2, #define SIN_MUL 1 #define SIN_ADD 2 -//#ifdef USE_ASM -//void setAsmUse (int useIt); -//#endif +/* #ifdef USE_ASM */ +/* void setAsmUse (int useIt); */ +/* #endif */ #endif diff --git a/src/post/goom/goom_config.h b/src/post/goom/goom_config.h index 0cc304781..765675a22 100644 --- a/src/post/goom/goom_config.h +++ b/src/post/goom/goom_config.h @@ -1,9 +1,9 @@ -//#define VERSION "1.9dev5" -//#define _DEBUG +/* #define VERSION "1.9dev5" */ +/* #define _DEBUG */ #define COLOR_BGRA -//#define COLOR_ARGB +/* #define COLOR_ARGB */ #ifdef COLOR_BGRA /** position des composantes **/ @@ -19,14 +19,14 @@ #endif -// target +/* target */ #define XMMS_PLUGIN -//#define STANDALONE +/* #define STANDALONE */ -// for pc users with mmx processors. -//#define MMX -//#define POWERPC -//#define VERBOSE +/* for pc users with mmx processors. */ +/* #define MMX */ +/* #define POWERPC */ +/* #define VERBOSE */ #ifndef guint32 #define guint8 unsigned char diff --git a/src/post/goom/goom_core.c b/src/post/goom/goom_core.c index 9113f0a0f..81e1ea6f3 100644 --- a/src/post/goom/goom_core.c +++ b/src/post/goom/goom_core.c @@ -6,7 +6,7 @@ #include "lines.h" #include "ifs.h" -//#define VERBOSE +/* #define VERBOSE */ #ifdef VERBOSE #include <stdio.h> @@ -28,7 +28,7 @@ guint32 resolx, resoly, buffsize, c_black_height=0, /* hauteur des bande noires en bas et en haut */ c_offset=0, c_resoly=0; /* avec prise en compte de ca */ -// effet de ligne.. +/* effet de ligne.. */ static GMLine *gmline1 = NULL; static GMLine *gmline2 = NULL; @@ -102,28 +102,28 @@ void goom_set_resolution (guint32 resx, guint32 resy, int cinemascope) guint32 * goom_update (gint16 data [2][512],int forceMode) { - static int lockvar = 0 ; // pour empecher de nouveaux changements - static int goomvar = 0 ; // boucle des gooms - static int totalgoom = 0 ; // nombre de gooms par seconds - static int agoom = 0 ; // un goom a eu lieu.. - static int loopvar = 0 ; // mouvement des points - static int speedvar = 0 ; // vitesse des particules - - // duree de la transition entre afficher les lignes ou pas + static int lockvar = 0 ; /* pour empecher de nouveaux changements */ + static int goomvar = 0 ; /* boucle des gooms */ + static int totalgoom = 0 ; /* nombre de gooms par seconds */ + static int agoom = 0 ; /* un goom a eu lieu.. */ + static int loopvar = 0 ; /* mouvement des points */ + static int speedvar = 0 ; /* vitesse des particules */ + + /* duree de la transition entre afficher les lignes ou pas */ #define DRAWLINES 70 - static int lineMode = DRAWLINES ; // l'effet lineaire a dessiner - static int nombreCDDC = 0; // nombre de Cycle Depuis Dernier Changement + static int lineMode = DRAWLINES ; /* l'effet lineaire a dessiner */ + static int nombreCDDC = 0; /* nombre de Cycle Depuis Dernier Changement */ guint32 * return_val; guint32 pointWidth; guint32 pointHeight; - int incvar ; // volume du son - int accelvar ; // acceleration des particules + int incvar ; /* volume du son */ + int accelvar ; /* acceleration des particules */ int i ; - float largfactor ; // elargissement de l'intervalle d'évolution des points + float largfactor ; /* elargissement de l'intervalle d'évolution des points */ - static int ifs_incr = 1; // dessiner l'ifs (0 = non: > = increment) - static int decay_ifs = 0; // disparition de l'ifs - static int recay_ifs = 0; // dédisparition de l'ifs + static int ifs_incr = 1; /* dessiner l'ifs (0 = non: > = increment) */ + static int decay_ifs = 0; /* disparition de l'ifs */ + static int recay_ifs = 0; /* dédisparition de l'ifs */ #define SWITCHMULT (19.0f/20.0f) #define SWITCHINCR 0xff @@ -132,7 +132,7 @@ guint32 * goom_update (gint16 data [2][512],int forceMode) /*static int lastgoom = 0;*/ - static char goomlimit = 2 ; // sensibilité du goom + static char goomlimit = 2 ; /* sensibilité du goom */ static ZoomFilterData zfd = { 127, 8, 16, @@ -196,7 +196,7 @@ guint32 * goom_update (gint16 data [2][512],int forceMode) if (ifs_incr > 0) ifs_update (p1+c_offset, p2+c_offset, resolx, c_resoly, ifs_incr); -// (p1+c_offset)[resolx/2 + c_resoly/2 * resolx] = 0; +/* (p1+c_offset)[resolx/2 + c_resoly/2 * resolx] = 0; */ if (ifs_incr != 1) { for (i = 1 ; i*15 <= speedvar + 15; i ++) { @@ -226,7 +226,7 @@ guint32 * goom_update (gint16 data [2][512],int forceMode) 66.0f, 74.0f, loopvar + i * 500); } } - // par défaut pas de changement de zoom + /* par défaut pas de changement de zoom */ pzfd = NULL ; /* @@ -238,33 +238,35 @@ guint32 * goom_update (gint16 data [2][512],int forceMode) } #endif - - // diminuer de 1 le temps de lockage - // note pour ceux qui n'ont pas suivis : le lockvar permet d'empecher un - // changement d'etat du plugins juste apres un autre changement d'etat. oki ? + /* + * diminuer de 1 le temps de lockage + * note pour ceux qui n'ont pas suivis : le lockvar permet d'empecher un + * changement d'etat du plugins juste apres un autre changement d'etat. oki ? + */ if (--lockvar < 0) lockvar = 0 ; - // temps du goom + /* temps du goom */ if (--agoom < 0) agoom = 0 ; - - // on verifie qu'il ne se pas un truc interressant avec le son. + + /* on verifie qu'il ne se pas un truc interressant avec le son. */ if ((accelvar>goomlimit) || (accelvar<-goomlimit) || (forceMode>0) || (nombreCDDC > TIME_BTW_CHG)) { -// if (nombreCDDC > 300) { -// } +/* if (nombreCDDC > 300) { */ +/* } */ - // UN GOOM !!! YAHOO ! + /* UN GOOM !!! YAHOO ! */ totalgoom ++ ; - agoom = 20 ; // mais pdt 20 cycles, il n'y en aura plus. - // lineMode = (lineMode + 1)%40; // Tous les 10 gooms on change de mode lineaire + agoom = 20 ; /* mais pdt 20 cycles, il n'y en aura plus. */ + /* lineMode = (lineMode + 1)%40; // Tous les 10 gooms on change de mode lineaire */ - // if (iRAND(12) == 0) - // zfd.vitesse=STOP_SPEED-1; - // if (iRAND(13) == 0) - // zfd.vitesse=STOP_SPEED+1; +/* if (iRAND(12) == 0) */ +/* zfd.vitesse=STOP_SPEED-1; */ +/* if (iRAND(13) == 0) */ +/* zfd.vitesse=STOP_SPEED+1; */ - // changement eventuel de mode +/* changement eventuel de mode */ + switch (iRAND(28)) { case 0: @@ -334,21 +336,23 @@ guint32 * goom_update (gint16 data [2][512],int forceMode) } } - // tout ceci ne sera fait qu'en cas de non-blocage + /* tout ceci ne sera fait qu'en cas de non-blocage */ if (lockvar == 0) { - // reperage de goom (acceleration forte de l'acceleration du volume) - // -> coup de boost de la vitesse si besoin.. + /* + * reperage de goom (acceleration forte de l'acceleration du volume) + * -> coup de boost de la vitesse si besoin.. + */ if ( (accelvar>goomlimit) || (accelvar<-goomlimit) ) { goomvar ++ ; - //if (goomvar % 1 == 0) + /* if (goomvar % 1 == 0) */ { guint32 vtmp ; guint32 newvit ; lockvar = 50; newvit = STOP_SPEED - speedvar / 2 ; - // retablir le zoom avant.. + /* retablir le zoom avant.. */ if ((zfd.reverse) && (!(cycle%13)) && (rand ()%5==0)) @@ -368,7 +372,7 @@ guint32 * goom_update (gint16 data [2][512],int forceMode) if (iRAND(12) == 0) zfd.vitesse=STOP_SPEED+1; - // changement de milieu.. + /* changement de milieu.. */ switch (iRAND(25)) { case 0: @@ -457,7 +461,7 @@ guint32 * goom_update (gint16 data [2][512],int forceMode) zfd.hPlaneEffect = iRAND (2) ? 0 : zfd.hPlaneEffect; } - if (newvit < zfd.vitesse) // on accelere + if (newvit < zfd.vitesse) /* on accelere */ { pzfd = &zfd; if ( ( (newvit < STOP_SPEED - 7) && @@ -481,7 +485,7 @@ guint32 * goom_update (gint16 data [2][512],int forceMode) switchMult = 1.0f; } } - // mode mega-lent + /* mode mega-lent */ if (iRAND(700) == 0) { /* @@ -498,7 +502,7 @@ guint32 * goom_update (gint16 data [2][512],int forceMode) } } - // gros frein si la musique est calme + /* gros frein si la musique est calme */ if ((speedvar < 1) && (zfd.vitesse < STOP_SPEED - 4) && (cycle % 16 == 0)) { /* @@ -514,7 +518,7 @@ guint32 * goom_update (gint16 data [2][512],int forceMode) */ } - // baisser regulierement la vitesse... + /* baisser regulierement la vitesse... */ if ( (cycle % 73 == 0) && (zfd.vitesse < STOP_SPEED - 5)) { /* @@ -524,7 +528,7 @@ guint32 * goom_update (gint16 data [2][512],int forceMode) zfd.vitesse ++ ; } - // arreter de decrémenter au bout d'un certain temps + /* arreter de decrémenter au bout d'un certain temps */ if ((cycle % 101 == 0) && (zfd.pertedec == 7)) { pzfd = &zfd ; @@ -580,7 +584,7 @@ guint32 * goom_update (gint16 data [2][512],int forceMode) - // si on est dans un goom : afficher les lignes... + /* si on est dans un goom : afficher les lignes... */ if (lineMode != DRAWLINES) { lineMode --; @@ -632,7 +636,7 @@ guint32 * goom_update (gint16 data [2][512],int forceMode) ? (lineMode/10) : 0, p2+c_offset,agoom-15); */ - // Zoom here ! + /* Zoom here ! */ zoomFilterFastRGB (p1+c_offset, p2+c_offset, pzfd, resolx, c_resoly, switchIncr, switchMult) ; @@ -642,16 +646,16 @@ guint32 * goom_update (gint16 data [2][512],int forceMode) p1=p2; p2=tmp; - // affichage et swappage des buffers.. + /* affichage et swappage des buffers.. */ cycle++; - // tous les 100 cycles : vérifier si le taux de goom est correct - // et le modifier sinon.. + /* tous les 100 cycles : vérifier si le taux de goom est correct */ + /* et le modifier sinon.. */ if (!(cycle%100)) { if (totalgoom>15) { - // printf ("less gooms\n") ; + /* printf ("less gooms\n") ; */ goomlimit ++ ; } else diff --git a/src/post/goom/goom_tools.h b/src/post/goom/goom_tools.h index d077c0cba..ad646e60d 100644 --- a/src/post/goom/goom_tools.h +++ b/src/post/goom/goom_tools.h @@ -23,7 +23,7 @@ extern unsigned short rand_pos ; rand_tab = 0; -//#define iRAND(i) ((guint32)((float)i * RAND()/RAND_MAX)) +/* #define iRAND(i) ((guint32)((float)i * RAND()/RAND_MAX)) */ #define iRAND(i) (RAND()%i) #endif diff --git a/src/post/goom/ifs.c b/src/post/goom/ifs.c index a6941c517..72330f4a3 100644 --- a/src/post/goom/ifs.c +++ b/src/post/goom/ifs.c @@ -33,7 +33,7 @@ static const char sccsid[] = "@(#)ifs.c 5.00 2002/04/11 baffe"; * that onto the screen, to reduce flicker. */ -//#ifdef STANDALONE +/* #ifdef STANDALONE */ #include <math.h> #include <stdlib.h> @@ -55,24 +55,24 @@ static const char sccsid[] = "@(#)ifs.c 5.00 2002/04/11 baffe"; #define SMOOTH_COLORS -//#include "xlockmore.h" /* in xscreensaver distribution */ -//#else /* STANDALONE */ -//#include "xlock.h" /* in xlockmore distribution */ -//#endif /* STANDALONE */ +/* #include "xlockmore.h" /\* in xscreensaver distribution *\/ */ +/* #else /\* STANDALONE *\/ */ +/* #include "xlock.h" /\* in xlockmore distribution *\/ */ +/* #endif /\* STANDALONE *\/ */ -//#ifdef MODE_ifs +/* #ifdef MODE_ifs */ -//ModeSpecOpt ifs_opts = -//{0, (XrmOptionDescRec *) NULL, 0, (argtype *) NULL, (OptionStruct *) NULL}; +/* ModeSpecOpt ifs_opts = */ +/* {0, (XrmOptionDescRec *) NULL, 0, (argtype *) NULL, (OptionStruct *) NULL}; */ -//#ifdef USE_MODULES -//ModStruct ifs_description = -//{"ifs", "init_ifs", "draw_ifs", "release_ifs", -// "init_ifs", "init_ifs", (char *) NULL, &ifs_opts, -// 1000, 1, 1, 1, 64, 1.0, "", -// "Shows a modified iterated function system", 0, NULL}; +/* #ifdef USE_MODULES */ +/* ModStruct ifs_description = */ +/* {"ifs", "init_ifs", "draw_ifs", "release_ifs", */ +/* "init_ifs", "init_ifs", (char *) NULL, &ifs_opts, */ +/* 1000, 1, 1, 1, 64, 1.0, "", */ +/* "Shows a modified iterated function system", 0, NULL}; */ -//#endif +/* #endif */ #define LRAND() ((long) (rand() & 0x7fffffff)) #define NRAND(n) ((int) (LRAND() % (n))) @@ -123,8 +123,8 @@ struct Fractal_Struct { int Cur_Pt, Max_Pt; IFSPoint *Buffer1, *Buffer2; -// Pixmap dbuf; -// GC dbuf_gc; +/* Pixmap dbuf; */ +/* GC dbuf_gc; */ }; static FRACTAL *Root = (FRACTAL *) NULL, *Cur_F; @@ -200,7 +200,7 @@ init_ifs(int width, int height) int i; FRACTAL *Fractal; -// printf ("initing ifs\n"); +/* printf ("initing ifs\n"); */ if (Root == NULL) { Root = (FRACTAL *) malloc(sizeof(FRACTAL)); @@ -211,9 +211,9 @@ init_ifs(int width, int height) } Fractal = Root; -// fprintf (stderr,"--ifs freeing ex-buffers\n"); +/* fprintf (stderr,"--ifs freeing ex-buffers\n"); */ free_ifs_buffers(Fractal); -// fprintf (stderr,"--ifs ok\n"); +/* fprintf (stderr,"--ifs ok\n"); */ i = (NRAND(4)) + 2; /* Number of centers */ switch (i) { @@ -246,7 +246,7 @@ init_ifs(int width, int height) Fractal->dr2_mean = .4; break; } -// fprintf( stderr, "N=%d\n", i ); +/* fprintf( stderr, "N=%d\n", i ); */ Fractal->Nb_Simi = i; Fractal->Max_Pt = Fractal->Nb_Simi - 1; for (i = 0; i <= Fractal->Depth + 2; ++i) @@ -263,7 +263,7 @@ init_ifs(int width, int height) return; } -// printf ("--ifs setting params\n"); +/* printf ("--ifs setting params\n"); */ Fractal->Speed = 6; Fractal->Width = width; /* modif by JeKo */ Fractal->Height = height; /* modif by JeKo */ @@ -306,10 +306,10 @@ init_ifs(int width, int height) } #endif */ - // MI_CLEARWINDOW(mi); + /* MI_CLEARWINDOW(mi); */ /* don't want any exposure events from XCopyPlane */ - // XSetGraphicsExposures(display, gc, False); + /* XSetGraphicsExposures(display, gc, False); */ } @@ -449,7 +449,7 @@ draw_ifs(/*ModeInfo * mi*/ int *nbpt) if (Root == NULL) return NULL; - F = Root; //[/*MI_SCREEN(mi)*/0]; + F = Root; /* [/\*MI_SCREEN(mi)*\/0]; */ if (F->Buffer1 == NULL) return NULL; @@ -477,7 +477,7 @@ draw_ifs(/*ModeInfo * mi*/ int *nbpt) S->A2 = u0 * S1->A2 + u1 * S2->A2 + u2 * S3->A2 + u3 * S4->A2; } - //MI_IS_DRAWN(mi) = True; + /* MI_IS_DRAWN(mi) = True; */ Draw_Fractal(/*mi*/); @@ -526,4 +526,4 @@ release_ifs() } } -//#endif /* MODE_ifs */ +/* #endif /\* MODE_ifs *\/ */ diff --git a/src/post/goom/ifs.h b/src/post/goom/ifs.h index a5e9fdeec..0b3cca3aa 100644 --- a/src/post/goom/ifs.h +++ b/src/post/goom/ifs.h @@ -11,14 +11,16 @@ typedef struct _ifsPoint { gint16 x,y; } IFSPoint; -// init ifs for a (width)x(height) output. +/* init ifs for a (width)x(height) output. */ void init_ifs (int width, int height); -// draw an ifs on the buffer (which size is width * height) -// increment means that we draw 1/increment of the ifs's points +/* + * draw an ifs on the buffer (which size is width * height) + * increment means that we draw 1/increment of the ifs's points + */ void ifs_update (guint32 *buffer, guint32 *back, int width, int height, int increment); -// free all ifs's data. +/* free all ifs's data. */ void release_ifs (); diff --git a/src/post/goom/lines.c b/src/post/goom/lines.c index 72ce65342..a988f342b 100644 --- a/src/post/goom/lines.c +++ b/src/post/goom/lines.c @@ -52,8 +52,8 @@ extern unsigned int resolx,c_resoly; static void draw_line (int *data, int x1,int y1,int x2,int y2, int col, int screenx, int screeny) { int x, y, dx, dy, yy, xx; int *p; -// DATA32 *p; -// DATA8 aaa, nr, ng, nb, rr, gg, bb, aa, na; +/* DATA32 *p; */ +/* DATA8 aaa, nr, ng, nb, rr, gg, bb, aa, na; */ /* clip to top edge */ if ((y1 < 0) && (y2 < 0)) @@ -189,7 +189,7 @@ static void draw_line (int *data, int x1,int y1,int x2,int y2, int col, int scre if (xx < (screenx - 1)) { p++; -// DRAWMETHOD; +/* DRAWMETHOD; */ } x += dx; } @@ -208,7 +208,7 @@ static void draw_line (int *data, int x1,int y1,int x2,int y2, int col, int scre if (yy < (screeny - 1)) { p += screeny; -// DRAWMETHOD; +/* DRAWMETHOD; */ } y += dy; } @@ -233,7 +233,7 @@ static void draw_line (int *data, int x1,int y1,int x2,int y2, int col, int scre if (xx < (screenx - 1)) { p--; -// DRAWMETHOD; +/* DRAWMETHOD; */ } x += dx; } @@ -252,7 +252,7 @@ static void draw_line (int *data, int x1,int y1,int x2,int y2, int col, int scre if (yy < (screeny - 1)) { p += screeny; -// DRAWMETHOD; +/* DRAWMETHOD; */ } y += dy; } @@ -358,7 +358,7 @@ void goom_lines_switch_to (GMLine *gml, int IDdest, float param, int col) { gml->IDdest = IDdest; gml->param = param; gml->color2 = getcouleur (col); -// printf ("couleur %d : %x\n",col,gml->color2); +/* printf ("couleur %d : %x\n",col,gml->color2); */ } inline unsigned char lighten(unsigned char value,float power) diff --git a/src/post/goom/lines.h b/src/post/goom/lines.h index c0c12d73a..24dcd4fc9 100644 --- a/src/post/goom/lines.h +++ b/src/post/goom/lines.h @@ -15,7 +15,7 @@ typedef struct _GMUNITPOINTER { float angle; } GMUnitPointer; -// tableau de points +/* tableau de points */ typedef struct _GMLINE { GMUnitPointer *points; @@ -36,18 +36,18 @@ typedef struct _GMLINE { float powinc; } GMLine; -// les ID possibles +/* les ID possibles */ #define GML_CIRCLE 0 -// (param = radius) +/* (param = radius) */ #define GML_HLINE 1 -// (param = y) +/* (param = y) */ #define GML_VLINE 2 -// (param = x) +/* (param = x) */ -// les modes couleur possible (si tu mets un autre c'est noir) +/* les modes couleur possible (si tu mets un autre c'est noir) */ #define GML_BLEUBLANC 0 #define GML_RED 1 @@ -71,5 +71,5 @@ void goom_lines_free (GMLine **gml); void goom_lines_draw (GMLine *gml, gint16 data [512], unsigned int* p); -//void goom_lines_conf(gint16 config [25]); +/* void goom_lines_conf(gint16 config [25]); */ |