Change CallingConvention for better compatibility.

This commit is contained in:
Razmoth
2022-10-04 21:59:53 +04:00
parent aa92d76e64
commit 68952f0e17
3 changed files with 87 additions and 87 deletions

View File

@@ -5,85 +5,85 @@ namespace Texture2DDecoder
unsafe partial class TextureDecoder
{
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DecodeDXT1(void* data, int width, int height, void* image);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DecodeDXT5(void* data, int width, int height, void* image);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DecodePVRTC(void* data, int width, int height, void* image, [MarshalAs(UnmanagedType.Bool)] bool is2bpp);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DecodeETC1(void* data, int width, int height, void* image);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DecodeETC2(void* data, int width, int height, void* image);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DecodeETC2A1(void* data, int width, int height, void* image);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DecodeETC2A8(void* data, int width, int height, void* image);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DecodeEACR(void* data, int width, int height, void* image);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DecodeEACRSigned(void* data, int width, int height, void* image);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DecodeEACRG(void* data, int width, int height, void* image);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DecodeEACRGSigned(void* data, int width, int height, void* image);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DecodeBC4(void* data, int width, int height, void* image);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DecodeBC5(void* data, int width, int height, void* image);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DecodeBC6(void* data, int width, int height, void* image);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DecodeBC7(void* data, int width, int height, void* image);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DecodeATCRGB4(void* data, int width, int height, void* image);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DecodeATCRGBA8(void* data, int width, int height, void* image);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DecodeASTC(void* data, int width, int height, int blockWidth, int blockHeight, void* image);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
private static extern void DisposeBuffer(ref void* ppBuffer);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
private static extern void UnpackCrunch(void* data, uint dataSize, out void* result, out uint resultSize);
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Winapi)]
[DllImport(T2DDll.DllName, CallingConvention = CallingConvention.Cdecl)]
private static extern void UnpackUnityCrunch(void* data, uint dataSize, out void* result, out uint resultSize);
}