diff --git a/externs/air/flash/events/TouchEvent.hx b/externs/air/flash/events/TouchEvent.hx index 566279954..9fb6bc459 100644 --- a/externs/air/flash/events/TouchEvent.hx +++ b/externs/air/flash/events/TouchEvent.hx @@ -30,7 +30,7 @@ package flash.events; function new(type:String, bubbles:Bool = true, cancelable:Bool = false, touchPointID:Int = 0, isPrimaryTouchPoint:Bool = false, localX:Float = 0. /*NaN*/, localY:Float = 0. /*NaN*/, sizeX:Float = 0. /*NaN*/, sizeY:Float = 0. /*NaN*/, pressure:Float = 0. /*NaN*/, ?relatedObject:flash.display.InteractiveObject, ctrlKey:Bool = false, altKey:Bool = false, shiftKey:Bool = false - #if air, commandKey:Bool = false, controlKey:Bool = false, ?timestamp :Float, ?touchIntent :TouchEventIntent, ?samples :flash.utils.ByteArray, + #if air, commandKey:Bool = false, controlKey:Bool = false, ?timestamp:Float, ?touchIntent:TouchEventIntent, ?samples:flash.utils.ByteArray, isTouchPointCanceled:Bool = false #end):Void; #if air function getSamples(buffer:flash.utils.ByteArray, append:Bool = false):UInt; diff --git a/src/haxe/io/Bytes.hx b/src/haxe/io/Bytes.hx index 998fcf0fe..5385c6f83 100644 --- a/src/haxe/io/Bytes.hx +++ b/src/haxe/io/Bytes.hx @@ -1067,7 +1067,7 @@ class Bytes setInt32(pos, v.low); } - public function getString(pos:Int, len:Int #if (!hl || haxe_ver >= 4), ?encoding :#if (haxe_ver >= 4) haxe.io.Encoding #else Dynamic #end #end):String + public function getString(pos:Int, len:Int #if (!hl || haxe_ver >= 4), ?encoding:#if (haxe_ver >= 4) haxe.io.Encoding #else Dynamic #end #end):String { if (outRange(pos, len)) throw Error.OutsideBounds; @@ -1118,7 +1118,7 @@ class Bytes } public static function ofString(s:String - #if (!hl || haxe_ver >= 4), ?encoding :#if (haxe_ver >= 4) haxe.io.Encoding #else Dynamic #end #end):Bytes @:privateAccess { + #if (!hl || haxe_ver >= 4), ?encoding:#if (haxe_ver >= 4) haxe.io.Encoding #else Dynamic #end #end):Bytes @:privateAccess { var size = 0; var b = s.bytes.utf16ToUtf8(0, size); return new Bytes(b, size); diff --git a/src/lime/_internal/backend/html5/HTML5Application.hx b/src/lime/_internal/backend/html5/HTML5Application.hx index 117a970bb..1edb8fdf7 100644 --- a/src/lime/_internal/backend/html5/HTML5Application.hx +++ b/src/lime/_internal/backend/html5/HTML5Application.hx @@ -280,13 +280,13 @@ class HTML5Application Browser.window.addEventListener("devicemotion", handleSensorEvent, false); #if stats - stats = untyped #if haxe4 js.Syntax.code #else __js__ #end("new Stats ()"); + stats = untyped #if haxe4 js.Syntax.code #else __js__ #end ("new Stats ()"); stats.domElement.style.position = "absolute"; stats.domElement.style.top = "0px"; Browser.document.body.appendChild(stats.domElement); #end - untyped #if haxe4 js.Syntax.code #else __js__ #end(" + untyped #if haxe4 js.Syntax.code #else __js__ #end (" if (!CanvasRenderingContext2D.prototype.isPointInStroke) { CanvasRenderingContext2D.prototype.isPointInStroke = function (path, x, y) { return false; diff --git a/src/lime/_internal/backend/html5/HTML5AudioSource.hx b/src/lime/_internal/backend/html5/HTML5AudioSource.hx index b60659dbd..51f6c9823 100644 --- a/src/lime/_internal/backend/html5/HTML5AudioSource.hx +++ b/src/lime/_internal/backend/html5/HTML5AudioSource.hx @@ -56,11 +56,10 @@ class HTML5AudioSource // Calling setCurrentTime causes html5 audio to replay from this position on next frame #if force_html5_audio - if(time == 0) setCurrentTime(time); + if (time == 0) setCurrentTime(time); #else setCurrentTime(time); #end - #end } diff --git a/src/lime/_internal/backend/html5/HTML5HTTPRequest.hx b/src/lime/_internal/backend/html5/HTML5HTTPRequest.hx index 38d65e611..e05967b29 100644 --- a/src/lime/_internal/backend/html5/HTML5HTTPRequest.hx +++ b/src/lime/_internal/backend/html5/HTML5HTTPRequest.hx @@ -453,7 +453,7 @@ class HTML5HTTPRequest if (supportsImageProgress == null) { - supportsImageProgress = untyped #if haxe4 js.Syntax.code #else __js__ #end("'onprogress' in image"); + supportsImageProgress = untyped #if haxe4 js.Syntax.code #else __js__ #end ("'onprogress' in image"); } if (supportsImageProgress || __isInMemoryURI(uri)) diff --git a/src/lime/_internal/backend/html5/HTML5Window.hx b/src/lime/_internal/backend/html5/HTML5Window.hx index 065628893..850b13b06 100644 --- a/src/lime/_internal/backend/html5/HTML5Window.hx +++ b/src/lime/_internal/backend/html5/HTML5Window.hx @@ -536,8 +536,7 @@ class HTML5Window // In order to ensure that the browser will fire clipboard events, we always need to have something selected. // Therefore, `value` cannot be "". - if(inputing) - return; + if (inputing) return; if (textInput.value != dummyCharacter) { @@ -1164,16 +1163,17 @@ class HTML5Window private var inputing = false; - public function handleCompositionstartEvent(e):Void{ + public function handleCompositionstartEvent(e):Void + { inputing = true; } - public function handleCompositionendEvent(e):Void{ + public function handleCompositionendEvent(e):Void + { inputing = false; handleInputEvent(e); } - public function setTitle(value:String):String { if (value != null) diff --git a/src/lime/_internal/backend/native/NativeCFFI.hx b/src/lime/_internal/backend/native/NativeCFFI.hx index 28ecefe54..603d433f2 100644 --- a/src/lime/_internal/backend/native/NativeCFFI.hx +++ b/src/lime/_internal/backend/native/NativeCFFI.hx @@ -6779,17 +6779,20 @@ class NativeCFFI return 0; } - @:hlNative("lime", "lime_vorbis_file_pcm_seek_lap") private static function lime_vorbis_file_pcm_seek_lap(vorbisFile:CFFIPointer, posLow:Int, posHigh:Int):Int + @:hlNative("lime", "lime_vorbis_file_pcm_seek_lap") private static function lime_vorbis_file_pcm_seek_lap(vorbisFile:CFFIPointer, posLow:Int, + posHigh:Int):Int { return 0; } - @:hlNative("lime", "lime_vorbis_file_pcm_seek_page") private static function lime_vorbis_file_pcm_seek_page(vorbisFile:CFFIPointer, posLow:Int, posHigh:Int):Int + @:hlNative("lime", "lime_vorbis_file_pcm_seek_page") private static function lime_vorbis_file_pcm_seek_page(vorbisFile:CFFIPointer, posLow:Int, + posHigh:Int):Int { return 0; } - @:hlNative("lime", "lime_vorbis_file_pcm_seek_page_lap") private static function lime_vorbis_file_pcm_seek_page_lap(vorbisFile:CFFIPointer, posLow:Int, posHigh:Int):Int + @:hlNative("lime", "lime_vorbis_file_pcm_seek_page_lap") private static function lime_vorbis_file_pcm_seek_page_lap(vorbisFile:CFFIPointer, posLow:Int, + posHigh:Int):Int { return 0; } @@ -6799,7 +6802,8 @@ class NativeCFFI return 0; } - @:hlNative("lime", "lime_vorbis_file_raw_seek_lap") private static function lime_vorbis_file_raw_seek_lap(vorbisFile:CFFIPointer, posLow:Int, posHigh:Int):Int + @:hlNative("lime", "lime_vorbis_file_raw_seek_lap") private static function lime_vorbis_file_raw_seek_lap(vorbisFile:CFFIPointer, posLow:Int, + posHigh:Int):Int { return 0; } @@ -6824,12 +6828,14 @@ class NativeCFFI return null; } - @:hlNative("lime", "lime_vorbis_file_read") private static function lime_vorbis_file_read(vorbisFile:CFFIPointer, buffer:Bytes, position:Int, length:Int, bigendianp:Bool, word:Int, signed:Bool):Dynamic + @:hlNative("lime", "lime_vorbis_file_read") private static function lime_vorbis_file_read(vorbisFile:CFFIPointer, buffer:Bytes, position:Int, length:Int, + bigendianp:Bool, word:Int, signed:Bool):Dynamic { return null; } - @:hlNative("lime", "lime_vorbis_file_read_float") private static function lime_vorbis_file_read_float(vorbisFile:CFFIPointer, pcmChannels:Bytes, samples:Int):Dynamic + @:hlNative("lime", "lime_vorbis_file_read_float") private static function lime_vorbis_file_read_float(vorbisFile:CFFIPointer, pcmChannels:Bytes, + samples:Int):Dynamic { return null; } diff --git a/src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx b/src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx index d1268103a..c676a2bee 100644 --- a/src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx +++ b/src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx @@ -1855,7 +1855,7 @@ class NativeOpenGLRenderContext case GL.FRAMEBUFFER_BINDING: var data:GLFramebuffer = getInteger(pname); return data; - + case GL.RENDERBUFFER_BINDING: var data:GLRenderbuffer = getInteger(pname); return data; diff --git a/src/lime/_internal/format/Deflate.hx b/src/lime/_internal/format/Deflate.hx index 33e6f3d15..ad2d9965b 100644 --- a/src/lime/_internal/format/Deflate.hx +++ b/src/lime/_internal/format/Deflate.hx @@ -25,9 +25,9 @@ class Deflate #end #elseif js #if commonjs - var data = untyped #if haxe4 js.Syntax.code #else __js__ #end("require (\"pako\").deflateRaw")(bytes.getData()); + var data = untyped #if haxe4 js.Syntax.code #else __js__ #end ("require (\"pako\").deflateRaw")(bytes.getData()); #else - var data = untyped #if haxe4 js.Syntax.code #else __js__ #end("pako.deflateRaw")(bytes.getData()); + var data = untyped #if haxe4 js.Syntax.code #else __js__ #end ("pako.deflateRaw")(bytes.getData()); #end return Bytes.ofData(data); #elseif flash @@ -55,9 +55,9 @@ class Deflate #end #elseif js #if commonjs - var data = untyped #if haxe4 js.Syntax.code #else __js__ #end("require (\"pako\").inflateRaw")(bytes.getData()); + var data = untyped #if haxe4 js.Syntax.code #else __js__ #end ("require (\"pako\").inflateRaw")(bytes.getData()); #else - var data = untyped #if haxe4 js.Syntax.code #else __js__ #end("pako.inflateRaw")(bytes.getData()); + var data = untyped #if haxe4 js.Syntax.code #else __js__ #end ("pako.inflateRaw")(bytes.getData()); #end return Bytes.ofData(data); #elseif flash diff --git a/src/lime/_internal/format/GZip.hx b/src/lime/_internal/format/GZip.hx index 63b71e262..36a8b60ed 100644 --- a/src/lime/_internal/format/GZip.hx +++ b/src/lime/_internal/format/GZip.hx @@ -22,9 +22,9 @@ class GZip #end #elseif js #if commonjs - var data = untyped #if haxe4 js.Syntax.code #else __js__ #end("require (\"pako\").gzip")(bytes.getData()); + var data = untyped #if haxe4 js.Syntax.code #else __js__ #end ("require (\"pako\").gzip")(bytes.getData()); #else - var data = untyped #if haxe4 js.Syntax.code #else __js__ #end("pako.gzip")(bytes.getData()); + var data = untyped #if haxe4 js.Syntax.code #else __js__ #end ("pako.gzip")(bytes.getData()); #end return Bytes.ofData(data); #else @@ -44,9 +44,9 @@ class GZip #end #elseif js #if commonjs - var data = untyped #if haxe4 js.Syntax.code #else __js__ #end("require (\"pako\").ungzip")(bytes.getData()); + var data = untyped #if haxe4 js.Syntax.code #else __js__ #end ("require (\"pako\").ungzip")(bytes.getData()); #else - var data = untyped #if haxe4 js.Syntax.code #else __js__ #end("pako.ungzip")(bytes.getData()); + var data = untyped #if haxe4 js.Syntax.code #else __js__ #end ("pako.ungzip")(bytes.getData()); #end return Bytes.ofData(data); #else diff --git a/src/lime/_internal/format/Zlib.hx b/src/lime/_internal/format/Zlib.hx index b53ee3fe0..4a891c4a4 100644 --- a/src/lime/_internal/format/Zlib.hx +++ b/src/lime/_internal/format/Zlib.hx @@ -25,9 +25,9 @@ class Zlib #end #elseif js #if commonjs - var data = untyped #if haxe4 js.Syntax.code #else __js__ #end("require (\"pako\").deflate")(bytes.getData()); + var data = untyped #if haxe4 js.Syntax.code #else __js__ #end ("require (\"pako\").deflate")(bytes.getData()); #else - var data = untyped #if haxe4 js.Syntax.code #else __js__ #end("pako.deflate")(bytes.getData()); + var data = untyped #if haxe4 js.Syntax.code #else __js__ #end ("pako.deflate")(bytes.getData()); #end return Bytes.ofData(data); #elseif flash @@ -55,9 +55,9 @@ class Zlib #end #elseif js #if commonjs - var data = untyped #if haxe4 js.Syntax.code #else __js__ #end("require (\"pako\").inflate")(bytes.getData()); + var data = untyped #if haxe4 js.Syntax.code #else __js__ #end ("require (\"pako\").inflate")(bytes.getData()); #else - var data = untyped #if haxe4 js.Syntax.code #else __js__ #end("pako.inflate")(bytes.getData()); + var data = untyped #if haxe4 js.Syntax.code #else __js__ #end ("pako.inflate")(bytes.getData()); #end return Bytes.ofData(data); #elseif flash diff --git a/src/lime/_internal/graphics/ImageCanvasUtil.hx b/src/lime/_internal/graphics/ImageCanvasUtil.hx index 998e7ed77..539bce20c 100644 --- a/src/lime/_internal/graphics/ImageCanvasUtil.hx +++ b/src/lime/_internal/graphics/ImageCanvasUtil.hx @@ -190,7 +190,7 @@ class ImageCanvasUtil if (!image.transparent) { if (!image.transparent) buffer.__srcCanvas.setAttribute("moz-opaque", "true"); - buffer.__srcContext = untyped #if haxe4 js.Syntax.code #else __js__ #end('buffer.__srcCanvas.getContext ("2d", { alpha: false })'); + buffer.__srcContext = untyped #if haxe4 js.Syntax.code #else __js__ #end ('buffer.__srcCanvas.getContext ("2d", { alpha: false })'); } else { diff --git a/src/lime/app/Event.hx b/src/lime/app/Event.hx index 42513302d..ed4a79927 100644 --- a/src/lime/app/Event.hx +++ b/src/lime/app/Event.hx @@ -155,7 +155,7 @@ class Event } #end } - + /** Removes all event listeners **/ @@ -167,7 +167,6 @@ class Event __listeners.splice(0, len); __priorities.splice(0, len); __repeat.splice(0, len); - #end } } diff --git a/src/lime/app/Future.hx b/src/lime/app/Future.hx index c05477322..9a7fc9103 100644 --- a/src/lime/app/Future.hx +++ b/src/lime/app/Future.hx @@ -39,8 +39,7 @@ import lime.utils.Log; @:fileXml('tags="haxe,release"') @:noDebug #end -@:allow(lime.app.Promise) /*@:generic*/ -class Future +@:allow(lime.app.Promise) /*@:generic*/ class Future { /** If the `Future` has finished with an error state, the `error` value diff --git a/src/lime/graphics/Image.hx b/src/lime/graphics/Image.hx index 5ab0e6cd6..a624c7f80 100644 --- a/src/lime/graphics/Image.hx +++ b/src/lime/graphics/Image.hx @@ -1439,7 +1439,7 @@ class Image { #if (js && html5) #if openfljs - var image:JSImage = untyped #if haxe4 js.Syntax.code #else __js__ #end('new window.Image ()'); + var image:JSImage = untyped #if haxe4 js.Syntax.code #else __js__ #end ('new window.Image ()'); #else var image = new JSImage(); #end @@ -1575,7 +1575,7 @@ class Image }); #elseif (js && html5) #if openfljs - var image:JSImage = untyped #if haxe4 js.Syntax.code #else __js__ #end('new window.Image ()'); + var image:JSImage = untyped #if haxe4 js.Syntax.code #else __js__ #end ('new window.Image ()'); #else var image = new JSImage(); #end diff --git a/src/lime/graphics/OpenGLES2RenderContext.hx b/src/lime/graphics/OpenGLES2RenderContext.hx index 7e924dc3c..845067bb1 100644 --- a/src/lime/graphics/OpenGLES2RenderContext.hx +++ b/src/lime/graphics/OpenGLES2RenderContext.hx @@ -80,7 +80,7 @@ import lime.graphics.opengl.*; vertexAttrib2f, vertexAttrib2fv, vertexAttrib3f, vertexAttrib3fv, vertexAttrib4f, vertexAttrib4fv, vertexAttribPointer, viewport, EXTENSIONS, type, version) @:transitive abstract OpenGLES2RenderContext(OpenGLES3RenderContext) from OpenGLES3RenderContext -#if (!doc_gen && lime_opengl) from OpenGLRenderContext #end + #if (!doc_gen && lime_opengl) from OpenGLRenderContext #end { @:from private static function fromGL(gl:Class):OpenGLES2RenderContext { diff --git a/src/lime/media/AudioContext.hx b/src/lime/media/AudioContext.hx index 53687d2d4..9d9f95c0f 100644 --- a/src/lime/media/AudioContext.hx +++ b/src/lime/media/AudioContext.hx @@ -30,8 +30,8 @@ class AudioContext { try { - untyped #if haxe4 js.Syntax.code #else __js__ #end("window.AudioContext = window.AudioContext || window.webkitAudioContext;"); - web = cast untyped #if haxe4 js.Syntax.code #else __js__ #end("new window.AudioContext ()"); + untyped #if haxe4 js.Syntax.code #else __js__ #end ("window.AudioContext = window.AudioContext || window.webkitAudioContext;"); + web = cast untyped #if haxe4 js.Syntax.code #else __js__ #end ("new window.AudioContext ()"); this.type = WEB; } catch (e:Dynamic) {} diff --git a/src/lime/text/Font.hx b/src/lime/text/Font.hx index 207bfaeb5..30681e3d7 100644 --- a/src/lime/text/Font.hx +++ b/src/lime/text/Font.hx @@ -59,29 +59,29 @@ class Font if (!__init) { - #if js if (ascender == untyped #if haxe4 js.Syntax.code #else __js__ #end("undefined")) #end ascender = 0; + #if js if (ascender == untyped #if haxe4 js.Syntax.code #else __js__ #end ("undefined")) #end ascender = 0; #if js - if (descender == untyped #if haxe4 js.Syntax.code #else __js__ #end("undefined")) + if (descender == untyped #if haxe4 js.Syntax.code #else __js__ #end ("undefined")) #end descender = 0; #if js - if (height == untyped #if haxe4 js.Syntax.code #else __js__ #end("undefined")) + if (height == untyped #if haxe4 js.Syntax.code #else __js__ #end ("undefined")) #end height = 0; #if js - if (numGlyphs == untyped #if haxe4 js.Syntax.code #else __js__ #end("undefined")) + if (numGlyphs == untyped #if haxe4 js.Syntax.code #else __js__ #end ("undefined")) #end numGlyphs = 0; #if js - if (underlinePosition == untyped #if haxe4 js.Syntax.code #else __js__ #end("undefined")) + if (underlinePosition == untyped #if haxe4 js.Syntax.code #else __js__ #end ("undefined")) #end underlinePosition = 0; #if js - if (underlineThickness == untyped #if haxe4 js.Syntax.code #else __js__ #end("undefined")) + if (underlineThickness == untyped #if haxe4 js.Syntax.code #else __js__ #end ("undefined")) #end underlineThickness = 0; #if js - if (unitsPerEM == untyped #if haxe4 js.Syntax.code #else __js__ #end("undefined")) + if (unitsPerEM == untyped #if haxe4 js.Syntax.code #else __js__ #end ("undefined")) #end unitsPerEM = 0; diff --git a/src/lime/tools/AIRHelper.hx b/src/lime/tools/AIRHelper.hx index a1a255036..7a77dd8ee 100644 --- a/src/lime/tools/AIRHelper.hx +++ b/src/lime/tools/AIRHelper.hx @@ -226,16 +226,16 @@ class AIRHelper System.runCommand("", "killall", ["iPhone Simulator"], true, true); } - System.runCommand(workingDirectory, project.defines.get("AIR_SDK") + "/bin/adt", ["-uninstallApp"] - .concat(args).concat(["-appid", project.meta.packageName]), true, true); + System.runCommand(workingDirectory, project.defines.get("AIR_SDK") + "/bin/adt", + ["-uninstallApp"].concat(args).concat(["-appid", project.meta.packageName]), true, true); System.runCommand(workingDirectory, project.defines.get("AIR_SDK") + "/bin/adt", ["-installApp"].concat(args).concat(["-package", FileSystem.fullPath(workingDirectory) + "/" + (rootDirectory != null ? rootDirectory + "/" : "") + project.app.file + ".ipa"])); - System.runCommand(workingDirectory, project.defines.get("AIR_SDK") + "/bin/adt", ["-launchApp"] - .concat(args).concat(["-appid", project.meta.packageName]), true, true); + System.runCommand(workingDirectory, project.defines.get("AIR_SDK") + "/bin/adt", + ["-launchApp"].concat(args).concat(["-appid", project.meta.packageName]), true, true); if (project.targetFlags.exists("simulator")) { diff --git a/src/lime/tools/PlatformTarget.hx b/src/lime/tools/PlatformTarget.hx index 796471d54..a6232f4ba 100644 --- a/src/lime/tools/PlatformTarget.hx +++ b/src/lime/tools/PlatformTarget.hx @@ -52,7 +52,7 @@ class PlatformTarget this.additionalArguments = additionalArguments; var metaFields = Meta.getFields(Type.getClass(this)); - if ( /*!Reflect.hasField (metaFields.watch, "ignore") && */ (project.targetFlags.exists("watch"))) + if (/*!Reflect.hasField (metaFields.watch, "ignore") && */ (project.targetFlags.exists("watch"))) { Log.info("", "\n" + Log.accentColor + "Running command: WATCH" + Log.resetColor); watch(); diff --git a/src/lime/ui/FileDialog.hx b/src/lime/ui/FileDialog.hx index f9d2284fa..eadaf4cb3 100644 --- a/src/lime/ui/FileDialog.hx +++ b/src/lime/ui/FileDialog.hx @@ -223,10 +223,10 @@ class FileDialog var path = defaultPath != null ? Path.withoutDirectory(defaultPath) : "download" + defaultExtension; var buffer = (data : Bytes).getData(); - buffer = buffer.slice(0, (data:Bytes).length); + buffer = buffer.slice(0, (data : Bytes).length); #if commonjs - untyped #if haxe4 js.Syntax.code #else __js__ #end("require ('file-saver')")(new Blob([buffer], {type: type}), path, true); + untyped #if haxe4 js.Syntax.code #else __js__ #end ("require ('file-saver')")(new Blob([buffer], {type: type}), path, true); #else untyped window.saveAs(new Blob([buffer], {type: type}), path, true); #end diff --git a/src/lime/utils/ArrayBuffer.hx b/src/lime/utils/ArrayBuffer.hx index 1570147b1..7c96e548d 100644 --- a/src/lime/utils/ArrayBuffer.hx +++ b/src/lime/utils/ArrayBuffer.hx @@ -8,8 +8,8 @@ import haxe.io.Bytes; @:forward @:transitive abstract ArrayBuffer(Bytes) from Bytes to Bytes -#if doc_gen from Dynamic to Dynamic -#end + #if doc_gen from Dynamic to Dynamic + #end { public var byteLength(get, never):Int; diff --git a/src/lime/utils/Assets.hx b/src/lime/utils/Assets.hx index 5f54beb9e..58477916f 100644 --- a/src/lime/utils/Assets.hx +++ b/src/lime/utils/Assets.hx @@ -431,7 +431,7 @@ class Assets } }).onError(function(_) { - promise.error("There is no asset library with an ID of \"" + id + "\""); + promise.error("There is no asset library with an ID of \"" + id + "\""); }); } else @@ -477,7 +477,7 @@ class Assets } }).onError(function(_) { - promise.error("There is no asset library with an ID of \"" + id + "\""); + promise.error("There is no asset library with an ID of \"" + id + "\""); }); } #end diff --git a/src/lime/utils/Float32Array.hx b/src/lime/utils/Float32Array.hx index c40922099..1e267e4d4 100644 --- a/src/lime/utils/Float32Array.hx +++ b/src/lime/utils/Float32Array.hx @@ -13,7 +13,8 @@ import js.html.Uint8Array as JSUInt8Array; @:transitive abstract Float32Array(JSFloat32Array) from JSFloat32Array to JSFloat32Array { - @:to function toArrayBufferView ():ArrayBufferView return this; + @:to function toArrayBufferView():ArrayBufferView + return this; public inline static var BYTES_PER_ELEMENT:Int = 4; diff --git a/src/lime/utils/Float64Array.hx b/src/lime/utils/Float64Array.hx index e1c538b2d..5b9542bce 100644 --- a/src/lime/utils/Float64Array.hx +++ b/src/lime/utils/Float64Array.hx @@ -12,8 +12,9 @@ import js.html.Uint8Array as JSUInt8Array; @:transitive abstract Float64Array(JSFloat64Array) from JSFloat64Array to JSFloat64Array { - @:to inline function toArrayBufferView ():ArrayBufferView return this; - + @:to inline function toArrayBufferView():ArrayBufferView + return this; + public inline static var BYTES_PER_ELEMENT:Int = 8; @:generic diff --git a/src/lime/utils/Int16Array.hx b/src/lime/utils/Int16Array.hx index 0478f37db..799a93ef0 100644 --- a/src/lime/utils/Int16Array.hx +++ b/src/lime/utils/Int16Array.hx @@ -12,7 +12,8 @@ import js.html.Uint8Array as JSUInt8Array; @:transitive abstract Int16Array(JSInt16Array) from JSInt16Array to JSInt16Array { - @:to inline function toArrayBufferView ():ArrayBufferView return this; + @:to inline function toArrayBufferView():ArrayBufferView + return this; public inline static var BYTES_PER_ELEMENT:Int = 2; diff --git a/src/lime/utils/Int32Array.hx b/src/lime/utils/Int32Array.hx index 2b0874ea1..936edc8cb 100644 --- a/src/lime/utils/Int32Array.hx +++ b/src/lime/utils/Int32Array.hx @@ -12,7 +12,8 @@ import js.html.Uint8Array as JSUInt8Array; @:transitive abstract Int32Array(JSInt32Array) from JSInt32Array to JSInt32Array { - @:to inline function toArrayBufferView ():ArrayBufferView return this; + @:to inline function toArrayBufferView():ArrayBufferView + return this; public inline static var BYTES_PER_ELEMENT:Int = 4; diff --git a/src/lime/utils/Int8Array.hx b/src/lime/utils/Int8Array.hx index 5cc884ca3..edf9d32b3 100644 --- a/src/lime/utils/Int8Array.hx +++ b/src/lime/utils/Int8Array.hx @@ -12,8 +12,9 @@ import js.html.Uint8Array as JSUInt8Array; @:transitive abstract Int8Array(JSInt8Array) from JSInt8Array to JSInt8Array { - @:to inline function toArrayBufferView ():ArrayBufferView return this; - + @:to inline function toArrayBufferView():ArrayBufferView + return this; + public inline static var BYTES_PER_ELEMENT:Int = 1; @:generic diff --git a/src/lime/utils/Log.hx b/src/lime/utils/Log.hx index 6d39b30c9..18d92b037 100644 --- a/src/lime/utils/Log.hx +++ b/src/lime/utils/Log.hx @@ -16,7 +16,7 @@ class Log if (level >= LogLevel.DEBUG) { #if js - untyped #if haxe4 js.Syntax.code #else __js__ #end("console").debug("[" + info.className + "] " + message); + untyped #if haxe4 js.Syntax.code #else __js__ #end ("console").debug("[" + info.className + "] " + message); #else println("[" + info.className + "] " + Std.string(message)); #end @@ -36,7 +36,7 @@ class Log else { #if js - untyped #if haxe4 js.Syntax.code #else __js__ #end("console").error(message); + untyped #if haxe4 js.Syntax.code #else __js__ #end ("console").error(message); #else println(message); #end @@ -49,7 +49,7 @@ class Log if (level >= LogLevel.INFO) { #if js - untyped #if haxe4 js.Syntax.code #else __js__ #end("console").info("[" + info.className + "] " + message); + untyped #if haxe4 js.Syntax.code #else __js__ #end ("console").info("[" + info.className + "] " + message); #else println("[" + info.className + "] " + Std.string(message)); #end @@ -63,7 +63,7 @@ class Log #elseif flash untyped __global__["trace"](Std.string(message)); #elseif js - untyped #if haxe4 js.Syntax.code #else __js__ #end("console").log(message); + untyped #if haxe4 js.Syntax.code #else __js__ #end ("console").log(message); #else trace(message); #end @@ -76,7 +76,7 @@ class Log #elseif flash untyped __global__["trace"](Std.string(message)); #elseif js - untyped #if haxe4 js.Syntax.code #else __js__ #end("console").log(message); + untyped #if haxe4 js.Syntax.code #else __js__ #end ("console").log(message); #else trace(Std.string(message)); #end @@ -95,7 +95,7 @@ class Log if (level >= LogLevel.WARN) { #if js - untyped #if haxe4 js.Syntax.code #else __js__ #end("console").warn("[" + info.className + "] WARNING: " + message); + untyped #if haxe4 js.Syntax.code #else __js__ #end ("console").warn("[" + info.className + "] WARNING: " + message); #else println("[" + info.className + "] WARNING: " + Std.string(message)); #end @@ -127,13 +127,13 @@ class Log #end #if js - if (untyped #if haxe4 js.Syntax.code #else __js__ #end("typeof console") == "undefined") + if (untyped #if haxe4 js.Syntax.code #else __js__ #end ("typeof console") == "undefined") { - untyped #if haxe4 js.Syntax.code #else __js__ #end("console = {}"); + untyped #if haxe4 js.Syntax.code #else __js__ #end ("console = {}"); } - if (untyped #if haxe4 js.Syntax.code #else __js__ #end("console").log == null) + if (untyped #if haxe4 js.Syntax.code #else __js__ #end ("console").log == null) { - untyped #if haxe4 js.Syntax.code #else __js__ #end("console").log = function() {}; + untyped #if haxe4 js.Syntax.code #else __js__ #end ("console").log = function() {}; } #end } diff --git a/src/lime/utils/UInt16Array.hx b/src/lime/utils/UInt16Array.hx index de77e82d4..94db8aae7 100644 --- a/src/lime/utils/UInt16Array.hx +++ b/src/lime/utils/UInt16Array.hx @@ -12,8 +12,9 @@ import js.html.Uint16Array as JSUInt16Array; @:transitive abstract UInt16Array(JSUInt16Array) from JSUInt16Array to JSUInt16Array { - @:to inline function toArrayBufferView ():ArrayBufferView return this; - + @:to inline function toArrayBufferView():ArrayBufferView + return this; + public inline static var BYTES_PER_ELEMENT:Int = 2; @:generic diff --git a/src/lime/utils/UInt32Array.hx b/src/lime/utils/UInt32Array.hx index 3d43f1f36..4337896e3 100644 --- a/src/lime/utils/UInt32Array.hx +++ b/src/lime/utils/UInt32Array.hx @@ -12,8 +12,9 @@ import js.html.Uint32Array as JSUInt32Array; @:transitive abstract UInt32Array(JSUInt32Array) from JSUInt32Array to JSUInt32Array { - @:to inline function toArrayBufferView ():ArrayBufferView return this; - + @:to inline function toArrayBufferView():ArrayBufferView + return this; + public inline static var BYTES_PER_ELEMENT:Int = 4; @:generic diff --git a/src/lime/utils/UInt8Array.hx b/src/lime/utils/UInt8Array.hx index f1555b231..83962b7ca 100644 --- a/src/lime/utils/UInt8Array.hx +++ b/src/lime/utils/UInt8Array.hx @@ -10,8 +10,9 @@ import js.html.Uint8Array as JSUInt8Array; @:transitive abstract UInt8Array(JSUInt8Array) from JSUInt8Array to JSUInt8Array { - @:to inline function toArrayBufferView ():ArrayBufferView return this; - + @:to inline function toArrayBufferView():ArrayBufferView + return this; + public inline static var BYTES_PER_ELEMENT:Int = 1; @:generic diff --git a/src/lime/utils/UInt8ClampedArray.hx b/src/lime/utils/UInt8ClampedArray.hx index 1e02ae1a9..5e47168d4 100644 --- a/src/lime/utils/UInt8ClampedArray.hx +++ b/src/lime/utils/UInt8ClampedArray.hx @@ -12,8 +12,9 @@ import js.html.Uint8ClampedArray as JSUInt8ClampedArray; @:transitive abstract UInt8ClampedArray(JSUInt8ClampedArray) from JSUInt8ClampedArray to JSUInt8ClampedArray { - @:to inline function toArrayBufferView ():ArrayBufferView return this; - + @:to inline function toArrayBufferView():ArrayBufferView + return this; + public inline static var BYTES_PER_ELEMENT:Int = 1; @:generic diff --git a/tools/platforms/AndroidPlatform.hx b/tools/platforms/AndroidPlatform.hx index 6c3cf617a..19b33a482 100644 --- a/tools/platforms/AndroidPlatform.hx +++ b/tools/platforms/AndroidPlatform.hx @@ -280,7 +280,7 @@ class AndroidPlatform extends PlatformTarget var armv7 = (command == "rebuild" || ArrayTools.containsValue(project.architectures, Architecture.ARMV7)); var arm64 = (command == "rebuild" || ArrayTools.containsValue(project.architectures, Architecture.ARM64)); var x86 = (command == "rebuild" || ArrayTools.containsValue(project.architectures, Architecture.X86)); - var x64 = ( /*command == "rebuild" ||*/ ArrayTools.containsValue(project.architectures, Architecture.X64)); + var x64 = (/*command == "rebuild" ||*/ ArrayTools.containsValue(project.architectures, Architecture.X64)); var commands = []; diff --git a/tools/platforms/HTML5Platform.hx b/tools/platforms/HTML5Platform.hx index b803d505b..de0c2f22d 100644 --- a/tools/platforms/HTML5Platform.hx +++ b/tools/platforms/HTML5Platform.hx @@ -376,7 +376,7 @@ class HTML5Platform extends PlatformTarget if (asset.type != AssetType.TEMPLATE) { - if ( /*asset.embed != true &&*/ asset.type != AssetType.FONT) + if (/*asset.embed != true &&*/ asset.type != AssetType.FONT) { dir = Path.directory(path); if (!createdDirectories.exists(dir)) diff --git a/tools/platforms/IOSPlatform.hx b/tools/platforms/IOSPlatform.hx index a73e9842f..4820ca6f1 100644 --- a/tools/platforms/IOSPlatform.hx +++ b/tools/platforms/IOSPlatform.hx @@ -682,12 +682,19 @@ class IOSPlatform extends PlatformTarget ProjectHelper.recursiveSmartCopyTemplate(project, "iphone/PROJ.xcodeproj", targetDirectory + "/" + project.app.file + ".xcodeproj", context, true, false); - //Merge plist files - var plistFiles = System.readDirectory(projectDirectory).filter(function(fileName:String){ + // Merge plist files + var plistFiles = System.readDirectory(projectDirectory).filter(function(fileName:String) + { return fileName.substr(-11) == "-Info.plist" && fileName != projectDirectory + "/" + project.app.file + "-Info.plist"; }); - for(plist in plistFiles){ - System.runCommand(project.workingDirectory, "/usr/libexec/PlistBuddy", ["-x", "-c", "Merge " + plist, projectDirectory + "/" + project.app.file + "-Info.plist"]); + for (plist in plistFiles) + { + System.runCommand(project.workingDirectory, "/usr/libexec/PlistBuddy", [ + "-x", + "-c", + "Merge " + plist, + projectDirectory + "/" + project.app.file + "-Info.plist" + ]); } System.mkdir(projectDirectory + "/lib"); diff --git a/tools/platforms/WindowsPlatform.hx b/tools/platforms/WindowsPlatform.hx index 03ca5478d..e466670a8 100644 --- a/tools/platforms/WindowsPlatform.hx +++ b/tools/platforms/WindowsPlatform.hx @@ -210,8 +210,9 @@ class WindowsPlatform extends PlatformTarget var command = #if lime "lime" #else "hxp" #end; Log.warn("You must define HL_PATH to copy HashLink dependencies, please run '" + command + " setup hl' first"); - - }else{ + } + else + { System.copyFile(project.environment.get("HL_PATH") + '/ssl.hdll', applicationDirectory + '/ssl.hdll'); } } diff --git a/tools/utils/PlatformSetup.hx b/tools/utils/PlatformSetup.hx index 566826876..dc38d3bb4 100644 --- a/tools/utils/PlatformSetup.hx +++ b/tools/utils/PlatformSetup.hx @@ -413,7 +413,7 @@ class PlatformSetup case "neko", "cs", "uwp", "winjs", "nodejs", "java": Log.println("\x1b[0;3mNo additional configuration is required.\x1b[0m"); - + case "hl", "hashlink": setupHL(); @@ -1103,7 +1103,6 @@ class PlatformSetup if (answer == YES || answer == ALWAYS) { - if (System.hostPlatform == MAC) { try @@ -1183,24 +1182,21 @@ class PlatformSetup System.openURL(visualStudioURL); } } - + public static function setupHL():Void { Log.println("\x1b[1mIn order to build HashLink executables you must have"); Log.println("HashLink binaries installed."); Log.println("We recommend using version \"1.10.0\""); Log.println("available as a free download from Github.\x1b[0m"); - - var answer = CLIHelper.ask("Would you like to visit the download page now?"); if (answer == YES || answer == ALWAYS) { System.openURL(hashlinkURL); - } - + getDefineValue("HL_PATH", "Path to Hashlink binaries."); Log.println(""); Log.println("Setup completed");