mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-25 05:40:21 -04:00
0.6.5
This commit is contained in:
parent
f60f7ac413
commit
05fd0588e8
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.6.4.0")]
|
||||
[assembly: AssemblyFileVersion("0.6.4.0")]
|
||||
[assembly: AssemblyVersion("0.6.5.0")]
|
||||
[assembly: AssemblyFileVersion("0.6.5.0")]
|
||||
|
@ -78,13 +78,13 @@ namespace Unity_Studio
|
||||
public int bytesOfKeyValueData = 0;
|
||||
//KTX End
|
||||
//ASTC Start
|
||||
public byte[] astc_magicnum = { 0x13, 0xab, 0xa1, 0x5c };
|
||||
public byte astc_x;
|
||||
public byte astc_y;
|
||||
public byte astc_z = 1;
|
||||
public byte[] astc_width = new byte[3];
|
||||
public byte[] astc_height = new byte[3];
|
||||
public byte[] astc_length = new byte[3] { 1, 0, 0 };//I don't know what this is.
|
||||
public byte[] astc_magic = { 0x13, 0xab, 0xa1, 0x5c };
|
||||
public byte blockdim_x;
|
||||
public byte blockdim_y;
|
||||
public byte blockdim_z = 1;
|
||||
public byte[] xsize = new byte[3];
|
||||
public byte[] ysize = new byte[3];
|
||||
public byte[] zsize = new byte[3] { 1, 0, 0 };
|
||||
//ASTC END
|
||||
//TextureConverter
|
||||
public int q_format;
|
||||
@ -523,43 +523,43 @@ namespace Unity_Studio
|
||||
case TextureFormat.ASTC_RGB_4x4: //test pass
|
||||
case TextureFormat.ASTC_RGBA_4x4: //test pass
|
||||
{
|
||||
astc_x = 4;
|
||||
astc_y = 4;
|
||||
blockdim_x = 4;
|
||||
blockdim_y = 4;
|
||||
break;
|
||||
}
|
||||
case TextureFormat.ASTC_RGB_5x5: //test pass
|
||||
case TextureFormat.ASTC_RGBA_5x5: //test pass
|
||||
{
|
||||
astc_x = 5;
|
||||
astc_y = 5;
|
||||
blockdim_x = 5;
|
||||
blockdim_y = 5;
|
||||
break;
|
||||
}
|
||||
case TextureFormat.ASTC_RGB_6x6: //test pass
|
||||
case TextureFormat.ASTC_RGBA_6x6: //test pass
|
||||
{
|
||||
astc_x = 6;
|
||||
astc_y = 6;
|
||||
blockdim_x = 6;
|
||||
blockdim_y = 6;
|
||||
break;
|
||||
}
|
||||
case TextureFormat.ASTC_RGB_8x8: //test pass
|
||||
case TextureFormat.ASTC_RGBA_8x8: //test pass
|
||||
{
|
||||
astc_x = 8;
|
||||
astc_y = 8;
|
||||
blockdim_x = 8;
|
||||
blockdim_y = 8;
|
||||
break;
|
||||
}
|
||||
case TextureFormat.ASTC_RGB_10x10: //test pass
|
||||
case TextureFormat.ASTC_RGBA_10x10: //test pass
|
||||
{
|
||||
astc_x = 10;
|
||||
astc_y = 10;
|
||||
blockdim_x = 10;
|
||||
blockdim_y = 10;
|
||||
break;
|
||||
}
|
||||
case TextureFormat.ASTC_RGB_12x12: //test pass
|
||||
case TextureFormat.ASTC_RGBA_12x12: //test pass
|
||||
{
|
||||
astc_x = 12;
|
||||
astc_y = 12;
|
||||
blockdim_x = 12;
|
||||
blockdim_y = 12;
|
||||
break;
|
||||
}
|
||||
case TextureFormat.ETC_RGB4_3DS:
|
||||
|
@ -1447,15 +1447,15 @@ namespace Unity_Studio
|
||||
{
|
||||
var mstream = new MemoryStream();
|
||||
var writer = new BinaryWriter(mstream);
|
||||
Array.Copy(BitConverter.GetBytes(m_Texture2D.m_Width), 0, m_Texture2D.astc_width, 0, 3);
|
||||
Array.Copy(BitConverter.GetBytes(m_Texture2D.m_Height), 0, m_Texture2D.astc_height, 0, 3);
|
||||
writer.Write(m_Texture2D.astc_magicnum);
|
||||
writer.Write(m_Texture2D.astc_x);
|
||||
writer.Write(m_Texture2D.astc_y);
|
||||
writer.Write(m_Texture2D.astc_z);
|
||||
writer.Write(m_Texture2D.astc_width);
|
||||
writer.Write(m_Texture2D.astc_height);
|
||||
writer.Write(m_Texture2D.astc_length);
|
||||
Array.Copy(BitConverter.GetBytes(m_Texture2D.m_Width), 0, m_Texture2D.xsize, 0, 3);
|
||||
Array.Copy(BitConverter.GetBytes(m_Texture2D.m_Height), 0, m_Texture2D.ysize, 0, 3);
|
||||
writer.Write(m_Texture2D.astc_magic);
|
||||
writer.Write(m_Texture2D.blockdim_x);
|
||||
writer.Write(m_Texture2D.blockdim_y);
|
||||
writer.Write(m_Texture2D.blockdim_z);
|
||||
writer.Write(m_Texture2D.xsize);
|
||||
writer.Write(m_Texture2D.ysize);
|
||||
writer.Write(m_Texture2D.zsize);
|
||||
writer.Write(m_Texture2D.image_data);
|
||||
var astcdata = mstream.ToArray();
|
||||
writer.Close();
|
||||
|
Loading…
Reference in New Issue
Block a user