Lines Matching defs:Fixed
53 * For better performance on all platforms, we're going to use fixed-point
57 typedef int32_t Fixed;
66 #define FIXED_FROM_FLOAT(x) ((Fixed)((x)*FIXED_ONE))
78 #define FIXED_FROM_INT_FLOAT(x,f) (Fixed)((x)*(FIXED_ONE*(f)))
98 # define ANGLE_TO_FIXED(x) (Fixed)((x) << (FIXED_BITS - ANGLE_BITS))
101 # define ANGLE_TO_FIXED(x) (Fixed)((x) >> (ANGLE_BITS - FIXED_BITS))
104 static Fixed angle_sin_tab[ANGLE_2PI+1];
115 static __inline__ Fixed angle_sin( Angle a )
120 static __inline__ Fixed angle_cos( Angle a )
125 static __inline__ Fixed fixed_sin( Fixed f )
130 static __inline__ Fixed fixed_cos( Fixed f )
177 static __inline__ uint16_t palette_from_fixed( Fixed x )
185 /* Angles expressed as fixed point radians */
195 Fixed yt1 = FIXED_FROM_FLOAT(t/1230.);
196 Fixed yt2 = yt1;
197 Fixed xt10 = FIXED_FROM_FLOAT(t/3000.);
198 Fixed xt20 = xt10;
210 Fixed base = fixed_sin(yt1) + fixed_sin(yt2);
211 Fixed xt1 = xt10;
212 Fixed xt2 = xt20;
228 Fixed ii = base + fixed_sin(xt1) + fixed_sin(xt2);
238 Fixed i1 = base + fixed_sin(xt1) + fixed_sin(xt2);
242 Fixed i2 = base + fixed_sin(xt1) + fixed_sin(xt2);
254 Fixed ii = base + fixed_sin(xt1) + fixed_sin(xt2);
263 Fixed ii = base + fixed_sin(xt1) + fixed_sin(xt2);