mutter/fixed-to-float-patches/clutter-actor.c.0.patch
Neil Roberts 4e94500a2a Merge branch 'master' into cogl-float
The patches have been updated to apply cleanly.

The patches for the g_warnings in clutter-actor.c have been removed
because master now uses CLUTTER_UNITS_FORMAT so they aren't
necessary. The clutter-units.h patch now sets CLUTTER_UNITS_FORMAT to
'f'.
2009-01-15 18:26:22 +00:00

28 lines
1.2 KiB
Diff

diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index 1e481cd..9cbee04 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -806,7 +806,7 @@ static inline void
mtx_transform (const ClutterFixed m[],
fixed_vertex_t *vertex)
{
- ClutterFixed _x, _y, _z, _w;
+ float _x, _y, _z, _w;
_x = vertex->x;
_y = vertex->y;
@@ -846,8 +846,11 @@ mtx_transform (const ClutterFixed m[],
/* Help macros to scale from OpenGL <-1,1> coordinates system to our
* X-window based <0,window-size> coordinates
*/
-#define MTX_GL_SCALE_X(x,w,v1,v2) (CLUTTER_FIXED_MUL (((CLUTTER_FIXED_DIV ((x), (w)) + 1.0) >> 1), (v1)) + (v2))
-#define MTX_GL_SCALE_Y(y,w,v1,v2) ((v1) - CLUTTER_FIXED_MUL (((CLUTTER_FIXED_DIV ((y), (w)) + 1.0) >> 1), (v1)) + (v2))
+#define MTX_GL_SCALE_X(x,w,v1,v2) \
+ (CLUTTER_FIXED_MUL (((CLUTTER_FIXED_DIV ((x), (w)) + 1.0) / 2), (v1)) + (v2))
+#define MTX_GL_SCALE_Y(y,w,v1,v2) \
+ ((v1) - CLUTTER_FIXED_MUL (((CLUTTER_FIXED_DIV ((y), (w)) + 1.0) / 2), \
+ (v1)) + (v2))
#define MTX_GL_SCALE_Z(z,w,v1,v2) (MTX_GL_SCALE_X ((z), (w), (v1), (v2)))
/* transforms a 4-tuple of coordinates using @matrix and