X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fflurry.h;h=14718b64f8265f8929f2b9018c8a6d68f746b93d;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=ead856e3fd194485a9bfda07ae1a2d928c77cac8;hpb=2c902d6065f9856adf31e8540a94f1e42e68e905;p=xscreensaver diff --git a/hacks/glx/flurry.h b/hacks/glx/flurry.h index ead856e3..14718b64 100644 --- a/hacks/glx/flurry.h +++ b/hacks/glx/flurry.h @@ -35,9 +35,20 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef __GLCODE__ #define __GLCODE__ -#include -#include -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif /* HAVE_CONFIG_H */ + +#ifndef HAVE_JWXYZ +# include +# include +# include +#endif + +#ifdef HAVE_JWZGLES +# include "jwzgles.h" +#endif /* HAVE_JWZGLES */ + #include #include @@ -68,16 +79,20 @@ typedef struct _flurry_info_t flurry_info_t; typedef union { float f[4]; +#if 0 #if __VEC__ vector float v; #endif +#endif /* 0 */ } floatToVector; typedef union { unsigned int i[4]; +#if 0 #if __VEC__ vector unsigned int v; #endif +#endif /* 0 */ } intToVector; typedef struct SmokeParticleV @@ -110,6 +125,7 @@ typedef struct SmokeV void InitSmoke(SmokeV *s); void UpdateSmoke_ScalarBase(global_info_t *global, flurry_info_t *flurry, SmokeV *s); +#if 0 #ifdef __ppc__ void UpdateSmoke_ScalarFrsqrte(global_info_t *global, flurry_info_t *flurry, SmokeV *s); #endif @@ -117,6 +133,7 @@ void UpdateSmoke_ScalarFrsqrte(global_info_t *global, flurry_info_t *flurry, Smo void UpdateSmoke_VectorBase(global_info_t *global, flurry_info_t *flurry, SmokeV *s); void UpdateSmoke_VectorUnrolled(global_info_t *global, flurry_info_t *flurry, SmokeV *s); #endif +#endif /* 0 */ void DrawSmoke_Scalar(global_info_t *global, flurry_info_t *flurry, SmokeV *s, float); void DrawSmoke_Vector(global_info_t *global, flurry_info_t *flurry, SmokeV *s, float); @@ -156,7 +173,7 @@ void DrawSpark(global_info_t *info, flurry_info_t *flurry, Spark *s); /* int fieldIncoherence = 0; */ /* int ifieldSpeed = 120; */ -static __inline__ float FastDistance2D(float x, float y) +static inline float FastDistance2D(float x, float y) { /* this function computes the distance from 0,0 to x,y with ~3.5% error */ float mn; @@ -171,6 +188,7 @@ static __inline__ float FastDistance2D(float x, float y) return(x+y-(mn*0.5f)-(mn*0.25f)+(mn*0.0625f)); } +#if 0 #ifdef __VEC__ static vector float FastDistance2DV(vector float x, vector float y) { @@ -185,6 +203,7 @@ static vector float FastDistance2DV(vector float x, vector float y) { } #endif +#endif /* 0 */ #define RandFlt(min, max) ((min) + frand((max) - (min))) @@ -196,6 +215,7 @@ void MakeTexture(void); #define OPT_MODE_SCALAR_BASE 0x0 +#if 0 #ifdef __ppc__ #define OPT_MODE_SCALAR_FRSQRTE 0x1 #endif @@ -204,6 +224,7 @@ void MakeTexture(void); #define OPT_MODE_VECTOR_SIMPLE 0x2 #define OPT_MODE_VECTOR_UNROLLED 0x3 #endif +#endif /* 0 */ typedef enum _ColorModes {