mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-27 22:00:23 -04:00
Fixed some bugs
This commit is contained in:
parent
66b9b46523
commit
b580b293f3
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Linq.Expressions;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Unity_Studio
|
namespace Unity_Studio
|
||||||
@ -34,7 +35,14 @@ namespace Unity_Studio
|
|||||||
m_Script = new byte[m_Script_size];
|
m_Script = new byte[m_Script_size];
|
||||||
a_Stream.Read(m_Script, 0, m_Script_size);
|
a_Stream.Read(m_Script, 0, m_Script_size);
|
||||||
|
|
||||||
if (m_Script[0] == 93) { m_Script = SevenZip.Compression.LZMA.SevenZipHelper.Decompress(m_Script); }
|
if (m_Script[0] == 93)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
m_Script = SevenZip.Compression.LZMA.SevenZipHelper.Decompress(m_Script);
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
}
|
||||||
if (m_Script[0] == 60 || (m_Script[0] == 239 && m_Script[1] == 187 && m_Script[2] == 191 && m_Script[3] == 60)) { preloadData.extension = ".xml"; }
|
if (m_Script[0] == 60 || (m_Script[0] == 239 && m_Script[1] == 187 && m_Script[2] == 191 && m_Script[3] == 60)) { preloadData.extension = ".xml"; }
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -275,11 +275,6 @@ namespace Unity_Studio
|
|||||||
int classID = a_Stream.ReadInt32();
|
int classID = a_Stream.ReadInt32();
|
||||||
if (fileGen > 15)
|
if (fileGen > 15)
|
||||||
{
|
{
|
||||||
if (classID == 0)//TODO 暂时用这种方法解决
|
|
||||||
{
|
|
||||||
a_Stream.Position += 12;
|
|
||||||
classID = a_Stream.ReadInt32();
|
|
||||||
}
|
|
||||||
a_Stream.ReadByte();
|
a_Stream.ReadByte();
|
||||||
int type1;
|
int type1;
|
||||||
if ((type1 = a_Stream.ReadInt16()) >= 0)
|
if ((type1 = a_Stream.ReadInt16()) >= 0)
|
||||||
@ -293,6 +288,13 @@ namespace Unity_Studio
|
|||||||
}
|
}
|
||||||
classIDs.Add(new int[] { type1, classID });
|
classIDs.Add(new int[] { type1, classID });
|
||||||
classID = type1;
|
classID = type1;
|
||||||
|
//TODO 某些文件出现type1=-1时还需要跳过16字节的情况
|
||||||
|
var temp = a_Stream.ReadInt32();
|
||||||
|
if (temp == 0)
|
||||||
|
{
|
||||||
|
a_Stream.Position += 16;
|
||||||
|
}
|
||||||
|
a_Stream.Position -= 4;
|
||||||
}
|
}
|
||||||
else if (classID < 0)
|
else if (classID < 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user