Browse Source

[std/hl] move some hl.Format into lib format/heaps (#11869)

* [std/hl] move some hl.Format into lib format/heaps

* Just remove functions
Yuxiao Mao 7 tháng trước cách đây
mục cha
commit
da841657b1
1 tập tin đã thay đổi với 1 bổ sung73 xóa
  1. 1 73
      std/hl/Format.hx

+ 1 - 73
std/hl/Format.hx

@@ -22,58 +22,10 @@
 
 
 package hl;
 package hl;
 
 
-enum abstract PixelFormat(Int) {
-	var RGB = 0;
-	var BGR = 1;
-	var RGBX = 2;
-	var BGRX = 3;
-	var XBGR = 4;
-	var XRGB = 5;
-	var GRAY = 6;
-	var RGBA = 7;
-	var BGRA = 8;
-	var ABGR = 9;
-	var ARGB = 10;
-	var CMYK = 11;
-}
-
 /**
 /**
-	These are the bindings for the HL `fmt.hdll` library, which contains various low level formats handling.
+	These are some bindings for the HL `fmt.hdll` library, which contains various low level formats handling.
 **/
 **/
 class Format {
 class Format {
-	/**
-		Decode JPG data into the target buffer.
-	**/
-	@:hlNative("fmt", "jpg_decode")
-	public static function decodeJPG(src:hl.Bytes, srcLen:Int, dst:hl.Bytes, width:Int, height:Int, stride:Int, format:PixelFormat, flags:Int):Bool {
-		return false;
-	}
-
-	/**
-		Decode PNG data into the target buffer.
-	**/
-	@:hlNative("fmt", "png_decode")
-	public static function decodePNG(src:hl.Bytes, srcLen:Int, dst:hl.Bytes, width:Int, height:Int, stride:Int, format:PixelFormat, flags:Int):Bool {
-		return false;
-	}
-
-	/**
-		Decode any image data into ARGB pixels
-	**/
-	#if (hl_ver >= version("1.10.0"))
-	@:hlNative("fmt", "dxt_decode")
-	public static function decodeDXT(src:hl.Bytes, dst:hl.Bytes, width:Int, height:Int, dxtFormat:Int):Bool {
-		return false;
-	}
-	#end
-
-	/**
-		Upscale/downscale an image.
-		Currently supported flag bits: 1 = bilinear filtering
-	**/
-	@:hlNative("fmt", "img_scale")
-	public static function scaleImage(out:hl.Bytes, outPos:Int, outStride:Int, outWidth:Int, outHeight:Int, _in:hl.Bytes, inPos:Int, inStride:Int,
-		inWidth:Int, inHeight:Int, flags:Int) {}
 
 
 	/**
 	/**
 		Performs a cryptographic digest of some bytes.
 		Performs a cryptographic digest of some bytes.
@@ -83,27 +35,3 @@ class Format {
 	@:hlNative("fmt", "digest")
 	@:hlNative("fmt", "digest")
 	public static function digest(out:hl.Bytes, src:hl.Bytes, srcLen:Int, algorithm:Int) {}
 	public static function digest(out:hl.Bytes, src:hl.Bytes, srcLen:Int, algorithm:Int) {}
 }
 }
-
-class Mikktspace {
-	public var buffer:hl.BytesAccess<Single>;
-	public var stride:Int;
-	public var xPos:Int;
-	public var normalPos:Int;
-	public var uvPos:Int;
-	public var tangents:hl.BytesAccess<Single>;
-	public var tangentStride:Int;
-	public var tangentPos:Int;
-	public var indexes:hl.BytesAccess<Int>;
-	public var indices:Int;
-
-	public function new() {}
-
-	public function compute(threshold = 180.) {
-		if (!_compute(this, threshold))
-			throw "assert";
-	}
-
-	@:hlNative("fmt", "compute_mikkt_tangents") static function _compute(m:Dynamic, threshold:Float):Bool {
-		return false;
-	}
-}