Lubos Lenco 4 лет назад
Родитель
Сommit
1132cb9d34
3 измененных файлов с 5 добавлено и 26 удалено
  1. 1 8
      Sources/arm/shader/NodeShaderContext.hx
  2. 3 17
      Sources/arm/sys/File.hx
  3. 1 1
      Sources/arm/sys/Path.hx

+ 1 - 8
Sources/arm/shader/NodeShaderContext.hx

@@ -7,9 +7,6 @@ import arm.shader.NodeShaderData;
 class NodeShaderContext {
 	public var vert: NodeShader;
 	public var frag: NodeShader;
-	public var geom: NodeShader;
-	public var tesc: NodeShader;
-	public var tese: NodeShader;
 	public var data: TShaderContext;
 	public var allow_vcols = false;
 	var material: TMaterial;
@@ -72,11 +69,7 @@ class NodeShaderContext {
 
 	public function get_elem(name: String): TVertexElement {
 		for (elem in data.vertex_elements) {
-			#if cpp
-			if (Reflect.field(elem, "name") == name)
-			#else
-			if (elem.name == name)
-			#end {
+			if (elem.name == name) {
 				return elem;
 			}
 		}

+ 3 - 17
Sources/arm/sys/File.hx

@@ -7,11 +7,13 @@ class File {
 	#if krom_windows
 	static inline var cmd_dir = "dir /b";
 	static inline var cmd_dir_nofile = "dir /b /ad";
+	static inline var cmd_mkdir = "mkdir";
 	static inline var cmd_copy = "copy";
 	static inline var cmd_del = "del /f";
 	#else
 	static inline var cmd_dir = "ls";
 	static inline var cmd_dir_nofile = "ls";
+	static inline var cmd_mkdir = "mkdir -p";
 	static inline var cmd_copy = "cp";
 	static inline var cmd_del = "rm";
 	#end
@@ -46,11 +48,7 @@ class File {
 	}
 
 	public static function createDirectory(path: String) {
-		#if krom_windows
-		Krom.sysCommand('mkdir "' + path + '"'); // -p by default
-		#else
-		Krom.sysCommand('mkdir -p "' + path + '"');
-		#end
+		Krom.sysCommand(cmd_mkdir + ' "' + path + '"');
 	}
 
 	public static function copy(srcPath: String, dstPath: String) {
@@ -67,18 +65,6 @@ class File {
 		#end
 	}
 
-	public static function explorer(url: String) {
-		#if krom_windows
-		Krom.sysCommand('explorer "' + url + '"');
-		#elseif krom_linux
-		Krom.sysCommand('xdg-open "' + url + '"');
-		#elseif (krom_android || krom_ios)
-		Krom.loadUrl(url);
-		#else
-		Krom.sysCommand('open "' + url + '"');
-		#end
-	}
-
 	public static function delete(path: String) {
 		Krom.sysCommand(cmd_del + ' "' + path + '"');
 	}

+ 1 - 1
Sources/arm/sys/Path.hx

@@ -4,7 +4,7 @@ import iron.data.Data;
 
 class Path {
 
-	#if krom_windows // no inline for plugin access
+	#if krom_windows // No inline for plugin access
 	public static var sep = "\\";
 	#else
 	public static var sep = "/";