Merge pull request #14793 from super626/fixsprite2

It already been reviewed and compile by jenkins in https://github.com/cocos2d/cocos2d-x/pull/14697.
We need merge it to V3.10 to file TMX render bug.
This commit is contained in:
xiaofeng11 2015-12-24 09:40:36 +08:00
commit 434c79ae90
1 changed files with 1 additions and 9 deletions

View File

@ -578,15 +578,6 @@ void Sprite::updateTransform(void)
float x2 = x1 + size.width;
float y2 = y1 + size.height;
if (_flippedX)
{
std::swap(x1, x2);
}
if (_flippedY)
{
std::swap(y1, y2);
}
float x = _transformToBatch.m[12];
float y = _transformToBatch.m[13];
@ -610,6 +601,7 @@ void Sprite::updateTransform(void)
_quad.br.vertices.set(SPRITE_RENDER_IN_SUBPIXEL(bx), SPRITE_RENDER_IN_SUBPIXEL(by), _positionZ);
_quad.tl.vertices.set(SPRITE_RENDER_IN_SUBPIXEL(dx), SPRITE_RENDER_IN_SUBPIXEL(dy), _positionZ);
_quad.tr.vertices.set(SPRITE_RENDER_IN_SUBPIXEL(cx), SPRITE_RENDER_IN_SUBPIXEL(cy), _positionZ);
setTextureCoords(_rect);
}
// MARMALADE CHANGE: ADDED CHECK FOR nullptr, TO PERMIT SPRITES WITH NO BATCH NODE / TEXTURE ATLAS