Skip to content

Commit

Permalink
Merge pull request #14 from revanaii/master
Browse files Browse the repository at this point in the history
quick lib references update
  • Loading branch information
Beeblerox committed Jul 25, 2014
2 parents edbf1d3 + 171dd38 commit c034ae1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
27 changes: 14 additions & 13 deletions Haxe/src/pxBitmapFont/PxBitmapFont.hx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package pxBitmapFont;

import nme.display.BitmapData;
import nme.display.BitmapInt32;
import nme.display.Graphics;
import nme.geom.ColorTransform;
import nme.geom.Matrix;
import nme.geom.Point;
import nme.geom.Rectangle;
import openfl.display.Tilesheet;
import openfl.display.BitmapData;
//import openfl.display.BitmapInt32;
import openfl.display.Graphics;
import openfl.geom.ColorTransform;
import openfl.geom.Matrix;
import openfl.geom.Point;
import openfl.geom.Rectangle;

#if (cpp || neko)
import nme.display.Tilesheet;
Expand All @@ -18,14 +19,14 @@ import nme.display.Tilesheet;
*/
class PxBitmapFont
{
private static var _storedFonts:Hash<PxBitmapFont> = new Hash<PxBitmapFont>();
private static var _storedFonts:Map<String, PxBitmapFont> = new Map<String, PxBitmapFont>();

private static var ZERO_POINT:Point = new Point();

#if (flash || js)
private var _glyphs:Array<BitmapData>;
#else
private var _glyphs:IntHash<PxFontSymbol>;
private var _glyphs:Map<PxFontSymbol>;
private var _num_letters:Int;
private var _tileSheet:Tilesheet;
private static var _flags = Tilesheet.TILE_SCALE | Tilesheet.TILE_ROTATION | Tilesheet.TILE_ALPHA | Tilesheet.TILE_RGB;
Expand Down Expand Up @@ -54,7 +55,7 @@ class PxBitmapFont
_colorTransform = new ColorTransform();
_glyphs = [];
#else
_glyphs = new IntHash<PxFontSymbol>();
_glyphs = new Map<PxFontSymbol>();
_num_letters = 0;
#end
}
Expand Down Expand Up @@ -212,7 +213,7 @@ class PxBitmapFont
#if (flash || js)
_glyphs = [];
#else
_glyphs = new IntHash<PxFontSymbol>();
_glyphs = new Map<PxFontSymbol>();
#end
_glyphString = "";
}
Expand Down Expand Up @@ -282,8 +283,8 @@ class PxBitmapFont
var pixelColor:Int;
var bgColor32:Int = pBitmapData.getPixel(0, 0);
#else
var pixelColor:BitmapInt32;
var bgColor32:BitmapInt32 = pBitmapData.getPixel32(0, 0);
// var pixelColor:BitmapInt32;
// var bgColor32:BitmapInt32 = pBitmapData.getPixel32(0, 0);
#end

cy = 0;
Expand Down
2 changes: 1 addition & 1 deletion Haxe/src/pxBitmapFont/PxDefaultFontGenerator.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package pxBitmapFont;

import nme.display.BitmapData;
import openfl.display.BitmapData;
import pxBitmapFont.PxBitmapFont;

/**
Expand Down
12 changes: 6 additions & 6 deletions Haxe/src/pxBitmapFont/PxTextField.hx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package pxBitmapFont;

import nme.display.Bitmap;
import nme.display.BitmapData;
import nme.display.Graphics;
import nme.display.Sprite;
import nme.geom.Matrix;
import openfl.display.Bitmap;
import openfl.display.BitmapData;
import openfl.display.Graphics;
import openfl.display.Sprite;
import openfl.geom.Matrix;
import pxBitmapFont.PxBitmapFont;

/**
Expand Down Expand Up @@ -408,7 +408,7 @@ class PxTextField extends Sprite
}
_drawData.splice(0, _drawData.length);
#end

if (_fontScale > 0)
{
#if (flash || js)
Expand Down

0 comments on commit c034ae1

Please sign in to comment.