Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Gama11 committed May 8, 2014
1 parent bf39c01 commit af9359f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion flixel/addons/display/FlxNestedSprite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class FlxNestedSprite extends FlxSprite
child.angularVelocity = child.angularAcceleration = 0;
child.postUpdate();

if (isSimpleRender())
if (isSimpleRender(camera))
{
child.x = x + child.relativeX - offset.x;
child.y = y + child.relativeY - offset.y;
Expand Down
12 changes: 4 additions & 8 deletions flixel/addons/display/FlxSkewedSprite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class FlxSkewedSprite extends FlxSprite
#end

#if FLX_RENDER_BLIT
if (isSimpleRender())
if (isSimpleRender(camera))
{
_point.copyToFlash(_flashPoint);
camera.buffer.copyPixels(framePixels, _flashRect, _flashPoint, null, null, true);
Expand Down Expand Up @@ -138,7 +138,7 @@ class FlxSkewedSprite extends FlxSprite
var sx:Float = scale.x * _facingHorizontalMult;
var sy:Float = scale.y * _facingVerticalMult;

if (isSimpleRender())
if (isSimpleRender(camera))
{
if (flipX)
{
Expand Down Expand Up @@ -215,12 +215,8 @@ class FlxSkewedSprite extends FlxSprite
}
}

public override function isSimpleRender():Bool
override public function isSimpleRender(?camera:FlxCamera):Bool
{
#if FLX_RENDER_BLIT
return (((angle == 0) || (bakedRotationAngle > 0)) && (scale.x == 1) && (scale.y == 1) && (skew.x == 0) && (skew.y == 0));
#else
return (((angle == 0) || (bakedRotationAngle > 0)) && (scale.x == 1) && (scale.y == 1) && (blend == null) && (skew.x == 0) && (skew.y == 0) && pixelPerfectRender);
#end
return super.isSimpleRender(camera) && (skew.x == 0) && (skew.y == 0);
}
}
6 changes: 3 additions & 3 deletions flixel/addons/text/FlxBitmapFont.hx
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ class FlxBitmapFont extends FlxSprite
var ssx:Float = 0;
var csy:Float = 1;

if (!isSimpleRender())
if (!isSimpleRender(camera))
{
if (_angleChanged)
{
Expand Down Expand Up @@ -367,9 +367,9 @@ class FlxBitmapFont extends FlxSprite
}
}

override public function isSimpleRender():Bool
override public function isSimpleRender(?camera:FlxCamera):Bool
{
return ((angle == 0) && (scale.x == 1) && (scale.y == 1));
return (angle == 0) && (scale.x == 1) && (scale.y == 1);
}
#end

Expand Down

0 comments on commit af9359f

Please sign in to comment.