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