mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-26 13:50:21 -04:00
Code moved out of UnityStudioForm and into new class UnityStudio.cs (#17)
This commit is contained in:
parent
2357e55337
commit
66b9b46523
@ -111,7 +111,7 @@ namespace Unity_Studio
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
EndianStream estream = null;
|
EndianStream estream = null;
|
||||||
if (UnityStudioForm.assetsfileandstream.TryGetValue(Path.GetFileName(m_Source), out estream))
|
if (UnityStudio.assetsfileandstream.TryGetValue(Path.GetFileName(m_Source), out estream))
|
||||||
{
|
{
|
||||||
estream.Position = m_Offset;
|
estream.Position = m_Offset;
|
||||||
m_AudioData = estream.ReadBytes((int)m_Size);
|
m_AudioData = estream.ReadBytes((int)m_Size);
|
||||||
|
@ -177,7 +177,7 @@ namespace Unity_Studio
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
EndianStream estream = null;
|
EndianStream estream = null;
|
||||||
if (UnityStudioForm.assetsfileandstream.TryGetValue(Path.GetFileName(path), out estream))
|
if (UnityStudio.assetsfileandstream.TryGetValue(Path.GetFileName(path), out estream))
|
||||||
{
|
{
|
||||||
estream.Position = offset;
|
estream.Position = offset;
|
||||||
image_data = estream.ReadBytes(image_data_size);
|
image_data = estream.ReadBytes(image_data_size);
|
||||||
@ -980,6 +980,8 @@ namespace Unity_Studio
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Bitmap BGRA32ToBitmap()
|
private Bitmap BGRA32ToBitmap()
|
||||||
|
{
|
||||||
|
if (image_data.Length > 0)
|
||||||
{
|
{
|
||||||
var hObject = GCHandle.Alloc(image_data, GCHandleType.Pinned);
|
var hObject = GCHandle.Alloc(image_data, GCHandleType.Pinned);
|
||||||
var pObject = hObject.AddrOfPinnedObject();
|
var pObject = hObject.AddrOfPinnedObject();
|
||||||
@ -987,8 +989,12 @@ namespace Unity_Studio
|
|||||||
hObject.Free();
|
hObject.Free();
|
||||||
return bitmap;
|
return bitmap;
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private Bitmap RGB565ToBitmap()
|
private Bitmap RGB565ToBitmap()
|
||||||
|
{
|
||||||
|
if (image_data.Length > 0)
|
||||||
{
|
{
|
||||||
var hObject = GCHandle.Alloc(image_data, GCHandleType.Pinned);
|
var hObject = GCHandle.Alloc(image_data, GCHandleType.Pinned);
|
||||||
var pObject = hObject.AddrOfPinnedObject();
|
var pObject = hObject.AddrOfPinnedObject();
|
||||||
@ -996,6 +1002,8 @@ namespace Unity_Studio
|
|||||||
hObject.Free();
|
hObject.Free();
|
||||||
return bitmap;
|
return bitmap;
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private Bitmap PVRToBitmap(byte[] pvrdata)
|
private Bitmap PVRToBitmap(byte[] pvrdata)
|
||||||
{
|
{
|
||||||
|
@ -461,6 +461,5 @@ namespace Unity_Studio
|
|||||||
ClassStructures.Add(classID, aClass);
|
ClassStructures.Add(classID, aClass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,9 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using SevenZip;
|
|
||||||
using Lz4;
|
using Lz4;
|
||||||
|
|
||||||
namespace Unity_Studio
|
namespace Unity_Studio
|
1750
Unity Studio/Unity Studio Classes/UnityStudio.cs
Normal file
1750
Unity Studio/Unity Studio Classes/UnityStudio.cs
Normal file
File diff suppressed because it is too large
Load Diff
@ -144,12 +144,13 @@
|
|||||||
<Compile Include="AboutBox.Designer.cs">
|
<Compile Include="AboutBox.Designer.cs">
|
||||||
<DependentUpon>AboutBox.cs</DependentUpon>
|
<DependentUpon>AboutBox.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="AssetPreloadData.cs" />
|
<Compile Include="Unity Studio Classes\AssetPreloadData.cs" />
|
||||||
<Compile Include="Unity Classes\AudioClip.cs" />
|
<Compile Include="Unity Classes\AudioClip.cs" />
|
||||||
<Compile Include="Unity Classes\BuildSettings.cs" />
|
<Compile Include="Unity Classes\BuildSettings.cs" />
|
||||||
<Compile Include="BundleFile.cs" />
|
<Compile Include="Unity Studio Classes\BundleFile.cs" />
|
||||||
<Compile Include="ClassIDReference.cs" />
|
<Compile Include="Unity Studio Classes\UnityStudio.cs" />
|
||||||
<Compile Include="EndianStream.cs" />
|
<Compile Include="Unity Studio Classes\ClassIDReference.cs" />
|
||||||
|
<Compile Include="Unity Studio Classes\EndianStream.cs" />
|
||||||
<Compile Include="ExportOptions.cs">
|
<Compile Include="ExportOptions.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@ -163,11 +164,11 @@
|
|||||||
<Compile Include="GOHierarchy.cs">
|
<Compile Include="GOHierarchy.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Lz4DecoderStream.cs" />
|
<Compile Include="Unity Studio Classes\Lz4DecoderStream.cs" />
|
||||||
<Compile Include="Unity Classes\Material.cs" />
|
<Compile Include="Unity Classes\Material.cs" />
|
||||||
<Compile Include="Unity Classes\Mesh.cs" />
|
<Compile Include="Unity Classes\Mesh.cs" />
|
||||||
<Compile Include="Unity Classes\GameObject.cs" />
|
<Compile Include="Unity Classes\GameObject.cs" />
|
||||||
<Compile Include="helpers.cs" />
|
<Compile Include="Unity Studio Classes\helpers.cs" />
|
||||||
<Compile Include="Unity Classes\MonoBehaviour.cs" />
|
<Compile Include="Unity Classes\MonoBehaviour.cs" />
|
||||||
<Compile Include="Unity Classes\PlayerSettings.cs" />
|
<Compile Include="Unity Classes\PlayerSettings.cs" />
|
||||||
<Compile Include="Unity Classes\RectTransform.cs" />
|
<Compile Include="Unity Classes\RectTransform.cs" />
|
||||||
@ -180,7 +181,7 @@
|
|||||||
<Compile Include="Unity Classes\Transform.cs" />
|
<Compile Include="Unity Classes\Transform.cs" />
|
||||||
<Compile Include="Program.cs" />
|
<Compile Include="Program.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="AssetsFile.cs" />
|
<Compile Include="Unity Studio Classes\AssetsFile.cs" />
|
||||||
<Compile Include="UnityStudioForm.cs">
|
<Compile Include="UnityStudioForm.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user