Skip to content

Commit

Permalink
FlxBitmapFont: fix leftover references to static instances (#1698)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gama11 committed Jan 24, 2016
1 parent e63dc0b commit c841a46
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flixel/graphics/frames/FlxBitmapFont.hx
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ class FlxBitmapFont extends FlxFramesCollection
return font;

letters = (letters == null) ? DEFAULT_CHARS : letters;
region = (region == null) ? FlxRect.flxRect.set(0, 0, frame.sourceSize.x, frame.sourceSize.y) : region;
region = (region == null) ? FlxRect.weak(0, 0, frame.sourceSize.x, frame.sourceSize.y) : region;
spacing = (spacing == null) ? FlxPoint.get(0, 0) : spacing;

var bitmapWidth:Int = Std.int(region.width);
Expand All @@ -499,6 +499,8 @@ class FlxBitmapFont extends FlxFramesCollection
var startX:Int = Std.int(region.x);
var startY:Int = Std.int(region.y);

region.putWeak();

var xSpacing:Int = Std.int(spacing.x);
var ySpacing:Int = Std.int(spacing.y);

Expand Down Expand Up @@ -603,9 +605,7 @@ class FlxBitmapFont extends FlxFramesCollection
public static function findFont(frame:FlxFrame, border:FlxPoint = null):FlxBitmapFont
{
if (border == null)
{
border = FlxPoint.flxPoint1.set();
}
border = FlxPoint.weak();

var bitmapFonts:Array<FlxBitmapFont> = cast frame.parent.getFramesCollections(FlxFrameCollectionType.FONT);
for (font in bitmapFonts)
Expand Down

0 comments on commit c841a46

Please sign in to comment.