Forráskód Böngészése

Fix TIFF compilation on JS (#873)

Pavel Alexandrov 5 éve
szülő
commit
2af27249cb
2 módosított fájl, 13 hozzáadás és 2 törlés
  1. 4 0
      hxd/fmt/pak/FileSystem.hx
  2. 9 2
      hxd/fmt/tiff/Reader.hx

+ 4 - 0
hxd/fmt/pak/FileSystem.hx

@@ -23,6 +23,10 @@ class FileInput extends haxe.io.BytesInput {
 			this.position += pos;
 			this.position += pos;
 		}
 		}
 	}
 	}
+
+	public function tell() {
+		return this.position;
+	}
 }
 }
 #end
 #end
 
 

+ 9 - 2
hxd/fmt/tiff/Reader.hx

@@ -1,11 +1,18 @@
 package hxd.fmt.tiff;
 package hxd.fmt.tiff;
+
 import hxd.fmt.tiff.Data;
 import hxd.fmt.tiff.Data;
+#if sys
+import sys.io.FileInput;
+#else
+import hxd.fmt.pak.FileSystem.FileInput;
+#end
+
 
 
 class Reader {
 class Reader {
 
 
-	var f : sys.io.FileInput;
+	var f : FileInput;
 
 
-	public function new(f:sys.io.FileInput) {
+	public function new(f:FileInput) {
 		this.f = f;
 		this.f = f;
 	}
 	}