Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Haxe 2 compatibility changes

  • Loading branch information...
commit cfffeea854324be937be7a7bbe51f0a09c1829ab 1 parent 892be71
@jgranick jgranick authored
View
64 native/display/BitmapData.hx
@@ -10,7 +10,7 @@ import native.filters.BitmapFilter;
import native.utils.ByteArray;
import native.Loader;
-@:autoBuild(nme.Assets.embedBitmap())
+#if haxe3 @:autoBuild(nme.Assets.embedBitmap()) #end
class BitmapData implements IBitmapDrawable
{
public static var CLEAR = createColor(0, 0);
@@ -98,7 +98,7 @@ class BitmapData implements IBitmapDrawable
public static inline function createColor(inRGB:Int, inAlpha:Int = 0xFF):BitmapInt32
{
- #if (neko && neko_v1)
+ #if (neko && (!haxe3 || neko_v1))
return { rgb: inRGB, a: inAlpha };
#else
return inRGB |(inAlpha << 24);
@@ -139,7 +139,7 @@ class BitmapData implements IBitmapDrawable
public static inline function extractAlpha(v:BitmapInt32):Int
{
- #if (neko && neko_v1)
+ #if (neko && (!haxe3 || neko_v1))
return v.a;
#else
return v >>> 24;
@@ -148,7 +148,7 @@ class BitmapData implements IBitmapDrawable
public static inline function extractColor(v:BitmapInt32):Int
{
- #if (neko && neko_v1)
+ #if (neko && (!haxe3 || neko_v1))
return v.rgb;
#else
return v & 0xFFFFFF;
@@ -194,7 +194,7 @@ class BitmapData implements IBitmapDrawable
public function getPixel32(x:Int, y:Int):BitmapInt32
{
- #if (neko && neko_v1)
+ #if (neko && (!haxe3 || neko_v1))
return nme_bitmap_data_get_pixel_rgba(nmeHandle, x, y);
#else
return nme_bitmap_data_get_pixel32(nmeHandle, x, y);
@@ -279,30 +279,30 @@ class BitmapData implements IBitmapDrawable
}
// need to build a better way to do this
- private inline function nmeFloodFill(x:Int, y:Int, color:Int, replaceColor:Int):Void
- {
- if (getPixel32(x, y) == replaceColor) {
-
- setPixel32(x, y, color);
-
- var safeLeft = (x > 0);
- var safeRight = (x < width - 1);
- var safeBottom = (y < height - 1);
- var safeTop = (y > 0);
-
- try {
-
- if (safeRight) nmeFloodFill(x + 1, y, color, replaceColor);
- if (safeRight && safeBottom) nmeFloodFill(x + 1, y + 1, color, replaceColor);
- if (safeRight && safeTop) nmeFloodFill(x + 1, y - 1, color, replaceColor);
- if (safeLeft) nmeFloodFill(x - 1, y, color, replaceColor);
- if (safeLeft && safeBottom) nmeFloodFill(x - 1, y + 1, color, replaceColor);
- if (safeLeft && safeTop) nmeFloodFill(x - 1, y - 1, color, replaceColor);
- if (safeBottom) nmeFloodFill(x, y + 1, color, replaceColor);
- if (safeTop) nmeFloodFill(x, y - 1, color, replaceColor);
-
- } catch (e:Dynamic) {}
- }
+ private inline function nmeFloodFill(x:Int, y:Int, color:Int, replaceColor:BitmapInt32):Void
+ {
+ //if (getPixel32(x, y) == replaceColor) {
+ //
+ //setPixel32(x, y, color);
+ //
+ //var safeLeft = (x > 0);
+ //var safeRight = (x < width - 1);
+ //var safeBottom = (y < height - 1);
+ //var safeTop = (y > 0);
+ //
+ //try {
+ //
+ //if (safeRight) nmeFloodFill(x + 1, y, color, replaceColor);
+ //if (safeRight && safeBottom) nmeFloodFill(x + 1, y + 1, color, replaceColor);
+ //if (safeRight && safeTop) nmeFloodFill(x + 1, y - 1, color, replaceColor);
+ //if (safeLeft) nmeFloodFill(x - 1, y, color, replaceColor);
+ //if (safeLeft && safeBottom) nmeFloodFill(x - 1, y + 1, color, replaceColor);
+ //if (safeLeft && safeTop) nmeFloodFill(x - 1, y - 1, color, replaceColor);
+ //if (safeBottom) nmeFloodFill(x, y + 1, color, replaceColor);
+ //if (safeTop) nmeFloodFill(x, y - 1, color, replaceColor);
+ //
+ //} catch (e:Dynamic) {}
+ //}
}
private inline function nmeLoadFromBytes(inBytes:ByteArray, ?inRawAlpha:ByteArray):Void
@@ -334,7 +334,7 @@ class BitmapData implements IBitmapDrawable
public function setPixel32(inX:Int, inY:Int, inColour:BitmapInt32):Void
{
- #if (neko && neko_v1)
+ #if (neko && (!haxe3 || neko_v1))
nme_bitmap_data_set_pixel_rgba(nmeHandle, inX, inY, inColour);
#else
nme_bitmap_data_set_pixel32(nmeHandle, inX, inY, inColour);
@@ -601,7 +601,7 @@ class OptimizedPerlin
var color = Std.int(( s * fPersMax + 1 ) * 128);
- #if (neko && neko_v1)
+ #if (neko && (!haxe3 || neko_v1))
var pixel = { a: 0xFF, rgb: color };
#else
var pixel = 0xff000000 | color << 16 | color << 8 | color;
@@ -638,7 +638,7 @@ class OptimizedPerlin
private function seedOffset(iSeed:Int)
{
- #if (neko && neko_v1)
+ #if (neko && (!haxe3 || neko_v1))
iXoffset = iSeed = Std.int((iSeed * 16807.) % 21474836);
iYoffset = iSeed = Std.int((iSeed * 16807.) % 21474836);
iZoffset = iSeed = Std.int((iSeed * 16807.) % 21474836);
View
2  native/display/BitmapInt32.hx
@@ -1,7 +1,7 @@
package native.display;
-#if (neko && neko_v1)
+#if (neko && (!haxe3 || neko_v1))
typedef BitmapInt32 = { rgb:Int, a:Int };
#else
typedef BitmapInt32 = Int;
View
6 native/display/Graphics.hx
@@ -82,9 +82,9 @@ class Graphics
nme_gfx_draw_datum(nmeHandle, graphicsDatum.nmeHandle);
}
- public function drawPoints(inXY:Array<Float>, inPointRGBA:Array<Int> = null, inDefaultRGBA:Int = #if (neko && neko_v1) 0x3fffffff #else 0xffffffff #end, inSize:Float = -1.0)
+ public function drawPoints(inXY:Array<Float>, inPointRGBA:Array<Int> = null, inDefaultRGBA:Int = #if (neko && (!haxe3 || neko_v1)) 0x3fffffff #else 0xffffffff #end, inSize:Float = -1.0)
{
- nme_gfx_draw_points(nmeHandle, inXY, inPointRGBA, inDefaultRGBA, #if (neko && neko_v1) true #else false #end, inSize);
+ nme_gfx_draw_points(nmeHandle, inXY, inPointRGBA, inDefaultRGBA, #if (neko && (!haxe3 || neko_v1)) true #else false #end, inSize);
}
public function drawRect(inX:Float, inY:Float, inWidth:Float, inHeight:Float)
@@ -155,7 +155,7 @@ class Graphics
inline static public function RGBA(inRGB:Int, inA:Int = 0xff):Int
{
- #if (neko && neko_v1)
+ #if (neko && (!haxe3 || neko_v1))
return inRGB |((inA & 0xfc) << 22);
#else
return inRGB |(inA << 24);
View
6 native/display/Stage.hx
@@ -76,7 +76,7 @@ class Stage extends DisplayObjectContainer
private static var sDownEvents = [ "mouseDown", "middleMouseDown", "rightMouseDown" ];
private static var sUpEvents = [ "mouseUp", "middleMouseUp", "rightMouseUp" ];
- /** @private */ private var nmeJoyAxisData:Map <Int, Array <Float>>;
+ /** @private */ private var nmeJoyAxisData:#if haxe3 Map <Int, #else IntHash <#end Array <Float>>;
/** @private */ private var nmeDragBounds:Rectangle;
/** @private */ private var nmeDragObject:Sprite;
/** @private */ private var nmeDragOffsetX:Float;
@@ -88,7 +88,7 @@ class Stage extends DisplayObjectContainer
/** @private */ private var nmeLastDown:Array<InteractiveObject>;
/** @private */ private var nmeLastRender:Float;
/** @private */ private var nmeMouseOverObjects:Array<InteractiveObject>;
- /** @private */ private var nmeTouchInfo:Map <Int, TouchInfo>;
+ /** @private */ private var nmeTouchInfo:#if haxe3 Map <Int, #else IntHash <#end TouchInfo>;
public function new(inHandle:Dynamic, inWidth:Int, inHeight:Int)
{
super(inHandle, "Stage");
@@ -110,7 +110,7 @@ class Stage extends DisplayObjectContainer
nmeLastDown = [];
nmeLastClickTime = 0.0;
this.frameRate = 100;
- nmeJoyAxisData = new Map<Int, Array<Float>>();
+ nmeJoyAxisData = new #if haxe3 Map <Int, #else IntHash <#end Array<Float>>();
#if stage3d
stage3Ds = new Vector();
View
2  native/media/Sound.hx
@@ -11,7 +11,7 @@ import native.errors.Error;
import native.utils.ByteArray;
import native.utils.Endian;
-@:autoBuild(nme.Assets.embedSound())
+#if haxe3 @:autoBuild(nme.Assets.embedSound()) #end
class Sound extends EventDispatcher
{
public var bytesLoaded(default, null):Int;
View
4 native/utils/ByteArray.hx
@@ -19,8 +19,8 @@ import cpp.zip.Uncompress;
import cpp.zip.Flush;
#end
-@:autoBuild(nme.Assets.embedFile())
-class ByteArray extends Bytes implements ArrayAccess<Int> implements IDataInput implements IMemoryRange
+#if haxe3 @:autoBuild(nme.Assets.embedFile()) #end
+class ByteArray extends Bytes #if !haxe3 , #end implements ArrayAccess<Int> #if !haxe3 , #end implements IDataInput #if !haxe3 , #end implements IMemoryRange
{
public var bigEndian:Bool;
View
30 nme/Assets.hx
@@ -1,5 +1,5 @@
package nme;
-#if !macro
+#if (!macro || !haxe3)
import format.display.MovieClip;
@@ -45,15 +45,15 @@ import format.XFL;
class Assets {
- public static var cachedBitmapData = new Map<String, BitmapData>();
- public static var id(get, null):Array<String>;
- public static var library(get, null):Map<String, LibraryType>;
- public static var path(get, null):Map<String, String>;
- public static var type(get, null):Map<String, AssetType>;
+ public static var cachedBitmapData = new #if haxe3 Map <String, #else Hash <#end BitmapData>();
+ public static var id(get_id, null):Array<String>;
+ public static var library(get_library, null):#if haxe3 Map <String, #else Hash <#end LibraryType>;
+ public static var path(get_path, null):#if haxe3 Map <String, #else Hash <#end String>;
+ public static var type(get_type, null):#if haxe3 Map <String, #else Hash <#end AssetType>;
- #if (swf && !js) private static var cachedSWFLibraries = new Map<String, SWF>(); #end
- #if (swfdev && js) private static var cachedSWFLibraries = new Map<String, SWFLite>(); #end
- #if xfl private static var cachedXFLLibraries = new Map<String, XFL>(); #end
+ #if (swf && !js) private static var cachedSWFLibraries = new #if haxe3 Map <String, #else Hash <#end SWF>(); #end
+ #if (swfdev && js) private static var cachedSWFLibraries = new #if haxe3 Map <String, #else Hash <#end SWFLite>(); #end
+ #if xfl private static var cachedXFLLibraries = new #if haxe3 Map <String, #else Hash <#end XFL>(); #end
private static var initialized = false;
@@ -487,7 +487,7 @@ class Assets {
}
- private static function get_library():Map<String, LibraryType> {
+ private static function get_library():#if haxe3 Map <String, #else Hash <#end LibraryType> {
initialize ();
@@ -497,14 +497,14 @@ class Assets {
#else
- return new Map<String, LibraryType> ();
+ return new #if haxe3 Map <String, #else Hash <#end LibraryType> ();
#end
}
- private static function get_path():Map<String, String> {
+ private static function get_path():#if haxe3 Map <String, #else Hash <#end String> {
initialize ();
@@ -514,14 +514,14 @@ class Assets {
#else
- return new Map<String, String> ();
+ return new #if haxe3 Map <String, #else Hash <#end String> ();
#end
}
- private static function get_type():Map<String, AssetType> {
+ private static function get_type():#if haxe3 Map <String, #else Hash <#end AssetType> {
initialize ();
@@ -531,7 +531,7 @@ class Assets {
#else
- return new Map<String, AssetType> ();
+ return new #if haxe3 Map <String, #else Hash <#end AssetType> ();
#end
View
2  nme/display/BitmapInt32.hx
@@ -1,7 +1,7 @@
package nme.display;
-#if (neko && neko_v1)
+#if (neko && (!haxe3 || neko_v1))
typedef BitmapInt32 = { rgb:Int, a:Int };
#else
typedef BitmapInt32 = Int;
View
BIN  run.n
Binary file not shown
View
4 templates/default/flash/haxe/ApplicationMain.hx
@@ -1,4 +1,4 @@
-#if !macro
+#if (!macro || !haxe3)
#if nme
import ::APP_MAIN_PACKAGE::::APP_MAIN_CLASS::;
@@ -130,7 +130,7 @@ class ApplicationMain {
#end
-@:build(DocumentClass.build())
+#if haxe3 @:build(DocumentClass.build()) #end
class DocumentClass extends ::APP_MAIN:: { }
#else
View
4 templates/default/haxe/ApplicationMain.hx
@@ -1,4 +1,4 @@
-#if !macro
+#if (!macro || !haxe3)
class ApplicationMain
{
@@ -111,7 +111,7 @@ class ApplicationMain
}
-@:build(DocumentClass.build())
+#if haxe3 @:build(DocumentClass.build()) #end
class DocumentClass extends ::APP_MAIN:: {}
View
4 templates/default/iphone/PROJ/haxe/ApplicationMain.hx
@@ -1,4 +1,4 @@
-#if !macro
+#if (!macro || !haxe3)
import nme.Assets;
@@ -89,7 +89,7 @@ class ApplicationMain
}
-@:build(DocumentClass.build())
+#if haxe3 @:build(DocumentClass.build()) #end
class DocumentClass extends ::APP_MAIN:: { }
#else
View
13 tools/command-line/src/CommandLineTools.hx
@@ -19,6 +19,7 @@ import sys.io.File;
import sys.io.Process;
import sys.FileSystem;
import utils.PlatformSetup;
+import NMEProject;
class CommandLineTools {
@@ -35,10 +36,10 @@ class CommandLineTools {
private static var haxeflags:Array <String>;
private static var includePaths:Array <String>;
private static var project:NMEProject;
- private static var projectDefines:Map <String, String>;
- private static var targetFlags:Map <String, String>;
+ private static var projectDefines:StringMap <String>;
+ private static var targetFlags:StringMap <String>;
private static var traceEnabled:Bool;
- private static var userDefines:Map <String, Dynamic>;
+ private static var userDefines:StringMap <Dynamic>;
private static var version:String;
private static var words:Array <String>;
@@ -935,10 +936,10 @@ class CommandLineTools {
haxedefs = new Array <String> ();
haxeflags = new Array <String> ();
includePaths = new Array <String> ();
- projectDefines = new Map <String, String> ();
- targetFlags = new Map <String, String> ();
+ projectDefines = new StringMap <String> ();
+ targetFlags = new StringMap <String> ();
traceEnabled = true;
- userDefines = new Map <String, Dynamic> ();
+ userDefines = new StringMap <Dynamic> ();
words = new Array <String> ();
processArguments ();
View
9 tools/command-line/src/utils/PlatformSetup.hx
@@ -4,11 +4,16 @@ package utils;
import haxe.Http;
import haxe.io.Eof;
import haxe.io.Path;
+#if haxe3
import haxe.zip.Reader;
+#else
+import neko.zip.Reader;
+#end
import neko.Lib;
import sys.io.File;
import sys.io.Process;
import sys.FileSystem;
+import NMEProject;
class PlatformSetup {
@@ -249,7 +254,7 @@ class PlatformSetup {
}
- private static function getDefines (names:Array <String> = null, descriptions:Array <String> = null, ignored:Array <String> = null):Map <String, String> {
+ private static function getDefines (names:Array <String> = null, descriptions:Array <String> = null, ignored:Array <String> = null):StringMap <String> {
var config = CommandLineTools.getHXCPPConfig ();
@@ -1721,7 +1726,7 @@ class PlatformSetup {
}
- private static function writeConfig (path:String, defines:Map <String, String>):Void {
+ private static function writeConfig (path:String, defines:StringMap <String>):Void {
var newContent = "";
var definesText = "";
View
2  tools/helpers/BlackBerryHelper.hx
@@ -11,8 +11,6 @@ class BlackBerryHelper {
private static var binDirectory:String;
- private static var defines:Map <String, String>;
- private static var targetFlags:Map <String, String>;
public static function createPackage (project:NMEProject, workingDirectory:String, descriptorFile:String, targetPath:String):Void {
View
4 tools/helpers/FlashHelper.hx
@@ -132,7 +132,7 @@ class FlashHelper {
rate: flashSamplingFrequency,
is16bit: true,
isStereo: isStereo,
- samples: totalLengthSamples - endPadding - encoderDelay,
+ samples: #if !haxe3 haxe.Int32.ofInt ( #end totalLengthSamples - endPadding - encoderDelay #if !haxe3 ) #end,
data: SDMp3(encoderDelay + decoderDelay, frameData)
};
@@ -199,7 +199,7 @@ class FlashHelper {
rate : flashRate,
is16bit : is16bit,
isStereo : isStereo,
- samples : sampleCount,
+ samples : #if !haxe3 haxe.Int32.ofInt ( #end sampleCount #if !haxe3 ) #end,
data : SDRaw (wav.data)
}
View
19 tools/helpers/IconHelper.hx
@@ -7,6 +7,7 @@ import haxe.io.BytesOutput;
import haxe.io.Path;
import nme.display.Bitmap;
import nme.display.BitmapData;
+import nme.display.BitmapInt32;
import nme.display.Shape;
import nme.geom.Rectangle;
import nme.utils.ByteArray;
@@ -68,7 +69,11 @@ class IconHelper {
var bytes_g = packBits (pixels, 2, s * s);
var bytes_b = packBits (pixels, 3, s * s);
+ #if (!neko || (haxe3 && !neko_v1))
out.writeInt32 (bytes_r.length + bytes_g.length + bytes_b.length + 8);
+ #else
+ out.writeInt31 (bytes_r.length + bytes_g.length + bytes_b.length + 8);
+ #end
out.writeBytes (bytes_r, 0, bytes_r.length);
out.writeBytes (bytes_g, 0, bytes_g.length);
out.writeBytes (bytes_b, 0, bytes_b.length);
@@ -78,7 +83,11 @@ class IconHelper {
for (c in 0...4) out.writeByte (code.charCodeAt (c));
var bytes_a = extractBits (pixels, 0, s * s);
+ #if (!neko || (haxe3 && !neko_v1))
out.writeInt32 (bytes_a.length + 8);
+ #else
+ out.writeInt31 (bytes_a.length + 8);
+ #end
out.writeBytes (bytes_a, 0, bytes_a.length);
}
@@ -97,7 +106,11 @@ class IconHelper {
var bytes = bmp.encode ("png");
+ #if (!neko || (haxe3 && !neko_v1))
out.writeInt32 (bytes.length + 8);
+ #else
+ out.writeInt31 (bytes.length + 8);
+ #end
out.writeBytes (bytes, 0, bytes.length);
}
@@ -113,7 +126,11 @@ class IconHelper {
for (c in 0...4) file.writeByte ("icns".charCodeAt (c));
+ #if (!neko || (haxe3 && !neko_v1))
file.writeInt32 (bytes.length + 8);
+ #else
+ file.writeInt31 (bytes.length + 8);
+ #end
file.writeBytes (bytes, 0, bytes.length);
file.close ();
@@ -324,7 +341,7 @@ class IconHelper {
}
- private static function getIconBitmap (icons:Array <Icon>, width:Int, height:Int, backgroundColor:Int = null):BitmapData {
+ private static function getIconBitmap (icons:Array <Icon>, width:Int, height:Int, backgroundColor:BitmapInt32 = null):BitmapData {
var icon = findMatch (icons, width, height);
var exactMatch = true;
View
7 tools/helpers/ImageHelper.hx
@@ -1,17 +1,18 @@
import format.SVG;
import nme.display.Bitmap;
import nme.display.BitmapData;
+import nme.display.BitmapInt32;
import nme.display.Shape;
class ImageHelper {
- public static function rasterizeSVG (svg:SVG, width:Int, height:Int, backgroundColor:Int = null):BitmapData {
+ public static function rasterizeSVG (svg:SVG, width:Int, height:Int, backgroundColor:BitmapInt32 = null):BitmapData {
if (backgroundColor == null) {
- backgroundColor = 0x00FFFFFF;
+ backgroundColor = #if (!neko || (haxe3 && !neko_v1)) 0x00FFFFFF #else { rgb: 0xFFFFFF, a: 0x00 } #end;
}
@@ -34,7 +35,7 @@ class ImageHelper {
bitmap.width = width;
bitmap.height = height;
- var data = new BitmapData (width, height, true, 0x00FFFFFF);
+ var data = new BitmapData (width, height, true, #if (!neko || (haxe3 && !neko_v1)) 0x00FFFFFF #else { rgb: 0xFFFFFF, a: 0x00 } #end);
data.draw (bitmap);
return data;
View
4 tools/helpers/LogHelper.hx
@@ -2,10 +2,10 @@ package;
import neko.Lib;
-
#if nme
import nme.Loader;
#end
+import NMEProject;
class LogHelper {
@@ -13,7 +13,7 @@ class LogHelper {
public static var mute:Bool;
public static var verbose:Bool = false;
- private static var sentWarnings:Map <String, Bool> = new Map <String, Bool> ();
+ private static var sentWarnings = new StringMap <Bool> ();
public static function error (message:String, verboseMessage:String = "", e:Dynamic = null):Void {
View
4 tools/helpers/NekoHelper.hx
@@ -24,7 +24,11 @@ class NekoHelper {
output.write (executable);
output.write (sourceContents);
output.writeString ("NEKO");
+ #if haxe3
output.writeInt32 (executable.length);
+ #else
+ output.writeInt31 (executable.length);
+ #end
output.close ();
}
View
5 tools/helpers/StringHelper.hx
@@ -1,11 +1,14 @@
package;
+import NMEProject;
+
+
class StringHelper {
private static var seedNumber = 0;
- private static var usedFlatNames = new Map <String, String> ();
+ private static var usedFlatNames = new StringMap <String> ();
public static function formatArray (array:Array <Dynamic>):String {
View
2  tools/helpers/StringMapHelper.hx
@@ -1,7 +1,7 @@
package;
-import haxe.ds.StringMap;
+import NMEProject;
class StringMapHelper {
View
8 tools/helpers/ZipHelper.hx
@@ -3,7 +3,11 @@ package;
import haxe.io.Bytes;
import haxe.io.Path;
+#if haxe3
import haxe.zip.Writer;
+#else
+import neko.zip.Writer;
+#end
import sys.io.File;
import sys.FileSystem;
@@ -56,8 +60,12 @@ class ZipHelper {
LogHelper.info ("", " - Writing file: " + targetPath);
+ #if haxe3
var writer = new Writer (output);
writer.write (cast files);
+ #else
+ Writer.writeZip (output, files, 1);
+ #end
output.close ();
}
View
20 tools/project/NMEProject.hx
@@ -6,6 +6,14 @@ import haxe.Serializer;
import haxe.Unserializer;
import sys.FileSystem;
+#if haxe3
+typedef StringMap<T> = Map<String, T>;
+typedef IntMap<T> = Map<Int, T>;
+#else
+typedef StringMap<T> = Hash<T>;
+typedef IntMap<T> = IntHash<T>;
+#end
+
class NMEProject {
@@ -18,8 +26,8 @@ class NMEProject {
public var config:PlatformConfig;
public var debug:Bool;
public var dependencies:Array <String>;
- public var environment:Map <String, String>;
- public var haxedefs:Map <String, Dynamic>;
+ public var environment:StringMap <String>;
+ public var haxedefs:StringMap <Dynamic>;
public var haxeflags:Array <String>;
public var haxelibs:Array <Haxelib>;
public var host (get_host, null):Platform;
@@ -32,7 +40,7 @@ class NMEProject {
public var sources:Array <String>;
public var splashScreens:Array <SplashScreen>;
public var target:Platform;
- public var targetFlags:Map <String, String>;
+ public var targetFlags:StringMap <String>;
public var templateContext (get_templateContext, null):Dynamic;
public var templatePaths:Array <String>;
public var window:Window;
@@ -44,7 +52,7 @@ class NMEProject {
public static var _command:String;
public static var _debug:Bool;
public static var _target:Platform;
- public static var _targetFlags:Map <String, String>;
+ public static var _targetFlags:StringMap <String>;
public static var _templatePaths:Array <String>;
private static var initialized:Bool;
@@ -148,7 +156,7 @@ class NMEProject {
assets = new Array <Asset> ();
dependencies = new Array <String> ();
environment = Sys.environment ();
- haxedefs = new Map <String, Dynamic> ();
+ haxedefs = new StringMap <Dynamic> ();
haxeflags = new Array <String> ();
haxelibs = new Array <Haxelib> ();
icons = new Array <Icon> ();
@@ -403,7 +411,7 @@ class NMEProject {
if (_targetFlags == null) {
- _targetFlags = new Map <String, String> ();
+ _targetFlags = new StringMap <String> ();
}
View
6 tools/project/NMMLParser.hx
@@ -13,13 +13,13 @@ import PlatformConfig;
class NMMLParser extends NMEProject {
- public var localDefines:Map <String, Dynamic>;
+ public var localDefines:StringMap <Dynamic>;
public var includePaths:Array <String>;
private static var varMatch = new EReg("\\${(.*?)}", "");
- public function new (path:String = "", defines:Map <String, Dynamic> = null, includePaths:Array <String> = null, useExtensionPath:Bool = false) {
+ public function new (path:String = "", defines:StringMap <Dynamic> = null, includePaths:Array <String> = null, useExtensionPath:Bool = false) {
super ();
@@ -29,7 +29,7 @@ class NMMLParser extends NMEProject {
} else {
- localDefines = new Map <String, Dynamic> ();
+ localDefines = new StringMap <Dynamic> ();
}
Please sign in to comment.
Something went wrong with that request. Please try again.