Flash compile fix, format update
This commit is contained in:
@@ -2,6 +2,7 @@ package haxe;
|
||||
|
||||
#if !lime_cffi
|
||||
// Original haxe.Timer class
|
||||
|
||||
/*
|
||||
* Copyright (C)2005-2018 Haxe Foundation
|
||||
*
|
||||
|
||||
@@ -102,7 +102,7 @@ class FlashHTTPRequest
|
||||
|
||||
urlLoader.addEventListener(ProgressEvent.PROGRESS, function(event)
|
||||
{
|
||||
promise.progress(event.bytesLoaded, event.bytesTotal);
|
||||
promise.progress(Std.int(event.bytesLoaded), Std.int(event.bytesTotal));
|
||||
});
|
||||
|
||||
urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, function(event)
|
||||
@@ -111,7 +111,7 @@ class FlashHTTPRequest
|
||||
|
||||
if (parent.enableResponseHeaders)
|
||||
{
|
||||
parent.responseHeaders = event.responseHeaders;
|
||||
parent.responseHeaders = cast event.responseHeaders;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -141,7 +141,7 @@ class FlashHTTPRequest
|
||||
|
||||
urlLoader.addEventListener(ProgressEvent.PROGRESS, function(event)
|
||||
{
|
||||
promise.progress(event.bytesLoaded, event.bytesTotal);
|
||||
promise.progress(Std.int(event.bytesLoaded), Std.int(event.bytesTotal));
|
||||
});
|
||||
|
||||
urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, function(event)
|
||||
@@ -150,7 +150,7 @@ class FlashHTTPRequest
|
||||
|
||||
if (parent.enableResponseHeaders)
|
||||
{
|
||||
parent.responseHeaders = event.responseHeaders;
|
||||
parent.responseHeaders = cast event.responseHeaders;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -182,9 +182,8 @@ class HTML5Window
|
||||
div.style.height = parent.__height + "px";
|
||||
}
|
||||
|
||||
if ((Reflect.hasField(attributes, "resizable") && attributes.resizable) || (!Reflect.hasField(attributes, "width")
|
||||
&& setWidth == 0
|
||||
&& setHeight == 0))
|
||||
if ((Reflect.hasField(attributes, "resizable") && attributes.resizable)
|
||||
|| (!Reflect.hasField(attributes, "width") && setWidth == 0 && setHeight == 0))
|
||||
{
|
||||
parent.__resizable = true;
|
||||
}
|
||||
@@ -269,7 +268,8 @@ class HTML5Window
|
||||
|
||||
var forceCanvas = #if (canvas || munit) true #else (renderType == CANVAS) #end;
|
||||
var forceWebGL = #if webgl true #else (renderType == OPENGL || renderType == OPENGLES || renderType == WEBGL) #end;
|
||||
var allowWebGL2 = #if webgl1 false #else (!Reflect.hasField(contextAttributes, "version") || contextAttributes.version != "1") #end;
|
||||
var allowWebGL2 = #if webgl1 false #else (!Reflect.hasField(contextAttributes, "version")
|
||||
|| contextAttributes.version != "1") #end;
|
||||
var isWebGL2 = false;
|
||||
|
||||
if (forceWebGL || (!forceCanvas && (!Reflect.hasField(contextAttributes, "hardware") || contextAttributes.hardware)))
|
||||
|
||||
@@ -271,9 +271,7 @@ class NativeApplication
|
||||
{
|
||||
if (type == KEY_DOWN)
|
||||
{
|
||||
if (toggleFullscreen
|
||||
&& modifier.altKey
|
||||
&& (!modifier.ctrlKey && !modifier.shiftKey && !modifier.metaKey))
|
||||
if (toggleFullscreen && modifier.altKey && (!modifier.ctrlKey && !modifier.shiftKey && !modifier.metaKey))
|
||||
{
|
||||
toggleFullscreen = false;
|
||||
|
||||
@@ -300,9 +298,7 @@ class NativeApplication
|
||||
{
|
||||
if (type == KEY_DOWN)
|
||||
{
|
||||
if (toggleFullscreen
|
||||
&& (modifier.ctrlKey && modifier.metaKey)
|
||||
&& (!modifier.altKey && !modifier.shiftKey))
|
||||
if (toggleFullscreen && (modifier.ctrlKey && modifier.metaKey) && (!modifier.altKey && !modifier.shiftKey))
|
||||
{
|
||||
toggleFullscreen = false;
|
||||
|
||||
|
||||
@@ -1923,8 +1923,7 @@ class NativeCFFI
|
||||
@:hlNative("lime", "lime_al_buffer3f") private static function lime_al_buffer3f(buffer:CFFIPointer, param:Int, value1:hl.F32, value2:hl.F32,
|
||||
value3:hl.F32):Void {}
|
||||
|
||||
@:hlNative("lime", "lime_al_buffer3i") private static function lime_al_buffer3i(buffer:CFFIPointer, param:Int, value1:Int, value2:Int,
|
||||
value3:Int):Void {}
|
||||
@:hlNative("lime", "lime_al_buffer3i") private static function lime_al_buffer3i(buffer:CFFIPointer, param:Int, value1:Int, value2:Int, value3:Int):Void {}
|
||||
|
||||
@:hlNative("lime", "lime_al_bufferf") private static function lime_al_bufferf(buffer:CFFIPointer, param:Int, value:hl.F32):Void {}
|
||||
|
||||
@@ -3078,8 +3077,7 @@ class NativeCFFI
|
||||
|
||||
@:hlNative("lime", "lime_cairo_set_source") private static function lime_cairo_set_source(handle:CFFIPointer, pattern:CFFIPointer):Void {}
|
||||
|
||||
@:hlNative("lime", "lime_cairo_set_source_rgb") private static function lime_cairo_set_source_rgb(handle:CFFIPointer, r:Float, g:Float,
|
||||
b:Float):Void {}
|
||||
@:hlNative("lime", "lime_cairo_set_source_rgb") private static function lime_cairo_set_source_rgb(handle:CFFIPointer, r:Float, g:Float, b:Float):Void {}
|
||||
|
||||
@:hlNative("lime", "lime_cairo_set_source_rgba") private static function lime_cairo_set_source_rgba(handle:CFFIPointer, r:Float, g:Float, b:Float,
|
||||
a:Float):Void {}
|
||||
@@ -3514,8 +3512,7 @@ class NativeCFFI
|
||||
return 0;
|
||||
}
|
||||
|
||||
@:hlNative("lime", "lime_curl_multi_setopt") private static function lime_curl_multi_setopt(multi_handle:CFFIPointer, option:Int,
|
||||
parameter:Dynamic):Int
|
||||
@:hlNative("lime", "lime_curl_multi_setopt") private static function lime_curl_multi_setopt(multi_handle:CFFIPointer, option:Int, parameter:Dynamic):Int
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -4848,8 +4845,7 @@ class NativeCFFI
|
||||
|
||||
@:hlNative("lime", "lime_gl_clear") private static function lime_gl_clear(mask:Int):Void {}
|
||||
|
||||
@:hlNative("lime", "lime_gl_clear_bufferfi") private static function lime_gl_clear_bufferfi(buffer:Int, drawBuffer:Int, depth:hl.F32,
|
||||
stencil:Int):Void {}
|
||||
@:hlNative("lime", "lime_gl_clear_bufferfi") private static function lime_gl_clear_bufferfi(buffer:Int, drawBuffer:Int, depth:hl.F32, stencil:Int):Void {}
|
||||
|
||||
@:hlNative("lime", "lime_gl_clear_bufferfv") private static function lime_gl_clear_bufferfv(buffer:Int, drawBuffer:Int, data:DataPointer):Void {}
|
||||
|
||||
@@ -5170,8 +5166,7 @@ class NativeCFFI
|
||||
return 0;
|
||||
}
|
||||
|
||||
@:hlNative("lime", "lime_gl_get_query_objectuiv") private static function lime_gl_get_query_objectuiv(target:Int, pname:Int,
|
||||
params:DataPointer):Void {}
|
||||
@:hlNative("lime", "lime_gl_get_query_objectuiv") private static function lime_gl_get_query_objectuiv(target:Int, pname:Int, params:DataPointer):Void {}
|
||||
|
||||
@:hlNative("lime", "lime_gl_get_renderbuffer_parameteri") private static function lime_gl_get_renderbuffer_parameteri(target:Int, pname:Int):Int
|
||||
{
|
||||
@@ -5243,16 +5238,14 @@ class NativeCFFI
|
||||
return 0;
|
||||
}
|
||||
|
||||
@:hlNative("lime", "lime_gl_get_tex_parameterfv") private static function lime_gl_get_tex_parameterfv(target:Int, pname:Int,
|
||||
params:DataPointer):Void {}
|
||||
@:hlNative("lime", "lime_gl_get_tex_parameterfv") private static function lime_gl_get_tex_parameterfv(target:Int, pname:Int, params:DataPointer):Void {}
|
||||
|
||||
@:hlNative("lime", "lime_gl_get_tex_parameteri") private static function lime_gl_get_tex_parameteri(target:Int, pname:Int):Int
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@:hlNative("lime", "lime_gl_get_tex_parameteriv") private static function lime_gl_get_tex_parameteriv(target:Int, pname:Int,
|
||||
params:DataPointer):Void {}
|
||||
@:hlNative("lime", "lime_gl_get_tex_parameteriv") private static function lime_gl_get_tex_parameteriv(target:Int, pname:Int, params:DataPointer):Void {}
|
||||
|
||||
@:hlNative("lime", "lime_gl_get_transform_feedback_varying") private static function lime_gl_get_transform_feedback_varying(program:Int, index:Int,
|
||||
object:Dynamic):Dynamic
|
||||
@@ -5310,16 +5303,14 @@ class NativeCFFI
|
||||
return 0;
|
||||
}
|
||||
|
||||
@:hlNative("lime", "lime_gl_get_vertex_attribiiv") private static function lime_gl_get_vertex_attribiiv(index:Int, pname:Int,
|
||||
params:DataPointer):Void {}
|
||||
@:hlNative("lime", "lime_gl_get_vertex_attribiiv") private static function lime_gl_get_vertex_attribiiv(index:Int, pname:Int, params:DataPointer):Void {}
|
||||
|
||||
@:hlNative("lime", "lime_gl_get_vertex_attribiui") private static function lime_gl_get_vertex_attribiui(index:Int, pname:Int):Int
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@:hlNative("lime", "lime_gl_get_vertex_attribiuiv") private static function lime_gl_get_vertex_attribiuiv(index:Int, pname:Int,
|
||||
params:DataPointer):Void {}
|
||||
@:hlNative("lime", "lime_gl_get_vertex_attribiuiv") private static function lime_gl_get_vertex_attribiuiv(index:Int, pname:Int, params:DataPointer):Void {}
|
||||
|
||||
@:hlNative("lime", "lime_gl_get_vertex_attrib_pointerv") private static function lime_gl_get_vertex_attrib_pointerv(index:Int, pname:Int):DataPointer
|
||||
{
|
||||
@@ -5590,8 +5581,7 @@ class NativeCFFI
|
||||
|
||||
@:hlNative("lime", "lime_gl_vertex_attrib3fv") private static function lime_gl_vertex_attrib3fv(indx:Int, values:DataPointer):Void {}
|
||||
|
||||
@:hlNative("lime", "lime_gl_vertex_attrib4f") private static function lime_gl_vertex_attrib4f(indx:Int, v0:hl.F32, v1:hl.F32, v2:hl.F32,
|
||||
v3:hl.F32):Void {}
|
||||
@:hlNative("lime", "lime_gl_vertex_attrib4f") private static function lime_gl_vertex_attrib4f(indx:Int, v0:hl.F32, v1:hl.F32, v2:hl.F32, v3:hl.F32):Void {}
|
||||
|
||||
@:hlNative("lime", "lime_gl_vertex_attrib4fv") private static function lime_gl_vertex_attrib4fv(indx:Int, values:DataPointer):Void {}
|
||||
|
||||
@@ -6294,8 +6284,7 @@ class NativeCFFI
|
||||
@:hlNative("lime", "lime_hb_buffer_set_cluster_level") private static function lime_hb_buffer_set_cluster_level(buffer:CFFIPointer,
|
||||
clusterLevel:Int):Void {}
|
||||
|
||||
@:hlNative("lime", "lime_hb_buffer_set_content_type") private static function lime_hb_buffer_set_content_type(buffer:CFFIPointer,
|
||||
contentType:Int):Void {}
|
||||
@:hlNative("lime", "lime_hb_buffer_set_content_type") private static function lime_hb_buffer_set_content_type(buffer:CFFIPointer, contentType:Int):Void {}
|
||||
|
||||
@:hlNative("lime", "lime_hb_buffer_set_direction") private static function lime_hb_buffer_set_direction(buffer:CFFIPointer, direction:Int):Void {}
|
||||
|
||||
@@ -6569,8 +6558,7 @@ class NativeCFFI
|
||||
|
||||
@:hlNative("lime", "lime_hb_set_subtract") private static function lime_hb_set_subtract(set:CFFIPointer, other:CFFIPointer):Void {}
|
||||
|
||||
@:hlNative("lime", "lime_hb_set_symmetric_difference") private static function lime_hb_set_symmetric_difference(set:CFFIPointer,
|
||||
other:CFFIPointer):Void {}
|
||||
@:hlNative("lime", "lime_hb_set_symmetric_difference") private static function lime_hb_set_symmetric_difference(set:CFFIPointer, other:CFFIPointer):Void {}
|
||||
|
||||
@:hlNative("lime", "lime_hb_set_union") private static function lime_hb_set_union(set:CFFIPointer, other:CFFIPointer):Void {}
|
||||
|
||||
|
||||
@@ -1806,13 +1806,7 @@ class NativeOpenGLRenderContext
|
||||
return params;
|
||||
|
||||
case GL.ACTIVE_TEXTURE, GL.ALPHA_BITS, GL.BLEND_DST_ALPHA, GL.BLEND_DST_RGB, GL.BLEND_EQUATION, GL
|
||||
.BLEND_EQUATION_ALPHA, /*GL.BLEND_EQUATION_RGB,*/ GL.BLEND_SRC_ALPHA, GL.BLEND_SRC_RGB, GL.BLUE_BITS, GL.CULL_FACE_MODE, GL.DEPTH_BITS, GL.DEPTH_FUNC, GL
|
||||
.FRONT_FACE, GL.GENERATE_MIPMAP_HINT, GL.GREEN_BITS, GL.IMPLEMENTATION_COLOR_READ_FORMAT, GL.IMPLEMENTATION_COLOR_READ_TYPE, GL.MAX_COMBINED_TEXTURE_IMAGE_UNITS, GL
|
||||
.MAX_CUBE_MAP_TEXTURE_SIZE, GL.MAX_FRAGMENT_UNIFORM_VECTORS, GL.MAX_RENDERBUFFER_SIZE, GL.MAX_TEXTURE_IMAGE_UNITS, GL.MAX_TEXTURE_SIZE, GL.MAX_VARYING_VECTORS, GL
|
||||
.MAX_VERTEX_ATTRIBS, GL.MAX_VERTEX_TEXTURE_IMAGE_UNITS, GL.MAX_VERTEX_UNIFORM_VECTORS, GL.PACK_ALIGNMENT, GL.RED_BITS, GL.SAMPLE_BUFFERS, GL.SAMPLES, GL
|
||||
.STENCIL_BACK_FAIL, GL.STENCIL_BACK_FUNC, GL.STENCIL_BACK_PASS_DEPTH_FAIL, GL.STENCIL_BACK_PASS_DEPTH_PASS, GL.STENCIL_BACK_REF, GL.STENCIL_BACK_VALUE_MASK, GL
|
||||
.STENCIL_BACK_WRITEMASK, GL.STENCIL_BITS, GL.STENCIL_CLEAR_VALUE, GL.STENCIL_FAIL, GL.STENCIL_FUNC, GL.STENCIL_PASS_DEPTH_FAIL, GL.STENCIL_PASS_DEPTH_PASS, GL
|
||||
.STENCIL_REF, GL.STENCIL_VALUE_MASK, GL.STENCIL_WRITEMASK, GL.SUBPIXEL_BITS, GL.UNPACK_ALIGNMENT, GL.UNPACK_COLORSPACE_CONVERSION_WEBGL:
|
||||
.BLEND_EQUATION_ALPHA, /*GL.BLEND_EQUATION_RGB,*/ GL.BLEND_SRC_ALPHA, GL.BLEND_SRC_RGB, GL.BLUE_BITS, GL.CULL_FACE_MODE, GL.DEPTH_BITS, GL.DEPTH_FUNC, GL.FRONT_FACE, GL.GENERATE_MIPMAP_HINT, GL.GREEN_BITS, GL.IMPLEMENTATION_COLOR_READ_FORMAT, GL.IMPLEMENTATION_COLOR_READ_TYPE, GL.MAX_COMBINED_TEXTURE_IMAGE_UNITS, GL.MAX_CUBE_MAP_TEXTURE_SIZE, GL.MAX_FRAGMENT_UNIFORM_VECTORS, GL.MAX_RENDERBUFFER_SIZE, GL.MAX_TEXTURE_IMAGE_UNITS, GL.MAX_TEXTURE_SIZE, GL.MAX_VARYING_VECTORS, GL.MAX_VERTEX_ATTRIBS, GL.MAX_VERTEX_TEXTURE_IMAGE_UNITS, GL.MAX_VERTEX_UNIFORM_VECTORS, GL.PACK_ALIGNMENT, GL.RED_BITS, GL.SAMPLE_BUFFERS, GL.SAMPLES, GL.STENCIL_BACK_FAIL, GL.STENCIL_BACK_FUNC, GL.STENCIL_BACK_PASS_DEPTH_FAIL, GL.STENCIL_BACK_PASS_DEPTH_PASS, GL.STENCIL_BACK_REF, GL.STENCIL_BACK_VALUE_MASK, GL.STENCIL_BACK_WRITEMASK, GL.STENCIL_BITS, GL.STENCIL_CLEAR_VALUE, GL.STENCIL_FAIL, GL.STENCIL_FUNC, GL.STENCIL_PASS_DEPTH_FAIL, GL.STENCIL_PASS_DEPTH_PASS, GL.STENCIL_REF, GL.STENCIL_VALUE_MASK, GL.STENCIL_WRITEMASK, GL.SUBPIXEL_BITS, GL.UNPACK_ALIGNMENT, GL.UNPACK_COLORSPACE_CONVERSION_WEBGL:
|
||||
return getInteger(pname);
|
||||
|
||||
case GL.COMPRESSED_TEXTURE_FORMATS:
|
||||
|
||||
@@ -416,7 +416,8 @@ class NativeWindow
|
||||
pitch: 0
|
||||
} #end);
|
||||
|
||||
if (lock != null && (cacheLock == null || cacheLock.pixels != lock.pixels || cacheLock.width != lock.width || cacheLock.height != lock.height))
|
||||
if (lock != null
|
||||
&& (cacheLock == null || cacheLock.pixels != lock.pixels || cacheLock.width != lock.width || cacheLock.height != lock.height))
|
||||
{
|
||||
primarySurface = CairoImageSurface.create(lock.pixels, CairoFormat.ARGB32, lock.width, lock.height, lock.pitch);
|
||||
|
||||
|
||||
@@ -127,10 +127,8 @@ class ImageCanvasUtil
|
||||
public static function copyPixels(image:Image, sourceImage:Image, sourceRect:Rectangle, destPoint:Vector2, alphaImage:Image = null,
|
||||
alphaPoint:Vector2 = null, mergeAlpha:Bool = false):Void
|
||||
{
|
||||
if (destPoint == null
|
||||
|| destPoint.x >= image.width
|
||||
|| destPoint.y >= image.height
|
||||
|| sourceRect == null || sourceRect.width < 1 || sourceRect.height < 1)
|
||||
if (destPoint == null || destPoint.x >= image.width || destPoint.y >= image.height || sourceRect == null || sourceRect.width < 1
|
||||
|| sourceRect.height < 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -153,8 +151,8 @@ class ImageCanvasUtil
|
||||
{
|
||||
if (image.transparent && sourceImage.transparent)
|
||||
{
|
||||
image.buffer.__srcContext.clearRect(destPoint.x + image.offsetX, destPoint.y + image.offsetY, sourceRect.width + image.offsetX, sourceRect
|
||||
.height + image.offsetY);
|
||||
image.buffer.__srcContext.clearRect(destPoint.x + image.offsetX, destPoint.y + image.offsetY, sourceRect.width + image.offsetX,
|
||||
sourceRect.height + image.offsetY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -297,7 +297,10 @@ class ImageDataUtil
|
||||
&& sourceRect.y == 0
|
||||
&& destPoint.x == 0
|
||||
&& destPoint.y == 0
|
||||
&& alphaImage == null && alphaPoint == null && mergeAlpha == false && image.format == sourceImage.format)
|
||||
&& alphaImage == null
|
||||
&& alphaPoint == null
|
||||
&& mergeAlpha == false
|
||||
&& image.format == sourceImage.format)
|
||||
{
|
||||
image.buffer.data.set(sourceImage.buffer.data);
|
||||
}
|
||||
@@ -1068,12 +1071,12 @@ class ImageDataUtil
|
||||
uOpposite = 1 - uRatio;
|
||||
vOpposite = 1 - vRatio;
|
||||
|
||||
newData[index] = Std.int((data[sourceIndex] * uOpposite + data[sourceIndexX] * uRatio) * vOpposite + (data[sourceIndexY] * uOpposite +
|
||||
data[sourceIndexXY] * uRatio) * vRatio);
|
||||
newData[index + 1] = Std.int((data[sourceIndex + 1] * uOpposite +
|
||||
data[sourceIndexX + 1] * uRatio) * vOpposite + (data[sourceIndexY + 1] * uOpposite + data[sourceIndexXY + 1] * uRatio) * vRatio);
|
||||
newData[index + 2] = Std.int((data[sourceIndex + 2] * uOpposite +
|
||||
data[sourceIndexX + 2] * uRatio) * vOpposite + (data[sourceIndexY + 2] * uOpposite + data[sourceIndexXY + 2] * uRatio) * vRatio);
|
||||
newData[index] = Std.int((data[sourceIndex] * uOpposite + data[sourceIndexX] * uRatio) * vOpposite
|
||||
+ (data[sourceIndexY] * uOpposite + data[sourceIndexXY] * uRatio) * vRatio);
|
||||
newData[index + 1] = Std.int((data[sourceIndex + 1] * uOpposite + data[sourceIndexX + 1] * uRatio) * vOpposite
|
||||
+ (data[sourceIndexY + 1] * uOpposite + data[sourceIndexXY + 1] * uRatio) * vRatio);
|
||||
newData[index + 2] = Std.int((data[sourceIndex + 2] * uOpposite + data[sourceIndexX + 2] * uRatio) * vOpposite
|
||||
+ (data[sourceIndexY + 2] * uOpposite + data[sourceIndexXY + 2] * uRatio) * vRatio);
|
||||
|
||||
// Maybe it would be better to not weigh colors with an alpha of zero, but the below should help prevent black fringes caused by transparent pixels made visible
|
||||
|
||||
|
||||
@@ -194,8 +194,10 @@ class AssetsMacro
|
||||
}
|
||||
|
||||
var bytes = File.getBytes(path);
|
||||
var resourceName = "__ASSET__" + metaName + "_" + (classType.pack.length > 0 ? classType.pack.join("_") + "_" : "") + classType
|
||||
.name;
|
||||
var resourceName = "__ASSET__" + metaName
|
||||
+ "_"
|
||||
+ (classType.pack.length > 0 ? classType.pack.join("_") + "_" : "")
|
||||
+ classType.name;
|
||||
|
||||
if (Context.getResources().exists(resourceName))
|
||||
{
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package lime.graphics;
|
||||
|
||||
#if (!lime_doc_gen || lime_canvas) #if (lime_canvas && (lime_doc_gen || !doc_gen)) import js.html.CanvasRenderingContext2D;
|
||||
#if (!lime_doc_gen || lime_canvas)
|
||||
#if (lime_canvas && (lime_doc_gen || !doc_gen))
|
||||
import js.html.CanvasRenderingContext2D;
|
||||
|
||||
/**
|
||||
The `Canvas2DRenderContext` represents the primary `js.html.CanvasRenderingContext2D` instance when Canvas
|
||||
@@ -21,12 +23,15 @@ abstract Canvas2DRenderContext(CanvasRenderingContext2D) from CanvasRenderingCon
|
||||
{
|
||||
return context.canvas2D;
|
||||
}
|
||||
} #else @:forward()
|
||||
}
|
||||
#else
|
||||
@:forward()
|
||||
abstract Canvas2DRenderContext(Dynamic) from Dynamic to Dynamic
|
||||
{
|
||||
@:from private static function fromRenderContext(context:RenderContext):Canvas2DRenderContext
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} #end
|
||||
}
|
||||
#end
|
||||
#end
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package lime.graphics;
|
||||
|
||||
#if (!lime_doc_gen || lime_dom) #if (lime_dom && (lime_doc_gen || !doc_gen)) import js.html.Element;
|
||||
#if (!lime_doc_gen || lime_dom)
|
||||
#if (lime_dom && (lime_doc_gen || !doc_gen))
|
||||
import js.html.Element;
|
||||
|
||||
/**
|
||||
The `DOMRenderContext` represents the primary `js.html.Element` instance when DOM
|
||||
@@ -21,12 +23,15 @@ abstract DOMRenderContext(Element) from Element to Element
|
||||
{
|
||||
return context.dom;
|
||||
}
|
||||
} #else @:forward
|
||||
}
|
||||
#else
|
||||
@:forward
|
||||
abstract DOMRenderContext(Dynamic) from Dynamic to Dynamic
|
||||
{
|
||||
@:from private static function fromRenderContext(context:RenderContext):DOMRenderContext
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} #end
|
||||
}
|
||||
#end
|
||||
#end
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package lime.graphics;
|
||||
|
||||
#if (!lime_doc_gen || flash) #if (flash && (lime_doc_gen || !doc_gen)) import flash.display.Sprite;
|
||||
#if (!lime_doc_gen || flash)
|
||||
#if (flash && (lime_doc_gen || !doc_gen))
|
||||
import flash.display.Sprite;
|
||||
|
||||
/**
|
||||
The `FlashRenderContext` represents the primary `flash.display.Sprite` instance when
|
||||
@@ -21,12 +23,15 @@ abstract FlashRenderContext(Sprite) from Sprite to Sprite
|
||||
{
|
||||
return context.flash;
|
||||
}
|
||||
} #else @:forward
|
||||
}
|
||||
#else
|
||||
@:forward
|
||||
abstract FlashRenderContext(Dynamic) from Dynamic to Dynamic
|
||||
{
|
||||
@:from private static function fromRenderContext(context:RenderContext):FlashRenderContext
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} #end
|
||||
}
|
||||
#end
|
||||
#end
|
||||
|
||||
@@ -985,12 +985,12 @@ class Image
|
||||
|
||||
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, function(event)
|
||||
{
|
||||
promise.progress(event.bytesLoaded, event.bytesTotal);
|
||||
promise.progress(Std.int(event.bytesLoaded), Std.int(event.bytesTotal));
|
||||
});
|
||||
|
||||
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function(event)
|
||||
{
|
||||
promise.error(event.error);
|
||||
promise.error(event.errorID);
|
||||
});
|
||||
|
||||
loader.loadBytes(bytes.getData());
|
||||
@@ -1041,12 +1041,12 @@ class Image
|
||||
|
||||
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, function(event)
|
||||
{
|
||||
promise.progress(event.bytesLoaded, event.bytesTotal);
|
||||
promise.progress(Std.int(event.bytesLoaded), Std.int(event.bytesTotal));
|
||||
});
|
||||
|
||||
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function(event)
|
||||
{
|
||||
promise.error(event.error);
|
||||
promise.error(event.errorID);
|
||||
});
|
||||
|
||||
loader.load(new URLRequest(path), new LoaderContext(true));
|
||||
@@ -1743,7 +1743,10 @@ class Image
|
||||
{
|
||||
if (bytes == null || bytes.length < 4) return false;
|
||||
|
||||
return bytes.get(0) == 0xFF && bytes.get(1) == 0xD8 && bytes.get(bytes.length - 2) == 0xFF && bytes.get(bytes.length - 1) == 0xD9;
|
||||
return bytes.get(0) == 0xFF
|
||||
&& bytes.get(1) == 0xD8
|
||||
&& bytes.get(bytes.length - 2) == 0xFF
|
||||
&& bytes.get(bytes.length - 1) == 0xD9;
|
||||
}
|
||||
|
||||
private static function __isPNG(bytes:Bytes):Bool
|
||||
@@ -1805,8 +1808,9 @@ class Image
|
||||
|
||||
@:noCompletion private function get_powerOfTwo():Bool
|
||||
{
|
||||
return ((buffer.width != 0) && ((buffer.width & (~buffer.width + 1)) == buffer.width)) && ((buffer.height != 0) && ((buffer.height & (~buffer.height +
|
||||
1)) == buffer.height));
|
||||
return ((buffer.width != 0)
|
||||
&& ((buffer.width & (~buffer.width + 1)) == buffer.width))
|
||||
&& ((buffer.height != 0) && ((buffer.height & (~buffer.height + 1)) == buffer.height));
|
||||
}
|
||||
|
||||
@:noCompletion private function set_powerOfTwo(value:Bool):Bool
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,6 +1,8 @@
|
||||
package lime.graphics;
|
||||
|
||||
#if (!lime_doc_gen || lime_opengl || lime_opengles) #if (lime_doc_gen || (sys && lime_cffi && !doc_gen)) import haxe.Int64;
|
||||
#if (!lime_doc_gen || lime_opengl || lime_opengles)
|
||||
#if (lime_doc_gen || (sys && lime_cffi && !doc_gen))
|
||||
import haxe.Int64;
|
||||
import haxe.io.Bytes;
|
||||
import lime._internal.backend.native.NativeOpenGLRenderContext;
|
||||
import lime.graphics.opengl.*;
|
||||
@@ -4858,7 +4860,9 @@ public inline function waitSync(sync:GLSync, flags:Int, timeout:Int64):Void
|
||||
{
|
||||
return context.gles3;
|
||||
}
|
||||
} #else import lime.graphics.opengl.GL;
|
||||
}
|
||||
#else
|
||||
import lime.graphics.opengl.GL;
|
||||
|
||||
@:forward()
|
||||
abstract OpenGLES3RenderContext(Dynamic) from Dynamic to Dynamic
|
||||
@@ -4887,5 +4891,6 @@ abstract OpenGLES3RenderContext(Dynamic) from Dynamic to Dynamic
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} #end
|
||||
}
|
||||
#end
|
||||
#end
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package lime.graphics;
|
||||
|
||||
#if (!lime_doc_gen || lime_opengl) #if (lime_doc_gen || (sys && lime_cffi && !doc_gen)) import lime._internal.backend.native.NativeOpenGLRenderContext;
|
||||
#if (!lime_doc_gen || lime_opengl)
|
||||
#if (lime_doc_gen || (sys && lime_cffi && !doc_gen))
|
||||
import lime._internal.backend.native.NativeOpenGLRenderContext;
|
||||
|
||||
/**
|
||||
The `OpenGLRenderContext` allows access to OpenGL features when OpenGL is the render
|
||||
@@ -37,12 +39,15 @@ abstract OpenGLRenderContext(NativeOpenGLRenderContext) from NativeOpenGLRenderC
|
||||
{
|
||||
return context.gl;
|
||||
}
|
||||
} #else @:forward()
|
||||
}
|
||||
#else
|
||||
@:forward()
|
||||
abstract OpenGLRenderContext(Dynamic) from Dynamic to Dynamic
|
||||
{
|
||||
@:from private static function fromRenderContext(context:RenderContext):OpenGLRenderContext
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} #end
|
||||
}
|
||||
#end
|
||||
#end
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -12,6 +12,7 @@ package lime.graphics.opengl.ext;
|
||||
public var PERFMON_RESULT_AMD = 0x8BC6;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// public function getPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
|
||||
// public function getPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
|
||||
// public function getPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
|
||||
|
||||
@@ -9,5 +9,6 @@ package lime.graphics.opengl.ext;
|
||||
public var READ_FRAMEBUFFER_BINDING_ANGLE = 0x8CAA;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
}
|
||||
|
||||
@@ -8,5 +8,6 @@ package lime.graphics.opengl.ext;
|
||||
public var MAX_SAMPLES_ANGLE = 0x8D57;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
}
|
||||
|
||||
@@ -6,5 +6,6 @@ package lime.graphics.opengl.ext;
|
||||
public var TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE = 0x93A0;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ package lime.graphics.opengl.ext;
|
||||
public var READ_FRAMEBUFFER_BINDING_APPLE = 0x8CAA;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
|
||||
// GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ package lime.graphics.opengl.ext;
|
||||
|
||||
// public var TIMEOUT_IGNORED_APPLE = 0xFFFFFFFFFFFFFFFFull;
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);
|
||||
// GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);
|
||||
// GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);
|
||||
|
||||
@@ -11,6 +11,7 @@ package lime.graphics.opengl.ext;
|
||||
public var VERTEX_ARRAY_OBJECT_EXT = 0x9154;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
|
||||
// GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
|
||||
}
|
||||
|
||||
@@ -8,5 +8,6 @@ package lime.graphics.opengl.ext;
|
||||
public var STENCIL_EXT = 0x1802;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ package lime.graphics.opengl.ext;
|
||||
public var MAP_UNSYNCHRONIZED_BIT_EXT = 0x0020;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void* GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
||||
// GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ package lime.graphics.opengl.ext;
|
||||
public var MAX_SAMPLES_EXT = 0x8D57;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
|
||||
// GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ package lime.graphics.opengl.ext;
|
||||
public var MAX_MULTIVIEW_BUFFERS_EXT = 0x90F2;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index);
|
||||
// GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices);
|
||||
// GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data);
|
||||
|
||||
@@ -10,6 +10,7 @@ package lime.graphics.opengl.ext;
|
||||
public var QUERY_RESULT_AVAILABLE_EXT = 0x8867;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);
|
||||
// GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);
|
||||
// GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);
|
||||
|
||||
@@ -12,6 +12,7 @@ package lime.graphics.opengl.ext;
|
||||
public var NO_RESET_NOTIFICATION_EXT = 0x8261;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
|
||||
// GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
|
||||
// GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, float *params);
|
||||
|
||||
@@ -11,6 +11,7 @@ package lime.graphics.opengl.ext;
|
||||
public var PROGRAM_PIPELINE_BINDING_EXT = 0x825A;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);
|
||||
// GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
|
||||
// GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
|
||||
|
||||
@@ -28,6 +28,7 @@ package lime.graphics.opengl.ext;
|
||||
public var RG16F_EXT = 0x822F;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
|
||||
// GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
// GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
|
||||
|
||||
@@ -9,6 +9,7 @@ package lime.graphics.opengl.ext;
|
||||
public var TEXTURE_SAMPLES_IMG = 0x9136;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
|
||||
// GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ package lime.graphics.opengl.ext;
|
||||
public var STACK_UNDERFLOW = 0x0504;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// public function debugMessageControl (source:Int, type:Int, severity:Int, count:Int, ids:Array<Int>, enabled:Bool):Void {}
|
||||
// public function debugMessageInsert (source:Int, type:Int, id:Int, severity:Int, message:String):Void {}
|
||||
// public function debugMessageCallback (callback:Dynamic, userParam:Dynamic):Void;
|
||||
|
||||
@@ -14,6 +14,7 @@ package lime.graphics.opengl.ext;
|
||||
public var COVERAGE_BUFFER_BIT_NV = 0x8000;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
|
||||
// GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
|
||||
}
|
||||
|
||||
@@ -38,5 +38,6 @@ package lime.graphics.opengl.ext;
|
||||
public var COLOR_ATTACHMENT15_NV = 0x8CEF;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ package lime.graphics.opengl.ext;
|
||||
public var FENCE_CONDITION_NV = 0x84F4;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
|
||||
// GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *);
|
||||
// GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint);
|
||||
|
||||
@@ -6,5 +6,6 @@ package lime.graphics.opengl.ext;
|
||||
public var READ_BUFFER_NV = 0x0C02;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);
|
||||
}
|
||||
|
||||
@@ -9,5 +9,6 @@ package lime.graphics.opengl.ext;
|
||||
public var REQUIRED_TEXTURE_IMAGE_UNITS_OES = 0x8D68;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// public function eglImageTargetTexture2DOES (target:Int, image:BytesPointer):Void {}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ package lime.graphics.opengl.ext;
|
||||
public var PROGRAM_BINARY_FORMATS_OES = 0x87FF;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// public function getProgramBinaryOES (program:GLProgram, bufSize:Int, length:Int, binaryFormat:Int, binary:BytesPointer):Void {}
|
||||
// public function programBinaryOES (program:GLProgram, binaryFormat:Int, binary:BytesPointer, length:Int):Void {}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ package lime.graphics.opengl.ext;
|
||||
public var BUFFER_MAP_POINTER_OES = 0x88BD;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// public function mapBufferOES (target:Int, access:Int):Dynamic {}
|
||||
// public function unmapBufferOES (target:Int):Bool {}
|
||||
// public function getBufferPointervOES (target:Int, pname:Int):Dynamic {}
|
||||
|
||||
@@ -11,6 +11,7 @@ package lime.graphics.opengl.ext;
|
||||
public var FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES = 0x8CD4;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// public function texImage3DOES (target:Int, level:Int, internalformat:Int, width:Int, height:Int, depth:Int, border:Int, format:Int, type:Int, pixels:BytesPointer):Void {}
|
||||
// public function texSubImage3DOES (target:Int, level:Int, xoffset:Int, yoffset:Int, zoffset:Int, width:Int, height:Int, depth:Int, format:Int, type:Int, pixels:BytesPointer):Void {}
|
||||
// public function copyTexSubImage3DOES (target:Int, level:Int, xoffset:Int, yoffset:Int, zoffset:Int, x:Int, y:Int, width:Int, height:Int):Void {}
|
||||
|
||||
@@ -21,6 +21,7 @@ package lime.graphics.opengl.ext;
|
||||
}
|
||||
|
||||
public function bindVertexArrayOES(arrayObject:Dynamic /*WebGLVertexArrayObject*/):Void {}
|
||||
|
||||
// public function bindVertexArrayOES (array:Int):Void {}
|
||||
// public function deleteVertexArraysOES (n:Int, arrays:Array<Int>):Void {}
|
||||
// public function genVertexArraysOES (n:Int, arrays:Array<Int>):Void {}
|
||||
|
||||
@@ -8,5 +8,6 @@ package lime.graphics.opengl.ext;
|
||||
public var ALPHA_TEST_REF_QCOM = 0x0BC2;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ package lime.graphics.opengl.ext;
|
||||
public var STATE_RESTORE = 0x8BDC;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
|
||||
// GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
|
||||
// GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
|
||||
|
||||
@@ -37,6 +37,7 @@ package lime.graphics.opengl.ext;
|
||||
public var MULTISAMPLE_BUFFER_BIT7_QCOM = 0x80000000;
|
||||
|
||||
@:noCompletion private function new() {}
|
||||
|
||||
// GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
|
||||
// GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
|
||||
}
|
||||
|
||||
@@ -893,10 +893,12 @@ abstract Matrix4(Float32Array) from Float32Array to Float32Array
|
||||
// Getters & Setters
|
||||
@:noCompletion private function get_determinant():Float
|
||||
{
|
||||
return
|
||||
1 * ((this[0] * this[5] - this[4] * this[1]) * (this[10] * this[15] - this[14] * this[11]) - (this[0] * this[9] - this[8] * this[1]) * (this[6] * this[15] - this[14] * this[7]) +
|
||||
(this[0] * this[13] - this[12] * this[1]) * (this[6] * this[11] - this[10] * this[7]) + (this[4] * this[9] - this[8] * this[5]) * (this[2] * this[15] - this[14] * this[3]) - (this[4] * this[13] - this[12] * this[5]) * (this[2] * this[11] - this[10] * this[3]) +
|
||||
(this[8] * this[13] - this[12] * this[9]) * (this[2] * this[7] - this[6] * this[3]));
|
||||
return 1 * ((this[0] * this[5] - this[4] * this[1]) * (this[10] * this[15] - this[14] * this[11])
|
||||
- (this[0] * this[9] - this[8] * this[1]) * (this[6] * this[15] - this[14] * this[7])
|
||||
+ (this[0] * this[13] - this[12] * this[1]) * (this[6] * this[11] - this[10] * this[7])
|
||||
+ (this[4] * this[9] - this[8] * this[5]) * (this[2] * this[15] - this[14] * this[3])
|
||||
- (this[4] * this[13] - this[12] * this[5]) * (this[2] * this[11] - this[10] * this[3])
|
||||
+ (this[8] * this[13] - this[12] * this[9]) * (this[2] * this[7] - this[6] * this[3]));
|
||||
}
|
||||
|
||||
@:noCompletion private function get_position():Vector4
|
||||
|
||||
@@ -247,7 +247,7 @@ class AudioBuffer
|
||||
|
||||
audioBuffer.__srcSound.addEventListener(flash.events.ProgressEvent.PROGRESS, function(event)
|
||||
{
|
||||
promise.progress(event.bytesLoaded, event.bytesTotal);
|
||||
promise.progress(Std.int(event.bytesLoaded), Std.int(event.bytesTotal));
|
||||
});
|
||||
|
||||
audioBuffer.__srcSound.addEventListener(flash.events.IOErrorEvent.IO_ERROR, promise.error);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package lime.media;
|
||||
|
||||
#if (!lime_doc_gen || (js && html5)) #if (!lime_doc_gen && (!js || !html5 || display)) class WebAudioContext
|
||||
#if (!lime_doc_gen || (js && html5))
|
||||
#if (!lime_doc_gen && (!js || !html5 || display))
|
||||
class WebAudioContext
|
||||
{
|
||||
public var activeSourceCount(default, null):Int;
|
||||
public var currentTime(default, null):Float;
|
||||
@@ -101,6 +103,8 @@ package lime.media;
|
||||
/*AudioBufferCallback*/):Void {}
|
||||
|
||||
public function startRendering():Void {}
|
||||
} #else typedef WebAudioContext = js.html.audio.AudioContext;
|
||||
}
|
||||
#else
|
||||
typedef WebAudioContext = js.html.audio.AudioContext;
|
||||
#end
|
||||
#end
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package lime.media.howlerjs;
|
||||
|
||||
#if (!lime_doc_gen || lime_howlerjs) #if (!lime_howlerjs || display) import haxe.Constraints.Function;
|
||||
#if (!lime_doc_gen || lime_howlerjs)
|
||||
#if (!lime_howlerjs || display)
|
||||
import haxe.Constraints.Function;
|
||||
class Howl
|
||||
{
|
||||
public function new(options:HowlOptions) {}
|
||||
@@ -214,7 +216,9 @@ class Howl
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} #else import haxe.Constraints.Function;
|
||||
}
|
||||
#else
|
||||
import haxe.Constraints.Function;
|
||||
import haxe.extern.EitherType;
|
||||
|
||||
#if commonjs
|
||||
@@ -263,7 +267,8 @@ extern class Howl
|
||||
@:overload(function(x:Float, y:Float, z:Float):Howl {})
|
||||
@:overload(function(x:Float, y:Float, z:Float, id:Int):Howl {})
|
||||
public function pos():Array<Float>;
|
||||
} #end
|
||||
}
|
||||
#end
|
||||
|
||||
typedef HowlOptions =
|
||||
{
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package lime.media.howlerjs;
|
||||
|
||||
#if (!lime_doc_gen || lime_howlerjs) #if (!lime_howlerjs || display) class Howler
|
||||
#if (!lime_doc_gen || lime_howlerjs)
|
||||
#if (!lime_howlerjs || display)
|
||||
class Howler
|
||||
{
|
||||
public static var autoSuspend:Bool;
|
||||
public static var ctx:WebAudioContext;
|
||||
@@ -47,7 +49,9 @@ package lime.media.howlerjs;
|
||||
if (vol != null) return Howler;
|
||||
return vol;
|
||||
}
|
||||
} #else import haxe.extern.EitherType;
|
||||
}
|
||||
#else
|
||||
import haxe.extern.EitherType;
|
||||
import js.html.audio.GainNode;
|
||||
import lime.media.WebAudioContext;
|
||||
|
||||
@@ -68,5 +72,6 @@ extern class Howler
|
||||
public static function mute(muted:Bool):Howler;
|
||||
public static function unload():Howler;
|
||||
public static function volume(?vol:Float):EitherType<Int, Howler>;
|
||||
} #end
|
||||
}
|
||||
#end
|
||||
#end
|
||||
|
||||
@@ -204,8 +204,8 @@ class AIRHelper
|
||||
if (targetPlatform == ANDROID)
|
||||
{
|
||||
AndroidHelper.initialize(project);
|
||||
AndroidHelper.install(project,
|
||||
FileSystem.fullPath(workingDirectory) + "/" + (rootDirectory != null ? rootDirectory + "/" : "") + project.app.file + ".apk");
|
||||
AndroidHelper.install(project, FileSystem.fullPath(workingDirectory) + "/" + (rootDirectory != null ? rootDirectory + "/" : "")
|
||||
+ project.app.file + ".apk");
|
||||
AndroidHelper.run(project.meta.packageName + "/.AppEntry");
|
||||
}
|
||||
else if (targetPlatform == IOS)
|
||||
@@ -224,10 +224,12 @@ class AIRHelper
|
||||
|
||||
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", ["-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);
|
||||
|
||||
|
||||
@@ -263,8 +263,9 @@ class AssetHelper
|
||||
}
|
||||
else
|
||||
{
|
||||
if (project.target == EMSCRIPTEN && (asset.embed != false || (asset.library != null && libraries.exists(asset.library)
|
||||
&& libraries[asset.library].preload)))
|
||||
if (project.target == EMSCRIPTEN
|
||||
&& (asset.embed != false
|
||||
|| (asset.library != null && libraries.exists(asset.library) && libraries[asset.library].preload)))
|
||||
{
|
||||
assetData.preload = true;
|
||||
}
|
||||
@@ -535,8 +536,10 @@ class AssetHelper
|
||||
|
||||
for (library in project.libraries)
|
||||
{
|
||||
if (library.type == null || (project.target == FLASH && library.embed != false && ["pak", "pack", "gzip", "zip", "deflate"].indexOf(library
|
||||
.type) > -1))
|
||||
if (library.type == null
|
||||
|| (project.target == FLASH
|
||||
&& library.embed != false
|
||||
&& ["pak", "pack", "gzip", "zip", "deflate"].indexOf(library.type) > -1))
|
||||
{
|
||||
if (library.name == DEFAULT_LIBRARY_NAME)
|
||||
{
|
||||
|
||||
@@ -128,7 +128,8 @@ class CPPHelper
|
||||
public static function rebuild(project:HXProject, commands:Array<Array<String>>, path:String = null, buildFile:String = null):Void
|
||||
{
|
||||
var buildRelease = (!project.targetFlags.exists("debug"));
|
||||
var buildDebug = (project.targetFlags.exists("debug") || (!project.targetFlags.exists("rebuild")
|
||||
var buildDebug = (project.targetFlags.exists("debug")
|
||||
|| (!project.targetFlags.exists("rebuild")
|
||||
&& !project.targetFlags.exists("release")
|
||||
&& !project.targetFlags.exists("final")
|
||||
&& project.config.exists("project.rebuild.fulldebug")));
|
||||
|
||||
@@ -159,7 +159,8 @@ class CSHelper
|
||||
|
||||
for (lib in libraries)
|
||||
{
|
||||
file.writeString(FileSystem.absolutePath(libPath + "/" + archName + "/" + "lib" + lib.name + ".so").replace("/", "\\") + '\n');
|
||||
file.writeString(FileSystem.absolutePath(libPath + "/" + archName + "/" + "lib" + lib.name + ".so").replace("/", "\\")
|
||||
+ '\n');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -102,8 +102,8 @@ class FlashHelper
|
||||
}
|
||||
else if (frameSamplingFrequency != samplingFrequency)
|
||||
{
|
||||
Sys
|
||||
.println("Warning: Could not embed \"" + name + "\" (Flash does not support MP3 audio with variable sampling frequencies), embedding as binary");
|
||||
Sys.println("Warning: Could not embed \"" + name
|
||||
+ "\" (Flash does not support MP3 audio with variable sampling frequencies), embedding as binary");
|
||||
inAsset.type = BINARY;
|
||||
return embedAsset(inAsset, packageName, outTags);
|
||||
}
|
||||
@@ -114,8 +114,8 @@ class FlashHelper
|
||||
}
|
||||
else if (frameIsStereo != isStereo)
|
||||
{
|
||||
Sys
|
||||
.println("Warning: Could not embed \"" + name + "\" (Flash does not support MP3 audio with mixed mono and stero frames), embedding as binary");
|
||||
Sys.println("Warning: Could not embed \"" + name
|
||||
+ "\" (Flash does not support MP3 audio with mixed mono and stero frames), embedding as binary");
|
||||
inAsset.type = BINARY;
|
||||
return embedAsset(inAsset, packageName, outTags);
|
||||
}
|
||||
@@ -135,7 +135,9 @@ class FlashHelper
|
||||
|
||||
if (totalLengthSamples == 0)
|
||||
{
|
||||
Sys.println("Warning: Could not embed \"" + name + "\" (Could not find any valid MP3 audio data), embedding as binary");
|
||||
Sys.println("Warning: Could not embed \""
|
||||
+ name
|
||||
+ "\" (Could not find any valid MP3 audio data), embedding as binary");
|
||||
inAsset.type = BINARY;
|
||||
return embedAsset(inAsset, packageName, outTags);
|
||||
}
|
||||
@@ -150,8 +152,11 @@ class FlashHelper
|
||||
|
||||
if (flashSamplingFrequency == null)
|
||||
{
|
||||
Sys
|
||||
.println("Warning: Could not embed \"" + name + "\" (Flash supports 11025, 22050 and 44100kHz MP3 files, but file is " + samplingFrequency + "kHz), embedding as binary");
|
||||
Sys.println("Warning: Could not embed \""
|
||||
+ name
|
||||
+ "\" (Flash supports 11025, 22050 and 44100kHz MP3 files, but file is "
|
||||
+ samplingFrequency
|
||||
+ "kHz), embedding as binary");
|
||||
inAsset.type = BINARY;
|
||||
return embedAsset(inAsset, packageName, outTags);
|
||||
}
|
||||
@@ -198,7 +203,9 @@ class FlashHelper
|
||||
|
||||
if (hdr.format != WF_PCM)
|
||||
{
|
||||
Sys.println("Warning: Could not embed \"" + name + "\" (Only PCM uncompressed WAV files are currently supported), embedding as binary");
|
||||
Sys.println("Warning: Could not embed \""
|
||||
+ name
|
||||
+ "\" (Only PCM uncompressed WAV files are currently supported), embedding as binary");
|
||||
inAsset.type = BINARY;
|
||||
return embedAsset(inAsset, packageName, outTags);
|
||||
}
|
||||
@@ -215,8 +222,11 @@ class FlashHelper
|
||||
|
||||
if (flashRate == null)
|
||||
{
|
||||
Sys.println("Warning: Could not embed \"" + name + "\" (Flash supports 5512, 11025, 22050 and 44100kHz WAV files, but file is " + hdr
|
||||
.samplingRate + "kHz), embedding as binary");
|
||||
Sys.println("Warning: Could not embed \""
|
||||
+ name
|
||||
+ "\" (Flash supports 5512, 11025, 22050 and 44100kHz WAV files, but file is "
|
||||
+ hdr.samplingRate
|
||||
+ "kHz), embedding as binary");
|
||||
inAsset.type = BINARY;
|
||||
return embedAsset(inAsset, packageName, outTags);
|
||||
}
|
||||
@@ -321,7 +331,9 @@ class FlashHelper
|
||||
{
|
||||
if (native_glyph.char_code > 65535)
|
||||
{
|
||||
Sys.println("Warning: glyph with character code greater than 65535 encountered (" + native_glyph.char_code + "). Skipping...");
|
||||
Sys.println("Warning: glyph with character code greater than 65535 encountered ("
|
||||
+ native_glyph.char_code
|
||||
+ "). Skipping...");
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -849,8 +861,8 @@ class FlashHelper
|
||||
|
||||
if (asset.type == IMAGE)
|
||||
{
|
||||
embed += "@:keep " + tagName + "('" + sourcePath + "') class __ASSET__" + asset.flatName + " extends " + flashClass +
|
||||
" { public function new () { super (0, 0, true, 0); } }\n";
|
||||
embed += "@:keep " + tagName + "('" + sourcePath + "') class __ASSET__" + asset.flatName + " extends " + flashClass
|
||||
+ " { public function new () { super (0, 0, true, 0); } }\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -34,9 +34,18 @@ class GUID
|
||||
{
|
||||
var specialChars = ['8', '9', 'A', 'B'];
|
||||
|
||||
return "{" + GUID.createRandomIdentifier(8, 15, seeded) + '-' + GUID.createRandomIdentifier(4, 15, seeded) + '-4' + GUID
|
||||
.createRandomIdentifier(3, 15, seeded) + '-' + specialChars[GUID.randomIntegerWithinRange(0, 3, seeded)] + GUID.createRandomIdentifier(3, 15, seeded) +
|
||||
'-' + GUID.createRandomIdentifier(12, 15, seeded) + "}";
|
||||
return "{"
|
||||
+ GUID.createRandomIdentifier(8, 15, seeded)
|
||||
+ '-'
|
||||
+ GUID.createRandomIdentifier(4, 15, seeded)
|
||||
+ '-4'
|
||||
+ GUID.createRandomIdentifier(3, 15, seeded)
|
||||
+ '-'
|
||||
+ specialChars[GUID.randomIntegerWithinRange(0, 3, seeded)]
|
||||
+ GUID.createRandomIdentifier(3, 15, seeded)
|
||||
+ '-'
|
||||
+ GUID.createRandomIdentifier(12, 15, seeded)
|
||||
+ "}";
|
||||
}
|
||||
|
||||
private static var seed:Int = 0;
|
||||
|
||||
@@ -1264,9 +1264,7 @@ class HXProject extends Script
|
||||
{
|
||||
var path = Path.standardize(arg);
|
||||
|
||||
if (path != null
|
||||
&& StringTools.trim(path) != ""
|
||||
&& !StringTools.startsWith(StringTools.trim(path), "#"))
|
||||
if (path != null && StringTools.trim(path) != "" && !StringTools.startsWith(StringTools.trim(path), "#"))
|
||||
{
|
||||
var param = "-cp " + path;
|
||||
compilerFlags.remove(param);
|
||||
|
||||
@@ -686,8 +686,9 @@ class Generator
|
||||
for (s in statics)
|
||||
println(getPath(s.c) + field(s.f.name) + ' = ' + api.generateValue(s.f.expr()));
|
||||
if (api.main != null) println(api.generateValue(api.main));
|
||||
if (jsModern)
|
||||
print('})(' + (genExpose ? 'typeof exports != "undefined" ? exports : typeof window != "undefined" ? window : typeof self != "undefined" ? self : this, ' : '') + 'typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this);\n');
|
||||
if (jsModern) print('})('
|
||||
+ (genExpose ? 'typeof exports != "undefined" ? exports : typeof window != "undefined" ? window : typeof self != "undefined" ? self : this, ' : '')
|
||||
+ 'typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this);\n');
|
||||
sys.io.File.saveContent(api.outputFile, buf.toString());
|
||||
}
|
||||
|
||||
|
||||
@@ -65,16 +65,16 @@ class PlatformTarget
|
||||
}
|
||||
|
||||
// if (!Reflect.hasField (metaFields.clean, "ignore") && (command == "clean" || targetFlags.exists ("clean"))) {
|
||||
if ((!Reflect.hasField(metaFields, "clean") || !Reflect.hasField(metaFields.clean, "ignore")) && (command == "clean" || (project.targetFlags
|
||||
.exists("clean") && (command == "update"
|
||||
|| command == "build" || command == "test"))))
|
||||
if ((!Reflect.hasField(metaFields, "clean") || !Reflect.hasField(metaFields.clean, "ignore"))
|
||||
&& (command == "clean"
|
||||
|| (project.targetFlags.exists("clean") && (command == "update" || command == "build" || command == "test"))))
|
||||
{
|
||||
Log.info("", Log.accentColor + "Running command: CLEAN" + Log.resetColor);
|
||||
clean();
|
||||
}
|
||||
|
||||
if ((!Reflect.hasField(metaFields, "rebuild") || !Reflect.hasField(metaFields.rebuild, "ignore")) && (command == "rebuild" || project.targetFlags
|
||||
.exists("rebuild")))
|
||||
if ((!Reflect.hasField(metaFields, "rebuild") || !Reflect.hasField(metaFields.rebuild, "ignore"))
|
||||
&& (command == "rebuild" || project.targetFlags.exists("rebuild")))
|
||||
{
|
||||
Log.info("", "\n" + Log.accentColor + "Running command: REBUILD" + Log.resetColor);
|
||||
|
||||
@@ -88,8 +88,8 @@ class PlatformTarget
|
||||
rebuild();
|
||||
}
|
||||
|
||||
if ((!Reflect.hasField(metaFields, "update") || !Reflect.hasField(metaFields.update, "ignore")) && (command == "update" || command == "build"
|
||||
|| command == "test"))
|
||||
if ((!Reflect.hasField(metaFields, "update") || !Reflect.hasField(metaFields.update, "ignore"))
|
||||
&& (command == "update" || command == "build" || command == "test"))
|
||||
{
|
||||
Log.info("", "\n" + Log.accentColor + "Running command: UPDATE" + Log.resetColor);
|
||||
// #if lime
|
||||
@@ -98,7 +98,8 @@ class PlatformTarget
|
||||
update();
|
||||
}
|
||||
|
||||
if ((!Reflect.hasField(metaFields, "build") || !Reflect.hasField(metaFields.build, "ignore")) && (command == "build" || command == "test"))
|
||||
if ((!Reflect.hasField(metaFields, "build") || !Reflect.hasField(metaFields.build, "ignore"))
|
||||
&& (command == "build" || command == "test"))
|
||||
{
|
||||
CommandHelper.executeCommands(project.preBuildCallbacks);
|
||||
|
||||
@@ -114,22 +115,22 @@ class PlatformTarget
|
||||
deploy();
|
||||
}
|
||||
|
||||
if ((!Reflect.hasField(metaFields, "install") || !Reflect.hasField(metaFields.install, "ignore")) && (command == "install" || command == "run"
|
||||
|| command == "test"))
|
||||
if ((!Reflect.hasField(metaFields, "install") || !Reflect.hasField(metaFields.install, "ignore"))
|
||||
&& (command == "install" || command == "run" || command == "test"))
|
||||
{
|
||||
Log.info("", "\n" + Log.accentColor + "Running command: INSTALL" + Log.resetColor);
|
||||
install();
|
||||
}
|
||||
|
||||
if ((!Reflect.hasField(metaFields, "run") || !Reflect.hasField(metaFields.run, "ignore")) && (command == "run" || command == "rerun"
|
||||
|| command == "test"))
|
||||
if ((!Reflect.hasField(metaFields, "run") || !Reflect.hasField(metaFields.run, "ignore"))
|
||||
&& (command == "run" || command == "rerun" || command == "test"))
|
||||
{
|
||||
Log.info("", "\n" + Log.accentColor + "Running command: RUN" + Log.resetColor);
|
||||
run();
|
||||
}
|
||||
|
||||
if ((!Reflect.hasField(metaFields, "trace") || !Reflect.hasField(metaFields.trace, "ignore")) && (command == "test" || command == "trace"
|
||||
|| command == "run" || command == "rerun"))
|
||||
if ((!Reflect.hasField(metaFields, "trace") || !Reflect.hasField(metaFields.trace, "ignore"))
|
||||
&& (command == "test" || command == "trace" || command == "run" || command == "rerun"))
|
||||
{
|
||||
if (traceEnabled || command == "trace")
|
||||
{
|
||||
|
||||
@@ -36,8 +36,8 @@ class PlatformTargetMain
|
||||
|
||||
lastArgument = new Path(lastArgument).toString();
|
||||
|
||||
if (((StringTools.endsWith(lastArgument, "/") && lastArgument != "/") || StringTools.endsWith(lastArgument, "\\")) && !StringTools
|
||||
.endsWith(lastArgument, ":\\"))
|
||||
if (((StringTools.endsWith(lastArgument, "/") && lastArgument != "/") || StringTools.endsWith(lastArgument, "\\"))
|
||||
&& !StringTools.endsWith(lastArgument, ":\\"))
|
||||
{
|
||||
lastArgument = lastArgument.substr(0, lastArgument.length - 1);
|
||||
}
|
||||
|
||||
@@ -173,13 +173,15 @@ class ProjectHelper
|
||||
return Std.string(Reflect.field(field, subField));
|
||||
}
|
||||
}
|
||||
} #if sys
|
||||
}
|
||||
#if sys
|
||||
else if (substring == "projectDirectory")
|
||||
{
|
||||
// TODO: Better handling if CWD has changed?
|
||||
|
||||
return Std.string(Sys.getCwd());
|
||||
} #end
|
||||
}
|
||||
#end
|
||||
}
|
||||
|
||||
return string;
|
||||
|
||||
@@ -1971,8 +1971,11 @@ class ProjectXMLParser extends HXProject
|
||||
|
||||
while (doubleVarMatch.match(newString))
|
||||
{
|
||||
newString = doubleVarMatch.matchedLeft() + "${" + ProjectHelper.replaceVariable(this, doubleVarMatch.matched(1)) + "}" + doubleVarMatch
|
||||
.matchedRight();
|
||||
newString = doubleVarMatch.matchedLeft()
|
||||
+ "${"
|
||||
+ ProjectHelper.replaceVariable(this, doubleVarMatch.matched(1))
|
||||
+ "}"
|
||||
+ doubleVarMatch.matchedRight();
|
||||
}
|
||||
|
||||
while (varMatch.match(newString))
|
||||
|
||||
@@ -68,9 +68,7 @@ class TizenHelper
|
||||
{
|
||||
if (cacheID != project.meta.packageName)
|
||||
{
|
||||
if (project.meta.packageName != null
|
||||
|| project.meta.packageName.length == 10
|
||||
|| project.meta.packageName.indexOf(".") == -1)
|
||||
if (project.meta.packageName != null || project.meta.packageName.length == 10 || project.meta.packageName.indexOf(".") == -1)
|
||||
{
|
||||
var bytes = Bytes.ofString(project.meta.packageName);
|
||||
var crc = Crc32.make(bytes);
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package lime.utils;
|
||||
|
||||
#if (js && !doc_gen) typedef ArrayBuffer = js.html.ArrayBuffer;
|
||||
#else import haxe.io.Bytes;
|
||||
#if (js && !doc_gen)
|
||||
typedef ArrayBuffer = js.html.ArrayBuffer;
|
||||
#else
|
||||
import haxe.io.Bytes;
|
||||
|
||||
@:forward
|
||||
abstract ArrayBuffer(Bytes) from Bytes to Bytes
|
||||
@@ -12,4 +14,5 @@ abstract ArrayBuffer(Bytes) from Bytes to Bytes
|
||||
{
|
||||
this = Bytes.alloc(byteLength);
|
||||
}
|
||||
} #end // !js
|
||||
}
|
||||
#end // !js
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package lime.utils;
|
||||
|
||||
#if (js && !doc_gen) typedef ArrayBufferView = js.html.ArrayBufferView;
|
||||
#if (js && !doc_gen)
|
||||
typedef ArrayBufferView = js.html.ArrayBufferView;
|
||||
#else #if !lime_debug @:fileXml('tags="haxe,release"')
|
||||
@:noDebug #end
|
||||
class ArrayBufferView
|
||||
@@ -414,7 +415,8 @@ abstract TypedArrayType(Int) from Int to Int
|
||||
var Float64 = 9;
|
||||
}
|
||||
|
||||
#if (!js || doc_gen) @:noCompletion @:dox(hide) class ArrayBufferIO
|
||||
#if (!js || doc_gen)
|
||||
@:noCompletion @:dox(hide) class ArrayBufferIO
|
||||
{
|
||||
// 8
|
||||
#if !no_typedarray_inline
|
||||
@@ -845,5 +847,6 @@ abstract TypedArrayType(Int) from Int to Int
|
||||
_out = _out > 255 ? 255 : _out;
|
||||
return _out < 0 ? 0 : _out;
|
||||
} // _clamp
|
||||
} #else // #error "ArrayBufferIO is not used on js target, use DataView instead"
|
||||
}
|
||||
#else // #error "ArrayBufferIO is not used on js target, use DataView instead"
|
||||
#end // !js
|
||||
|
||||
@@ -56,7 +56,8 @@ class AssetLibrary
|
||||
|
||||
if (assetType != null)
|
||||
{
|
||||
if (assetType == requestedType || ((requestedType == SOUND || requestedType == MUSIC) && (assetType == MUSIC || assetType == SOUND)))
|
||||
if (assetType == requestedType
|
||||
|| ((requestedType == SOUND || requestedType == MUSIC) && (assetType == MUSIC || assetType == SOUND)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package lime.utils;
|
||||
|
||||
import lime.utils.ArrayBufferView;
|
||||
#if (js && !doc_gen) @:forward
|
||||
#if (js && !doc_gen)
|
||||
@:forward
|
||||
abstract DataView(js.html.DataView) from js.html.DataView to js.html.DataView
|
||||
{
|
||||
public inline function new(buffer:ArrayBuffer, byteOffset:Null<Int> = null, byteLength:Null<Int> = null)
|
||||
@@ -139,7 +140,9 @@ abstract DataView(js.html.DataView) from js.html.DataView to js.html.DataView
|
||||
{
|
||||
this.setFloat64(byteOffset, value, littleEndian);
|
||||
}
|
||||
} #else import lime.utils.ArrayBuffer;
|
||||
}
|
||||
#else
|
||||
import lime.utils.ArrayBuffer;
|
||||
|
||||
#if !lime_debug
|
||||
@:fileXml('tags="haxe,release"')
|
||||
@@ -310,4 +313,5 @@ class DataView
|
||||
{
|
||||
littleEndian ? ArrayBufferIO.setFloat64(buffer, byteOffset, value) : ArrayBufferIO.setFloat64_BE(buffer, byteOffset, value);
|
||||
}
|
||||
} #end // !js
|
||||
}
|
||||
#end // !js
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package lime.utils;
|
||||
|
||||
#if (js && !doc_gen) @:forward
|
||||
#if (js && !doc_gen)
|
||||
@:forward
|
||||
@:arrayAccess
|
||||
abstract Float32Array(js.html.Float32Array) from js.html.Float32Array to js.html.Float32Array
|
||||
{
|
||||
@@ -67,7 +68,9 @@ abstract Float32Array(js.html.Float32Array) from js.html.Float32Array to js.html
|
||||
|
||||
inline function toString()
|
||||
return this != null ? 'Float32Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
|
||||
} #else import lime.utils.ArrayBuffer;
|
||||
}
|
||||
#else
|
||||
import lime.utils.ArrayBuffer;
|
||||
import lime.utils.ArrayBufferView;
|
||||
|
||||
@:forward
|
||||
@@ -144,4 +147,5 @@ abstract Float32Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView
|
||||
ArrayBufferIO.setFloat32(this.buffer, this.byteOffset + (idx * BYTES_PER_ELEMENT), val);
|
||||
return val;
|
||||
}
|
||||
} #end // !js
|
||||
}
|
||||
#end // !js
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package lime.utils;
|
||||
|
||||
#if (js && !doc_gen) @:forward
|
||||
#if (js && !doc_gen)
|
||||
@:forward
|
||||
abstract Float64Array(js.html.Float64Array) from js.html.Float64Array to js.html.Float64Array
|
||||
{
|
||||
public inline static var BYTES_PER_ELEMENT:Int = 8;
|
||||
@@ -66,7 +67,9 @@ abstract Float64Array(js.html.Float64Array) from js.html.Float64Array to js.html
|
||||
|
||||
function toString()
|
||||
return this != null ? 'Float64Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
|
||||
} #else import lime.utils.ArrayBufferView;
|
||||
}
|
||||
#else
|
||||
import lime.utils.ArrayBufferView;
|
||||
|
||||
@:forward
|
||||
abstract Float64Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView
|
||||
@@ -141,4 +144,5 @@ abstract Float64Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView
|
||||
|
||||
inline function toString()
|
||||
return this != null ? 'Float64Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
|
||||
} #end // !js
|
||||
}
|
||||
#end // !js
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package lime.utils;
|
||||
|
||||
#if (js && !doc_gen) @:forward
|
||||
#if (js && !doc_gen)
|
||||
@:forward
|
||||
abstract Int16Array(js.html.Int16Array) from js.html.Int16Array to js.html.Int16Array
|
||||
{
|
||||
public inline static var BYTES_PER_ELEMENT:Int = 2;
|
||||
@@ -66,7 +67,9 @@ abstract Int16Array(js.html.Int16Array) from js.html.Int16Array to js.html.Int16
|
||||
|
||||
inline function toString()
|
||||
return this != null ? 'Int16Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
|
||||
} #else import lime.utils.ArrayBufferView;
|
||||
}
|
||||
#else
|
||||
import lime.utils.ArrayBufferView;
|
||||
|
||||
@:forward
|
||||
abstract Int16Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView
|
||||
@@ -141,4 +144,5 @@ abstract Int16Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView
|
||||
|
||||
inline function toString()
|
||||
return this != null ? 'Int16Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
|
||||
} #end // !js
|
||||
}
|
||||
#end // !js
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package lime.utils;
|
||||
|
||||
#if (js && !doc_gen) @:forward
|
||||
#if (js && !doc_gen)
|
||||
@:forward
|
||||
abstract Int32Array(js.html.Int32Array) from js.html.Int32Array to js.html.Int32Array
|
||||
{
|
||||
public inline static var BYTES_PER_ELEMENT:Int = 4;
|
||||
@@ -66,7 +67,9 @@ abstract Int32Array(js.html.Int32Array) from js.html.Int32Array to js.html.Int32
|
||||
|
||||
inline function toString()
|
||||
return this != null ? 'Int32Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
|
||||
} #else import lime.utils.ArrayBufferView;
|
||||
}
|
||||
#else
|
||||
import lime.utils.ArrayBufferView;
|
||||
|
||||
@:forward
|
||||
abstract Int32Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView
|
||||
@@ -141,4 +144,5 @@ abstract Int32Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView
|
||||
|
||||
inline function toString()
|
||||
return this != null ? 'Int32Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
|
||||
} #end // !js
|
||||
}
|
||||
#end // !js
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package lime.utils;
|
||||
|
||||
#if (js && !doc_gen) @:forward
|
||||
#if (js && !doc_gen)
|
||||
@:forward
|
||||
abstract Int8Array(js.html.Int8Array) from js.html.Int8Array to js.html.Int8Array
|
||||
{
|
||||
public inline static var BYTES_PER_ELEMENT:Int = 1;
|
||||
@@ -64,7 +65,9 @@ abstract Int8Array(js.html.Int8Array) from js.html.Int8Array to js.html.Int8Arra
|
||||
|
||||
inline function toString()
|
||||
return this != null ? 'Int8Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
|
||||
} #else import lime.utils.ArrayBufferView;
|
||||
}
|
||||
#else
|
||||
import lime.utils.ArrayBufferView;
|
||||
|
||||
@:forward
|
||||
abstract Int8Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView
|
||||
@@ -141,4 +144,5 @@ abstract Int8Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView
|
||||
|
||||
inline function toString()
|
||||
return this != null ? 'Int8Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
|
||||
} #end // !js
|
||||
}
|
||||
#end // !js
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package lime.utils;
|
||||
|
||||
#if (js && !doc_gen) @:forward
|
||||
#if (js && !doc_gen)
|
||||
@:forward
|
||||
abstract UInt16Array(js.html.Uint16Array) from js.html.Uint16Array to js.html.Uint16Array
|
||||
{
|
||||
public inline static var BYTES_PER_ELEMENT:Int = 2;
|
||||
@@ -66,7 +67,9 @@ abstract UInt16Array(js.html.Uint16Array) from js.html.Uint16Array to js.html.Ui
|
||||
|
||||
inline function toString()
|
||||
return this != null ? 'UInt16Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
|
||||
} #else import lime.utils.ArrayBufferView;
|
||||
}
|
||||
#else
|
||||
import lime.utils.ArrayBufferView;
|
||||
|
||||
@:forward
|
||||
abstract UInt16Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView
|
||||
@@ -141,4 +144,5 @@ abstract UInt16Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView
|
||||
|
||||
inline function toString()
|
||||
return this != null ? 'UInt16Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
|
||||
} #end // !js
|
||||
}
|
||||
#end // !js
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package lime.utils;
|
||||
|
||||
#if (js && !doc_gen) @:forward
|
||||
#if (js && !doc_gen)
|
||||
@:forward
|
||||
abstract UInt32Array(js.html.Uint32Array) from js.html.Uint32Array to js.html.Uint32Array
|
||||
{
|
||||
public inline static var BYTES_PER_ELEMENT:Int = 4;
|
||||
@@ -66,7 +67,9 @@ abstract UInt32Array(js.html.Uint32Array) from js.html.Uint32Array to js.html.Ui
|
||||
|
||||
inline function toString()
|
||||
return this != null ? 'UInt32Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
|
||||
} #else import lime.utils.ArrayBufferView;
|
||||
}
|
||||
#else
|
||||
import lime.utils.ArrayBufferView;
|
||||
|
||||
@:forward
|
||||
abstract UInt32Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView
|
||||
@@ -141,4 +144,5 @@ abstract UInt32Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView
|
||||
|
||||
inline function toString()
|
||||
return this != null ? 'UInt32Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
|
||||
} #end // !js
|
||||
}
|
||||
#end // !js
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package lime.utils;
|
||||
|
||||
#if (js && !doc_gen) @:forward
|
||||
#if (js && !doc_gen)
|
||||
@:forward
|
||||
abstract UInt8Array(js.html.Uint8Array) from js.html.Uint8Array to js.html.Uint8Array
|
||||
{
|
||||
public inline static var BYTES_PER_ELEMENT:Int = 1;
|
||||
@@ -66,7 +67,9 @@ abstract UInt8Array(js.html.Uint8Array) from js.html.Uint8Array to js.html.Uint8
|
||||
|
||||
inline function toString()
|
||||
return this != null ? 'UInt8Array [byteLength:${this.byteLength}, length:${this.length}]' : null;
|
||||
} #else import lime.utils.ArrayBufferView;
|
||||
}
|
||||
#else
|
||||
import lime.utils.ArrayBufferView;
|
||||
|
||||
@:forward
|
||||
abstract UInt8Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView
|
||||
@@ -141,4 +144,5 @@ abstract UInt8Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView
|
||||
ArrayBufferIO.setUint8(this.buffer, this.byteOffset + idx, val);
|
||||
return val;
|
||||
}
|
||||
} #end // !js
|
||||
}
|
||||
#end // !js
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package lime.utils;
|
||||
|
||||
#if (js && !doc_gen) @:forward
|
||||
#if (js && !doc_gen)
|
||||
@:forward
|
||||
abstract UInt8ClampedArray(js.html.Uint8ClampedArray) from js.html.Uint8ClampedArray to js.html.Uint8ClampedArray
|
||||
{
|
||||
public inline static var BYTES_PER_ELEMENT:Int = 1;
|
||||
@@ -75,7 +76,9 @@ abstract UInt8ClampedArray(js.html.Uint8ClampedArray) from js.html.Uint8ClampedA
|
||||
_out = _out > 255 ? 255 : _out;
|
||||
return _out < 0 ? 0 : _out;
|
||||
} // _clamp
|
||||
} #else import lime.utils.ArrayBufferView;
|
||||
}
|
||||
#else
|
||||
import lime.utils.ArrayBufferView;
|
||||
|
||||
@:forward
|
||||
@:arrayAccess
|
||||
@@ -151,4 +154,5 @@ abstract UInt8ClampedArray(ArrayBufferView) from ArrayBufferView to ArrayBufferV
|
||||
|
||||
inline function toString()
|
||||
return this != null ? 'UInt8ClampedArray [byteLength:${this.byteLength}, length:${this.length}]' : null;
|
||||
} #end // !js
|
||||
}
|
||||
#end // !js
|
||||
|
||||
Reference in New Issue
Block a user