diff --git a/cocos2dx/support/TransformUtils.cpp b/cocos2dx/support/TransformUtils.cpp index 3465e97b09..d64a63ffd1 100644 --- a/cocos2dx/support/TransformUtils.cpp +++ b/cocos2dx/support/TransformUtils.cpp @@ -28,7 +28,7 @@ THE SOFTWARE. namespace cocos2d { -void CGAffineToGL(const AffineTransform *t, GLfloat *m) +void CGAffineToGL(const AffineTransform& t, GLfloat *m) { // | m[0] m[4] m[8] m[12] | | m11 m21 m31 m41 | | a c 0 tx | // | m[1] m[5] m[9] m[13] | | m12 m22 m32 m42 | | b d 0 ty | @@ -37,8 +37,8 @@ void CGAffineToGL(const AffineTransform *t, GLfloat *m) m[2] = m[3] = m[6] = m[7] = m[8] = m[9] = m[11] = m[14] = 0.0f; m[10] = m[15] = 1.0f; - m[0] = t->a; m[4] = t->c; m[12] = t->tx; - m[1] = t->b; m[5] = t->d; m[13] = t->ty; + m[0] = t.a; m[4] = t.c; m[12] = t.tx; + m[1] = t.b; m[5] = t.d; m[13] = t.ty; } void GLToCGAffine(const GLfloat *m, AffineTransform *t) diff --git a/cocos2dx/support/TransformUtils.h b/cocos2dx/support/TransformUtils.h index b10079343e..1684a66cb0 100644 --- a/cocos2dx/support/TransformUtils.h +++ b/cocos2dx/support/TransformUtils.h @@ -34,7 +34,7 @@ namespace cocos2d { struct AffineTransform; -void CGAffineToGL(const AffineTransform *t, GLfloat *m); +void CGAffineToGL(const AffineTransform &t, GLfloat *m); void GLToCGAffine(const GLfloat *m, AffineTransform *t); }//namespace cocos2d