Skip to content
This repository has been archived by the owner on Jan 21, 2023. It is now read-only.

Commit

Permalink
0.6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Perfare committed Jan 19, 2017
1 parent f60f7ac commit 05fd058
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions Unity Studio/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// 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")]
38 changes: 19 additions & 19 deletions Unity Studio/Unity Classes/Texture2D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ class Texture2D
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;
Expand Down Expand Up @@ -523,43 +523,43 @@ public Texture2D(AssetPreloadData preloadData, bool readSwitch)
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:
Expand Down
18 changes: 9 additions & 9 deletions Unity Studio/UnityStudioForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1447,15 +1447,15 @@ private byte[] Texture2DToASTC(Texture2D m_Texture2D)
{
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();
Expand Down

0 comments on commit 05fd058

Please sign in to comment.