Refactor read assets

Generic PPtr
Misc
This commit is contained in:
Perfare
2018-11-21 15:37:56 +08:00
parent 8c749e21e1
commit bfaa207853
45 changed files with 1135 additions and 1055 deletions

View File

@@ -87,7 +87,7 @@ namespace AssetStudio
public Texture2DConverter(Texture2D m_Texture2D)
{
image_data_size = m_Texture2D.image_data_size;
image_data = m_Texture2D.image_data;
image_data = m_Texture2D.image_data.Value;
m_Width = m_Texture2D.m_Width;
m_Height = m_Texture2D.m_Height;
m_TextureFormat = m_Texture2D.m_TextureFormat;
@@ -913,7 +913,7 @@ namespace AssetStudio
buff = new byte[stride * m_Height];
for (int i = 0; i < m_Height; i++)
{
Array.Copy(image_data, i * m_Width * 2, buff, i * stride, m_Width * 2);
Buffer.BlockCopy(image_data, i * m_Width * 2, buff, i * stride, m_Width * 2);
}
}
else