C# improvements

This commit is contained in:
Joshua Granick
2016-08-30 03:48:30 -07:00
parent 5f4b564e2a
commit b337e232f0
6 changed files with 27 additions and 9 deletions

View File

@@ -8,8 +8,9 @@
<haxedef name="lime-html5" if="html5" />
<haxedef name="lime-native" if="native" />
<haxedef name="lime-cffi" if="native" unless="disable-cffi" />
<haxedef name="lime-cffi" if="native" />
<haxedef name="no-typedarray-inline" if="cs" />
<haxedef name="no-compilation" />
<templatePath name="templates" />

View File

@@ -131,7 +131,7 @@ class NativeApplication {
untyped setImmediate (eventLoop);
return 0;
#elseif (cpp || neko || cs)
#elseif lime_cffi
var result = lime_application_exec (handle);
parent.onExit.dispatch (result);

View File

@@ -7,7 +7,7 @@ import lime.utils.Float32Array;
abstract Matrix4(Float32Array) from Float32Array to Float32Array {
private static var __identity = [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ];
private static var __identity:Array<Float> = [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ];
public var determinant (get, never):Float;
public var position (get, set):Vector4;
@@ -171,7 +171,7 @@ abstract Matrix4(Float32Array) from Float32Array to Float32Array {
}
public function copythisFrom( array:Float32Array, index:UInt = 0, transposeValues:Bool = false ) {
public function copythisFrom( array:Float32Array, index:Int = 0, transposeValues:Bool = false ) {
if ( transposeValues )
transpose();
@@ -186,7 +186,7 @@ abstract Matrix4(Float32Array) from Float32Array to Float32Array {
}
public function copythisTo( array:Float32Array, index:UInt = 0, transposeValues:Bool = false ) {
public function copythisTo( array:Float32Array, index:Int = 0, transposeValues:Bool = false ) {
if ( transposeValues )
transpose();
@@ -201,7 +201,7 @@ abstract Matrix4(Float32Array) from Float32Array to Float32Array {
}
public function copyRowFrom( row:UInt, vector:Vector4 ) {
public function copyRowFrom( row:Int, vector:Vector4 ) {
switch( row ) {

View File

@@ -96,6 +96,11 @@ class ProjectXMLParser extends HXProject {
defines.set ("native", "1");
defines.set ("nodejs", "1");
} else if (targetFlags.exists ("cs")) {
defines.set ("native", "1");
defines.set ("cs", "1");
} else if (target == Platform.FIREFOX) {
defines.set ("html5", "1");

View File

@@ -51,7 +51,9 @@ class LogHelper {
if (verbose && e != null) {
#if !cs
Lib.rethrow (e);
#end
}

View File

@@ -212,7 +212,7 @@ class CommandLineTools {
target = PlatformHelper.hostPlatform;
targetFlags.set ("cpp", "");
case "neko":
target = PlatformHelper.hostPlatform;
@@ -222,11 +222,16 @@ class CommandLineTools {
target = PlatformHelper.hostPlatform;
targetFlags.set ("nodejs", "");
case "cs":
target = PlatformHelper.hostPlatform;
targetFlags.set ("cs", "");
case "iphone", "iphoneos":
target = Platform.IOS;
case "iphonesim":
target = Platform.IOS;
@@ -1180,7 +1185,7 @@ class CommandLineTools {
target = PlatformHelper.hostPlatform;
targetFlags.set ("cpp", "");
case "neko":
target = PlatformHelper.hostPlatform;
@@ -1196,6 +1201,11 @@ class CommandLineTools {
target = PlatformHelper.hostPlatform;
targetFlags.set ("nodejs", "");
case "cs":
target = PlatformHelper.hostPlatform;
targetFlags.set ("cs", "");
case "iphone", "iphoneos":
target = Platform.IOS;