mirror of
https://github.com/AssetRipper/AssetRipper.Conversions.UnityCrunch.git
synced 2026-11-13 18:06:30 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9df8d3b80c | ||
|
|
44a7bee859 | ||
|
|
7d694d9c59 | ||
|
|
ee81b0cff8 | ||
|
|
293571cd58 | ||
|
|
c6a5667654 | ||
|
|
e8309e17ce | ||
|
|
0c71bfbced | ||
|
|
84a355b02f | ||
|
|
60c57584f7 | ||
|
|
17efaf6262 | ||
|
|
eb7618f780 | ||
|
|
9114a85bf9 | ||
|
|
05057384a5 | ||
|
|
39735d50ae |
No files matched your search
@@ -3,3 +3,5 @@
|
||||
bin/
|
||||
obj/
|
||||
source.ll
|
||||
launchSettings.json
|
||||
*.user
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AssetRipper.Conversions.UnityCrunch\AssetRipper.Conversions.UnityCrunch.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,19 @@
|
||||
namespace AssetRipper.Conversions.UnityCrunch.ConsoleApp;
|
||||
|
||||
internal static class Program
|
||||
{
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
byte[] data = File.ReadAllBytes(args[0]);
|
||||
string outputPath = args.Length > 1 ? args[1] : args[0] + ".dxt";
|
||||
if (UnityCrunch.TryDecompress(data, out byte[]? output))
|
||||
{
|
||||
File.WriteAllBytes(outputPath, output);
|
||||
Console.WriteLine($"Decompressed to {outputPath}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Decompression failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 18
|
||||
VisualStudioVersion = 18.0.11012.119 d18.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssetRipper.Conversions.UnityCrunch", "AssetRipper.Conversions.UnityCrunch\AssetRipper.Conversions.UnityCrunch.csproj", "{48DE0AAE-5E53-F6EF-0EDD-88BB51F56DCB}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FC0FBC68-7202-4CEC-A88C-E268CE857B1D}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.editorconfig = .editorconfig
|
||||
.gitignore = .gitignore
|
||||
Directory.Build.props = Directory.Build.props
|
||||
LICENSE = LICENSE
|
||||
README.md = README.md
|
||||
source.cpp = source.cpp
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{48DE0AAE-5E53-F6EF-0EDD-88BB51F56DCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{48DE0AAE-5E53-F6EF-0EDD-88BB51F56DCB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{48DE0AAE-5E53-F6EF-0EDD-88BB51F56DCB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{48DE0AAE-5E53-F6EF-0EDD-88BB51F56DCB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {31873CC8-04C0-47A6-8053-063020328D48}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,12 @@
|
||||
<Solution>
|
||||
<Folder Name="/Solution Items/">
|
||||
<File Path=".editorconfig" />
|
||||
<File Path=".gitignore" />
|
||||
<File Path="Directory.Build.props" />
|
||||
<File Path="LICENSE" />
|
||||
<File Path="README.md" />
|
||||
<File Path="source.cpp" />
|
||||
</Folder>
|
||||
<Project Path="AssetRipper.Conversions.UnityCrunch.ConsoleApp/AssetRipper.Conversions.UnityCrunch.ConsoleApp.csproj" />
|
||||
<Project Path="AssetRipper.Conversions.UnityCrunch/AssetRipper.Conversions.UnityCrunch.csproj" />
|
||||
</Solution>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.Enumerations;
|
||||
|
||||
[MangledName(".?AW4<unnamed-enum-cFlag>@?$scalar_type@G@crnd@@")]
|
||||
[DemangledName("enum crnd::scalar_type<unsigned short>::<unnamed-enum-cFlag>")]
|
||||
[CleanName("Enum")]
|
||||
public enum Enum_43wa3v
|
||||
{
|
||||
cFlag = 1
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.Enumerations;
|
||||
|
||||
[MangledName(".?AW4<unnamed-enum-cFlag>@?$scalar_type@Ublock_buffer_element@crn_unpacker@crnd@@@crnd@@")]
|
||||
[DemangledName("enum crnd::scalar_type<struct crnd::crn_unpacker::block_buffer_element>::<unnamed-enum-cFlag>")]
|
||||
[CleanName("Enum")]
|
||||
public enum Enum_jgz2w7
|
||||
{
|
||||
cFlag
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.Enumerations;
|
||||
|
||||
[MangledName(".?AW4<unnamed-enum-cFlag>@?$scalar_type@I@crnd@@")]
|
||||
[DemangledName("enum crnd::scalar_type<unsigned int>::<unnamed-enum-cFlag>")]
|
||||
[CleanName("Enum")]
|
||||
public enum Enum_mvhugt
|
||||
{
|
||||
cFlag = 1
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.Enumerations;
|
||||
|
||||
[MangledName(".?AW4<unnamed-enum-cFlag>@?$scalar_type@E@crnd@@")]
|
||||
[DemangledName("enum crnd::scalar_type<unsigned char>::<unnamed-enum-cFlag>")]
|
||||
[CleanName("Enum")]
|
||||
public enum Enum_q5bxgp
|
||||
{
|
||||
cFlag = 1
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.Enumerations;
|
||||
|
||||
[MangledName(".?AW4<unnamed-enum-cNumComps>@?$color_quad@EH@crnd@@")]
|
||||
[DemangledName("enum crnd::color_quad<unsigned char, int>::<unnamed-enum-cNumComps>")]
|
||||
[CleanName("Enum")]
|
||||
public enum Enum_xpjve5
|
||||
{
|
||||
cNumComps = -4
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.Enumerations;
|
||||
|
||||
[MangledName(".?AW4<unnamed-enum-cSigned>@?$color_quad_component_traits@E@crnd@@")]
|
||||
[DemangledName("enum crnd::color_quad_component_traits<unsigned char>::<unnamed-enum-cSigned>")]
|
||||
[CleanName("Enum")]
|
||||
public enum Enum_yqz7zz
|
||||
{
|
||||
cSigned = 0,
|
||||
cFloat = 0,
|
||||
cMin = 0,
|
||||
cMax = -1
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.Enumerations;
|
||||
|
||||
[MangledName(".?AW4crn_format@@")]
|
||||
[DemangledName("enum crn_format")]
|
||||
public enum crn_format
|
||||
{
|
||||
cCRNFmtInvalid = -1,
|
||||
cCRNFmtDXT1 = 0,
|
||||
cCRNFmtFirstValid = 0,
|
||||
cCRNFmtDXT3 = 1,
|
||||
cCRNFmtDXT5 = 2,
|
||||
cCRNFmtDXT5_CCxY = 3,
|
||||
cCRNFmtDXT5_xGxR = 4,
|
||||
cCRNFmtDXT5_xGBR = 5,
|
||||
cCRNFmtDXT5_AGBR = 6,
|
||||
cCRNFmtDXN_XY = 7,
|
||||
cCRNFmtDXN_YX = 8,
|
||||
cCRNFmtDXT5A = 9,
|
||||
cCRNFmtETC1 = 10,
|
||||
cCRNFmtETC2 = 11,
|
||||
cCRNFmtETC2A = 12,
|
||||
cCRNFmtETC1S = 13,
|
||||
cCRNFmtETC2AS = 14,
|
||||
cCRNFmtTotal = 15,
|
||||
cCRNFmtForceDWORD = -1
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.Enumerations;
|
||||
|
||||
[MangledName(".?AW4crn_header_flags@crnd@@")]
|
||||
[DemangledName("enum crnd::crn_header_flags")]
|
||||
public enum crn_header_flags
|
||||
{
|
||||
cCRNHeaderFlagSegmented = 1
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.Enumerations;
|
||||
|
||||
[MangledName(".?AW4crn_limits@@")]
|
||||
[DemangledName("enum crn_limits")]
|
||||
public enum crn_limits
|
||||
{
|
||||
cCRNMaxLevelResolution = 4096,
|
||||
cCRNMinPaletteSize = 8,
|
||||
cCRNMaxPaletteSize = 8192,
|
||||
cCRNMaxFaces = 6,
|
||||
cCRNMaxLevels = 16,
|
||||
cCRNMaxHelperThreads = 15,
|
||||
cCRNMinQualityLevel = 0,
|
||||
cCRNMaxQualityLevel = 255
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.Enumerations;
|
||||
|
||||
[MangledName(".?AW4<unnamed-enum-cCRNSigValue>@crn_header@crnd@@")]
|
||||
[DemangledName("enum crnd::crn_header::<unnamed-enum-cCRNSigValue>")]
|
||||
public enum crnd_crn_header_unnamed_enum
|
||||
{
|
||||
cCRNSigValue = 18552
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.Enumerations;
|
||||
|
||||
[MangledName(".?AW4<unnamed-enum-cMagicValue>@crn_unpacker@crnd@@")]
|
||||
[DemangledName("enum crnd::crn_unpacker::<unnamed-enum-cMagicValue>")]
|
||||
public enum crnd_crn_unpacker_unnamed_enum
|
||||
{
|
||||
cMagicValue = 519686845
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.Enumerations;
|
||||
|
||||
[MangledName(".?AW4<unnamed-enum-cNumSelectorBytes>@dxt1_block@crnd@@")]
|
||||
[DemangledName("enum crnd::dxt1_block::<unnamed-enum-cNumSelectorBytes>")]
|
||||
public enum crnd_dxt1_block_unnamed_enum
|
||||
{
|
||||
cNumSelectorBytes = 4
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.Enumerations;
|
||||
|
||||
[MangledName(".?AW4<unnamed-enum-cNumAlphaBytes>@dxt3_block@crnd@@")]
|
||||
[DemangledName("enum crnd::dxt3_block::<unnamed-enum-cNumAlphaBytes>")]
|
||||
public enum crnd_dxt3_block_unnamed_enum
|
||||
{
|
||||
cNumAlphaBytes = 8
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.Enumerations;
|
||||
|
||||
[MangledName(".?AW4<unnamed-enum-cNumSelectorBytes>@dxt5_block@crnd@@")]
|
||||
[DemangledName("enum crnd::dxt5_block::<unnamed-enum-cNumSelectorBytes>")]
|
||||
public enum crnd_dxt5_block_unnamed_enum
|
||||
{
|
||||
cNumSelectorBytes = 6
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.Enumerations;
|
||||
|
||||
[MangledName(".?AW4<unnamed-enum-cBitBufSize>@symbol_codec@crnd@@")]
|
||||
[DemangledName("enum crnd::symbol_codec::<unnamed-enum-cBitBufSize>")]
|
||||
public enum crnd_symbol_codec_unnamed_enum
|
||||
{
|
||||
cBitBufSize = 0x20
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.Enumerations;
|
||||
|
||||
[MangledName(".?AW4dxt_constants@crnd@@")]
|
||||
[DemangledName("enum crnd::dxt_constants")]
|
||||
public enum dxt_constants
|
||||
{
|
||||
cDXTBlockShift = 2,
|
||||
cDXTBlockSize = 4,
|
||||
cDXT1BytesPerBlock = 8,
|
||||
cDXT5NBytesPerBlock = 16,
|
||||
cDXT1SelectorBits = 2,
|
||||
cDXT1SelectorValues = 4,
|
||||
cDXT1SelectorMask = 3,
|
||||
cDXT5SelectorBits = 3,
|
||||
cDXT5SelectorValues = 8,
|
||||
cDXT5SelectorMask = 7
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.Enumerations;
|
||||
|
||||
[MangledName(".?AW4eClear@crnd@@")]
|
||||
[DemangledName("enum crnd::eClear")]
|
||||
public enum eClear
|
||||
{
|
||||
cClear
|
||||
}
|
||||
+2
-1
@@ -7,8 +7,9 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("public: bool __cdecl crnd::vector<unsigned char>::get_alloc_failed(void) const")]
|
||||
internal static partial class Get_alloc_failed
|
||||
{
|
||||
[return: NativeType("bool")]
|
||||
public unsafe static bool Invoke(void* @this)
|
||||
{
|
||||
return (unchecked((crnd_vector*)@this)->field_3 & 1) == 1;
|
||||
return (unchecked((crnd_vector_uksit8*)@this)->m_alloc_failed & 1) == 1;
|
||||
}
|
||||
}
|
||||
+11
-22
@@ -8,38 +8,27 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("public: unsigned int __cdecl crnd::dxt3_block::get_alpha(unsigned int, unsigned int, bool) const")]
|
||||
internal static partial class Get_alpha
|
||||
{
|
||||
public unsafe static int Invoke(void* @this, int x, int y, bool scaled)
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke(void* @this, [NativeType("unsigned int")] int x, [NativeType("unsigned int")] int y, [NativeType("bool")] bool scaled)
|
||||
{
|
||||
sbyte b = 0;
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
b = (scaled ? ((sbyte)1) : ((sbyte)0));
|
||||
num = y;
|
||||
num2 = x;
|
||||
sbyte b = (scaled ? ((sbyte)1) : ((sbyte)0));
|
||||
unchecked
|
||||
{
|
||||
int num4;
|
||||
if ((uint)num2 < 4u && (uint)num < 4u)
|
||||
if ((uint)x >= 4u || (uint)y >= 4u)
|
||||
{
|
||||
num4 = -1;
|
||||
crnd_assert.Invoke(String_jsxkht.__pointer, String_vvx8bt.__pointer, 2850);
|
||||
}
|
||||
else
|
||||
int num = (byte)((sbyte*)(&((crnd_dxt3_block*)@this)->m_alpha))[(uint)((y << 1) + (x >>> 1))];
|
||||
if ((x & 1) != 0)
|
||||
{
|
||||
crnd_assert.Invoke(String_cahur4b.__pointer, String_yguirrd.__pointer, 2850);
|
||||
num4 = 0;
|
||||
num >>>= 4;
|
||||
}
|
||||
num3 = (byte)((sbyte*)(&((crnd_dxt3_block*)@this)->field_0))[(uint)((num << 1) + (num2 >>> 1))];
|
||||
if ((num2 & 1) != 0)
|
||||
{
|
||||
num3 >>>= 4;
|
||||
}
|
||||
num3 &= 0xF;
|
||||
num &= 0xF;
|
||||
if ((b & 1) == 1)
|
||||
{
|
||||
num3 = (num3 << 4) | num3;
|
||||
num = (num << 4) | num;
|
||||
}
|
||||
return num3;
|
||||
return num;
|
||||
}
|
||||
}
|
||||
}
|
||||
+21
-36
@@ -8,56 +8,41 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("private: unsigned int __cdecl crnd::symbol_codec::get_bits(unsigned int)")]
|
||||
internal static partial class Get_bits
|
||||
{
|
||||
public unsafe static int Invoke(void* @this, int num_bits)
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke(void* @this, [NativeType("unsigned int")] int num_bits)
|
||||
{
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
num = num_bits;
|
||||
unchecked
|
||||
{
|
||||
int num4;
|
||||
if ((uint)num <= 32u)
|
||||
if ((uint)num_bits > 32u)
|
||||
{
|
||||
num4 = -1;
|
||||
crnd_assert.Invoke(String_ya7rpa.__pointer, String_vvx8bt.__pointer, 2642);
|
||||
}
|
||||
else
|
||||
while (((crnd_symbol_codec*)@this)->m_bit_count < num_bits)
|
||||
{
|
||||
crnd_assert.Invoke(String_bhrpdhd.__pointer, String_yguirrd.__pointer, 2642);
|
||||
num4 = 0;
|
||||
}
|
||||
while (((crnd_symbol_codec*)@this)->field_5 < num)
|
||||
{
|
||||
num2 = 0;
|
||||
if (((crnd_symbol_codec*)@this)->field_1 != ((crnd_symbol_codec*)@this)->field_2)
|
||||
int num = 0;
|
||||
if (((crnd_symbol_codec*)@this)->m_pDecode_buf_next != ((crnd_symbol_codec*)@this)->m_pDecode_buf_end)
|
||||
{
|
||||
void** field_ = &((crnd_symbol_codec*)@this)->field_1;
|
||||
void* ptr = *field_;
|
||||
*field_ = (byte*)ptr + 1;
|
||||
num2 = (byte)(*(sbyte*)ptr);
|
||||
void** pDecode_buf_next = &((crnd_symbol_codec*)@this)->m_pDecode_buf_next;
|
||||
void* ptr = *pDecode_buf_next;
|
||||
*pDecode_buf_next = (byte*)ptr + 1;
|
||||
num = (byte)(*(sbyte*)ptr);
|
||||
}
|
||||
int num6;
|
||||
int num2;
|
||||
checked
|
||||
{
|
||||
unchecked((crnd_symbol_codec*)@this)->field_5 += 8;
|
||||
int num5;
|
||||
if (unchecked((crnd_symbol_codec*)@this)->field_5 <= 32)
|
||||
unchecked((crnd_symbol_codec*)@this)->m_bit_count += 8;
|
||||
if (unchecked((crnd_symbol_codec*)@this)->m_bit_count > 32)
|
||||
{
|
||||
num5 = -1;
|
||||
crnd_assert.Invoke(String_igi64g.__pointer, String_vvx8bt.__pointer, 2650);
|
||||
}
|
||||
else
|
||||
{
|
||||
crnd_assert.Invoke(String_kf9n5db.__pointer, String_yguirrd.__pointer, 2650);
|
||||
num5 = 0;
|
||||
}
|
||||
num6 = num2 << 32 - unchecked((crnd_symbol_codec*)@this)->field_5;
|
||||
num2 = num << 32 - unchecked((crnd_symbol_codec*)@this)->m_bit_count;
|
||||
}
|
||||
((crnd_symbol_codec*)@this)->field_4 |= num6;
|
||||
((crnd_symbol_codec*)@this)->m_bit_buf |= num2;
|
||||
}
|
||||
num3 = ((crnd_symbol_codec*)@this)->field_4 >>> 32 - num;
|
||||
((crnd_symbol_codec*)@this)->field_4 <<= num;
|
||||
((crnd_symbol_codec*)@this)->field_5 -= num;
|
||||
return num3;
|
||||
int result = ((crnd_symbol_codec*)@this)->m_bit_buf >>> 32 - num_bits;
|
||||
((crnd_symbol_codec*)@this)->m_bit_buf <<= num_bits;
|
||||
((crnd_symbol_codec*)@this)->m_bit_count -= num_bits;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -7,12 +7,13 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("private: void __cdecl crnd::symbol_codec::get_bits_init(void)")]
|
||||
internal static partial class Get_bits_init
|
||||
{
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke(void* @this)
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
((crnd_symbol_codec*)@this)->field_4 = 0;
|
||||
((crnd_symbol_codec*)@this)->field_5 = 0;
|
||||
((crnd_symbol_codec*)@this)->m_bit_buf = 0;
|
||||
((crnd_symbol_codec*)@this)->m_bit_count = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
+7
-11
@@ -6,19 +6,15 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("public: static unsigned int __cdecl crnd::dxt1_block::get_block_colors(class crnd::color_quad<unsigned char, int> *, unsigned short, unsigned short)")]
|
||||
internal static partial class Get_block_colors
|
||||
{
|
||||
public unsafe static int Invoke(void* pDst, short color0, short color1)
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke([NativeType("class crnd::color_quad<unsigned char, int> *")] void* pDst, [NativeType("unsigned short")] short color0, [NativeType("unsigned short")] short color1)
|
||||
{
|
||||
int num = 0;
|
||||
short num2 = 0;
|
||||
short num3 = 0;
|
||||
void* ptr = null;
|
||||
num2 = color1;
|
||||
num3 = color0;
|
||||
ptr = pDst;
|
||||
if (unchecked((ushort)num3 > (ushort)num2))
|
||||
short num = color1;
|
||||
short num2 = color0;
|
||||
if (unchecked((ushort)num2 > (ushort)num))
|
||||
{
|
||||
return Get_block_colors4.Invoke(ptr, num3, num2);
|
||||
return Get_block_colors4.Invoke(pDst, num2, num);
|
||||
}
|
||||
return Get_block_colors3.Invoke(ptr, num3, num2);
|
||||
return Get_block_colors3.Invoke(pDst, num2, num);
|
||||
}
|
||||
}
|
||||
+8
-7
@@ -7,15 +7,16 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("public: static unsigned int __cdecl crnd::dxt1_block::get_block_colors3(class crnd::color_quad<unsigned char, int> *, unsigned short, unsigned short)")]
|
||||
internal static partial class Get_block_colors3
|
||||
{
|
||||
public unsafe static int Invoke(void* pDst, short color0, short color1)
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke([NativeType("class crnd::color_quad<unsigned char, int> *")] void* pDst, [NativeType("unsigned short")] short color0, [NativeType("unsigned short")] short color1)
|
||||
{
|
||||
crnd_color_quad crnd_color_quad = default(crnd_color_quad);
|
||||
crnd_color_quad crnd_color_quad2 = default(crnd_color_quad);
|
||||
unpack_color_ifs9dpd.Invoke(&crnd_color_quad, color0, scaled: true, 255);
|
||||
unpack_color_ifs9dpd.Invoke(&crnd_color_quad2, color1, scaled: true, 255);
|
||||
_4_color_quad.Invoke(pDst, &crnd_color_quad);
|
||||
_4_color_quad.Invoke(unchecked((byte*)pDst) + sizeof(crnd_color_quad), &crnd_color_quad2);
|
||||
set.Invoke(unchecked((byte*)pDst + (nint)2 * sizeof(crnd_color_quad)), blue: unchecked((byte)((anon_b9ijpuc*)(&crnd_color_quad.field_0))->field_2) + unchecked((byte)((anon_b9ijpuc*)(&crnd_color_quad2.field_0))->field_2) >> 1, green: unchecked((byte)((anon_b9ijpuc*)(&crnd_color_quad.field_0))->field_1) + unchecked((byte)((anon_b9ijpuc*)(&crnd_color_quad2.field_0))->field_1) >> 1, red: unchecked((byte)((anon_b9ijpuc*)(&crnd_color_quad.field_0))->field_0) + unchecked((byte)((anon_b9ijpuc*)(&crnd_color_quad2.field_0))->field_0) >> 1, alpha: 255);
|
||||
crnd_color_quad crnd_color_quad3 = default(crnd_color_quad);
|
||||
unpack_color_gac4s5.Invoke(&crnd_color_quad2, color0, scaled: true, 255);
|
||||
unpack_color_gac4s5.Invoke(&crnd_color_quad3, color1, scaled: true, 255);
|
||||
color_quad_unsigned_char_int_Assignment.Invoke(pDst, &crnd_color_quad2);
|
||||
color_quad_unsigned_char_int_Assignment.Invoke(unchecked((byte*)pDst) + sizeof(crnd_color_quad), &crnd_color_quad3);
|
||||
set.Invoke(unchecked((byte*)pDst + (nint)2 * sizeof(crnd_color_quad)), blue: unchecked((byte)((anon_m9uqrv*)(&crnd_color_quad2.field))->field_2) + unchecked((byte)((anon_m9uqrv*)(&crnd_color_quad3.field))->field_2) >> 1, green: unchecked((byte)((anon_m9uqrv*)(&crnd_color_quad2.field))->field_1) + unchecked((byte)((anon_m9uqrv*)(&crnd_color_quad3.field))->field_1) >> 1, red: unchecked((byte)((anon_m9uqrv*)(&crnd_color_quad2.field))->field_0) + unchecked((byte)((anon_m9uqrv*)(&crnd_color_quad3.field))->field_0) >> 1, alpha: 255);
|
||||
set.Invoke(unchecked((byte*)pDst + (nint)3 * sizeof(crnd_color_quad)), 0, 0, 0, 0);
|
||||
return 3;
|
||||
}
|
||||
|
||||
+9
-8
@@ -7,18 +7,19 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("public: static unsigned int __cdecl crnd::dxt1_block::get_block_colors4(class crnd::color_quad<unsigned char, int> *, unsigned short, unsigned short)")]
|
||||
internal static partial class Get_block_colors4
|
||||
{
|
||||
public unsafe static int Invoke(void* pDst, short color0, short color1)
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke([NativeType("class crnd::color_quad<unsigned char, int> *")] void* pDst, [NativeType("unsigned short")] short color0, [NativeType("unsigned short")] short color1)
|
||||
{
|
||||
crnd_color_quad crnd_color_quad = default(crnd_color_quad);
|
||||
crnd_color_quad crnd_color_quad2 = default(crnd_color_quad);
|
||||
unpack_color_ifs9dpd.Invoke(&crnd_color_quad, color0, scaled: true, 255);
|
||||
unpack_color_ifs9dpd.Invoke(&crnd_color_quad2, color1, scaled: true, 255);
|
||||
_4_color_quad.Invoke(pDst, &crnd_color_quad);
|
||||
crnd_color_quad crnd_color_quad3 = default(crnd_color_quad);
|
||||
unpack_color_gac4s5.Invoke(&crnd_color_quad2, color0, scaled: true, 255);
|
||||
unpack_color_gac4s5.Invoke(&crnd_color_quad3, color1, scaled: true, 255);
|
||||
color_quad_unsigned_char_int_Assignment.Invoke(pDst, &crnd_color_quad2);
|
||||
unchecked
|
||||
{
|
||||
_4_color_quad.Invoke((byte*)pDst + sizeof(crnd_color_quad), &crnd_color_quad2);
|
||||
set.Invoke((byte*)pDst + (nint)2 * sizeof(crnd_color_quad), blue: checked(unchecked((byte)((anon_b9ijpuc*)(&crnd_color_quad.field_0))->field_2) * 2 + unchecked((byte)((anon_b9ijpuc*)(&crnd_color_quad2.field_0))->field_2)) / 3, green: checked(unchecked((byte)((anon_b9ijpuc*)(&crnd_color_quad.field_0))->field_1) * 2 + unchecked((byte)((anon_b9ijpuc*)(&crnd_color_quad2.field_0))->field_1)) / 3, red: checked(unchecked((byte)((anon_b9ijpuc*)(&crnd_color_quad.field_0))->field_0) * 2 + unchecked((byte)((anon_b9ijpuc*)(&crnd_color_quad2.field_0))->field_0)) / 3, alpha: 255);
|
||||
set.Invoke((byte*)pDst + (nint)3 * sizeof(crnd_color_quad), blue: checked(unchecked((byte)((anon_b9ijpuc*)(&crnd_color_quad2.field_0))->field_2) * 2 + unchecked((byte)((anon_b9ijpuc*)(&crnd_color_quad.field_0))->field_2)) / 3, green: checked(unchecked((byte)((anon_b9ijpuc*)(&crnd_color_quad2.field_0))->field_1) * 2 + unchecked((byte)((anon_b9ijpuc*)(&crnd_color_quad.field_0))->field_1)) / 3, red: checked(unchecked((byte)((anon_b9ijpuc*)(&crnd_color_quad2.field_0))->field_0) * 2 + unchecked((byte)((anon_b9ijpuc*)(&crnd_color_quad.field_0))->field_0)) / 3, alpha: 255);
|
||||
color_quad_unsigned_char_int_Assignment.Invoke((byte*)pDst + sizeof(crnd_color_quad), &crnd_color_quad3);
|
||||
set.Invoke((byte*)pDst + (nint)2 * sizeof(crnd_color_quad), blue: checked(unchecked((byte)((anon_m9uqrv*)(&crnd_color_quad2.field))->field_2) * 2 + unchecked((byte)((anon_m9uqrv*)(&crnd_color_quad3.field))->field_2)) / 3, green: checked(unchecked((byte)((anon_m9uqrv*)(&crnd_color_quad2.field))->field_1) * 2 + unchecked((byte)((anon_m9uqrv*)(&crnd_color_quad3.field))->field_1)) / 3, red: checked(unchecked((byte)((anon_m9uqrv*)(&crnd_color_quad2.field))->field_0) * 2 + unchecked((byte)((anon_m9uqrv*)(&crnd_color_quad3.field))->field_0)) / 3, alpha: 255);
|
||||
set.Invoke((byte*)pDst + (nint)3 * sizeof(crnd_color_quad), blue: checked(unchecked((byte)((anon_m9uqrv*)(&crnd_color_quad3.field))->field_2) * 2 + unchecked((byte)((anon_m9uqrv*)(&crnd_color_quad2.field))->field_2)) / 3, green: checked(unchecked((byte)((anon_m9uqrv*)(&crnd_color_quad3.field))->field_1) * 2 + unchecked((byte)((anon_m9uqrv*)(&crnd_color_quad2.field))->field_1)) / 3, red: checked(unchecked((byte)((anon_m9uqrv*)(&crnd_color_quad3.field))->field_0) * 2 + unchecked((byte)((anon_m9uqrv*)(&crnd_color_quad2.field))->field_0)) / 3, alpha: 255);
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?get_block_values6@dxt5_block@crnd@@SAIPEAV?$color_quad@EH@2@II@Z")]
|
||||
[DemangledName("public: static unsigned int __cdecl crnd::dxt5_block::get_block_values6(class crnd::color_quad<unsigned char, int> *, unsigned int, unsigned int)")]
|
||||
[CleanName("Get_block_values6")]
|
||||
internal static partial class Get_block_values6_36ycpg
|
||||
{
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke([NativeType("class crnd::color_quad<unsigned char, int> *")] void* pDst, [NativeType("unsigned int")] int l, [NativeType("unsigned int")] int h)
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)->field))->field_3 = (sbyte)l;
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[1].field))->field_3 = (sbyte)h;
|
||||
sbyte field_ = (sbyte)((uint)(l * 4 + h) / 5u);
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[2L].field))->field_3 = field_;
|
||||
sbyte field_2 = (sbyte)((uint)(l * 3 + h * 2) / 5u);
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[3L].field))->field_3 = field_2;
|
||||
sbyte field_3 = (sbyte)((uint)(l * 2 + h * 3) / 5u);
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[4L].field))->field_3 = field_3;
|
||||
sbyte field_4 = (sbyte)((uint)(l + h * 4) / 5u);
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[5L].field))->field_3 = field_4;
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[6L].field))->field_3 = 0;
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[7L].field))->field_3 = -1;
|
||||
return 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?get_block_values6@dxt5_block@crnd@@SAIPEAV?$color_quad@EH@2@II@Z")]
|
||||
[DemangledName("public: static unsigned int __cdecl crnd::dxt5_block::get_block_values6(class crnd::color_quad<unsigned char, int> *, unsigned int, unsigned int)")]
|
||||
[CleanName("Get_block_values6")]
|
||||
internal static partial class Get_block_values6_7gyjbyc
|
||||
{
|
||||
public unsafe static int Invoke(void* pDst, int l, int h)
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)pDst)->field_0))->field_3 = (sbyte)l;
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)pDst)[1].field_0))->field_3 = (sbyte)h;
|
||||
sbyte field_ = (sbyte)((uint)(l * 4 + h) / 5u);
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)pDst)[2L].field_0))->field_3 = field_;
|
||||
sbyte field_2 = (sbyte)((uint)(l * 3 + h * 2) / 5u);
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)pDst)[3L].field_0))->field_3 = field_2;
|
||||
sbyte field_3 = (sbyte)((uint)(l * 2 + h * 3) / 5u);
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)pDst)[4L].field_0))->field_3 = field_3;
|
||||
sbyte field_4 = (sbyte)((uint)(l + h * 4) / 5u);
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)pDst)[5L].field_0))->field_3 = field_4;
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)pDst)[6L].field_0))->field_3 = 0;
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)pDst)[7L].field_0))->field_3 = -1;
|
||||
return 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -5,9 +5,10 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[MangledName("?get_block_values6@dxt5_block@crnd@@SAIPEAIII@Z")]
|
||||
[DemangledName("public: static unsigned int __cdecl crnd::dxt5_block::get_block_values6(unsigned int *, unsigned int, unsigned int)")]
|
||||
[CleanName("Get_block_values6")]
|
||||
internal static partial class Get_block_values6_5klbycb
|
||||
internal static partial class Get_block_values6_8iwdqp
|
||||
{
|
||||
public unsafe static int Invoke(void* pDst, int l, int h)
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke([NativeType("unsigned int *")] void* pDst, [NativeType("unsigned int")] int l, [NativeType("unsigned int")] int h)
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
+3
-2
@@ -5,9 +5,10 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[MangledName("?get_block_values8@dxt5_block@crnd@@SAIPEAIII@Z")]
|
||||
[DemangledName("public: static unsigned int __cdecl crnd::dxt5_block::get_block_values8(unsigned int *, unsigned int, unsigned int)")]
|
||||
[CleanName("Get_block_values8")]
|
||||
internal static partial class Get_block_values8_ml7jl2d
|
||||
internal static partial class Get_block_values8_9fbjk8
|
||||
{
|
||||
public unsafe static int Invoke(void* pDst, int l, int h)
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke([NativeType("unsigned int *")] void* pDst, [NativeType("unsigned int")] int l, [NativeType("unsigned int")] int h)
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?get_block_values8@dxt5_block@crnd@@SAIPEAV?$color_quad@EH@2@II@Z")]
|
||||
[DemangledName("public: static unsigned int __cdecl crnd::dxt5_block::get_block_values8(class crnd::color_quad<unsigned char, int> *, unsigned int, unsigned int)")]
|
||||
[CleanName("Get_block_values8")]
|
||||
internal static partial class Get_block_values8_ekrbu2
|
||||
{
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke([NativeType("class crnd::color_quad<unsigned char, int> *")] void* pDst, [NativeType("unsigned int")] int l, [NativeType("unsigned int")] int h)
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)->field))->field_3 = (sbyte)l;
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[1].field))->field_3 = (sbyte)h;
|
||||
sbyte field_ = (sbyte)((uint)(l * 6 + h) / 7u);
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[2L].field))->field_3 = field_;
|
||||
sbyte field_2 = (sbyte)((uint)(l * 5 + h * 2) / 7u);
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[3L].field))->field_3 = field_2;
|
||||
sbyte field_3 = (sbyte)((uint)(l * 4 + h * 3) / 7u);
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[4L].field))->field_3 = field_3;
|
||||
sbyte field_4 = (sbyte)((uint)(l * 3 + h * 4) / 7u);
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[5L].field))->field_3 = field_4;
|
||||
sbyte field_5 = (sbyte)((uint)(l * 2 + h * 5) / 7u);
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[6L].field))->field_3 = field_5;
|
||||
sbyte field_6 = (sbyte)((uint)(l + h * 6) / 7u);
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[7L].field))->field_3 = field_6;
|
||||
return 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?get_block_values8@dxt5_block@crnd@@SAIPEAV?$color_quad@EH@2@II@Z")]
|
||||
[DemangledName("public: static unsigned int __cdecl crnd::dxt5_block::get_block_values8(class crnd::color_quad<unsigned char, int> *, unsigned int, unsigned int)")]
|
||||
[CleanName("Get_block_values8")]
|
||||
internal static partial class Get_block_values8_xv25ufa
|
||||
{
|
||||
public unsafe static int Invoke(void* pDst, int l, int h)
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)pDst)->field_0))->field_3 = (sbyte)l;
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)pDst)[1].field_0))->field_3 = (sbyte)h;
|
||||
sbyte field_ = (sbyte)((uint)(l * 6 + h) / 7u);
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)pDst)[2L].field_0))->field_3 = field_;
|
||||
sbyte field_2 = (sbyte)((uint)(l * 5 + h * 2) / 7u);
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)pDst)[3L].field_0))->field_3 = field_2;
|
||||
sbyte field_3 = (sbyte)((uint)(l * 4 + h * 3) / 7u);
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)pDst)[4L].field_0))->field_3 = field_3;
|
||||
sbyte field_4 = (sbyte)((uint)(l * 3 + h * 4) / 7u);
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)pDst)[5L].field_0))->field_3 = field_4;
|
||||
sbyte field_5 = (sbyte)((uint)(l * 2 + h * 5) / 7u);
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)pDst)[6L].field_0))->field_3 = field_5;
|
||||
sbyte field_6 = (sbyte)((uint)(l + h * 6) / 7u);
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)pDst)[7L].field_0))->field_3 = field_6;
|
||||
return 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?get_block_values@dxt5_block@crnd@@SAIPEAIII@Z")]
|
||||
[DemangledName("public: static unsigned int __cdecl crnd::dxt5_block::get_block_values(unsigned int *, unsigned int, unsigned int)")]
|
||||
[CleanName("Get_block_values")]
|
||||
internal static partial class Get_block_values_2npk7qa
|
||||
{
|
||||
public unsafe static int Invoke(void* pDst, int l, int h)
|
||||
{
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
void* ptr = null;
|
||||
num2 = h;
|
||||
num3 = l;
|
||||
ptr = pDst;
|
||||
if (unchecked((uint)num3 > (uint)num2))
|
||||
{
|
||||
return Get_block_values8_ml7jl2d.Invoke(ptr, num3, num2);
|
||||
}
|
||||
return Get_block_values6_5klbycb.Invoke(ptr, num3, num2);
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?get_block_values@dxt5_block@crnd@@SAIPEAV?$color_quad@EH@2@II@Z")]
|
||||
[DemangledName("public: static unsigned int __cdecl crnd::dxt5_block::get_block_values(class crnd::color_quad<unsigned char, int> *, unsigned int, unsigned int)")]
|
||||
[CleanName("Get_block_values")]
|
||||
internal static partial class Get_block_values_d4g83r
|
||||
{
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke([NativeType("class crnd::color_quad<unsigned char, int> *")] void* pDst, [NativeType("unsigned int")] int l, [NativeType("unsigned int")] int h)
|
||||
{
|
||||
if (unchecked((uint)l > (uint)h))
|
||||
{
|
||||
return Get_block_values8_ekrbu2.Invoke(pDst, l, h);
|
||||
}
|
||||
return Get_block_values6_36ycpg.Invoke(pDst, l, h);
|
||||
}
|
||||
}
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?get_block_values@dxt5_block@crnd@@SAIPEAV?$color_quad@EH@2@II@Z")]
|
||||
[DemangledName("public: static unsigned int __cdecl crnd::dxt5_block::get_block_values(class crnd::color_quad<unsigned char, int> *, unsigned int, unsigned int)")]
|
||||
[CleanName("Get_block_values")]
|
||||
internal static partial class Get_block_values_pxz3b9a
|
||||
{
|
||||
public unsafe static int Invoke(void* pDst, int l, int h)
|
||||
{
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
void* ptr = null;
|
||||
num2 = h;
|
||||
num3 = l;
|
||||
ptr = pDst;
|
||||
if (unchecked((uint)num3 > (uint)num2))
|
||||
{
|
||||
return Get_block_values8_xv25ufa.Invoke(ptr, num3, num2);
|
||||
}
|
||||
return Get_block_values6_7gyjbyc.Invoke(ptr, num3, num2);
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?get_block_values@dxt5_block@crnd@@SAIPEAIII@Z")]
|
||||
[DemangledName("public: static unsigned int __cdecl crnd::dxt5_block::get_block_values(unsigned int *, unsigned int, unsigned int)")]
|
||||
[CleanName("Get_block_values")]
|
||||
internal static partial class Get_block_values_u8zixf
|
||||
{
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke([NativeType("unsigned int *")] void* pDst, [NativeType("unsigned int")] int l, [NativeType("unsigned int")] int h)
|
||||
{
|
||||
if (unchecked((uint)l > (uint)h))
|
||||
{
|
||||
return Get_block_values8_9fbjk8.Invoke(pDst, l, h);
|
||||
}
|
||||
return Get_block_values6_8iwdqp.Invoke(pDst, l, h);
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -7,8 +7,9 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("public: void const * __cdecl crnd::crn_unpacker::get_data(void) const")]
|
||||
internal static partial class Get_data
|
||||
{
|
||||
[return: NativeType("void const *")]
|
||||
public unsafe static void* Invoke(void* @this)
|
||||
{
|
||||
return unchecked((crnd_crn_unpacker*)@this)->field_1;
|
||||
return unchecked((crnd_crn_unpacker*)@this)->m_pData;
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -7,8 +7,9 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("public: unsigned int __cdecl crnd::crn_unpacker::get_data_size(void) const")]
|
||||
internal static partial class Get_data_size
|
||||
{
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke(void* @this)
|
||||
{
|
||||
return unchecked((crnd_crn_unpacker*)@this)->field_2;
|
||||
return unchecked((crnd_crn_unpacker*)@this)->m_data_size;
|
||||
}
|
||||
}
|
||||
+7
-16
@@ -8,30 +8,21 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("public: unsigned int __cdecl crnd::prefix_coding::decoder_tables::get_unshifted_max_code(unsigned int) const")]
|
||||
internal static partial class Get_unshifted_max_code
|
||||
{
|
||||
public unsafe static int Invoke(void* @this, int len)
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke(void* @this, [NativeType("unsigned int")] int len)
|
||||
{
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
num2 = len;
|
||||
unchecked
|
||||
{
|
||||
int num4;
|
||||
if ((uint)num2 >= 1u && (uint)num2 <= 16u)
|
||||
if ((uint)len < 1u || (uint)len > 16u)
|
||||
{
|
||||
num4 = -1;
|
||||
crnd_assert.Invoke(String_s4qupc.__pointer, String_vvx8bt.__pointer, 1514);
|
||||
}
|
||||
else
|
||||
{
|
||||
crnd_assert.Invoke(String_ajzw4md.__pointer, String_yguirrd.__pointer, 1514);
|
||||
num4 = 0;
|
||||
}
|
||||
num3 = ((int*)(&((crnd_prefix_coding_decoder_tables*)@this)->field_8))[(uint)(num2 - 1)];
|
||||
if (num3 == 0)
|
||||
int num = ((int*)(&((crnd_prefix_coding_decoder_tables*)@this)->m_max_codes))[(uint)(len - 1)];
|
||||
if (num == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return num3 - 1 >>> 16 - num2;
|
||||
return num - 1 >>> 16 - len;
|
||||
}
|
||||
}
|
||||
}
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.GlobalVariables;
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??A?$vector@E@crnd@@QEBAAEBEI@Z")]
|
||||
[DemangledName("public: unsigned char const & __cdecl crnd::vector<unsigned char>::operator[](unsigned int) const")]
|
||||
[CleanName("Index")]
|
||||
internal static partial class Index_3lowkad
|
||||
{
|
||||
public unsafe static void* Invoke(void* @this, int i)
|
||||
{
|
||||
int num = 0;
|
||||
num = i;
|
||||
unchecked
|
||||
{
|
||||
int num2;
|
||||
if ((uint)num < (uint)((crnd_vector*)@this)->field_1)
|
||||
{
|
||||
num2 = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
crnd_assert.Invoke(String_ededlgd.__pointer, String_yguirrd.__pointer, 586);
|
||||
num2 = 0;
|
||||
}
|
||||
return (byte*)((crnd_vector*)@this)->field_0 + (uint)num;
|
||||
}
|
||||
}
|
||||
}
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.GlobalVariables;
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??A?$vector@E@crnd@@QEAAAEAEI@Z")]
|
||||
[DemangledName("public: unsigned char & __cdecl crnd::vector<unsigned char>::operator[](unsigned int)")]
|
||||
[CleanName("Index")]
|
||||
internal static partial class Index_o39mi9c
|
||||
{
|
||||
public unsafe static void* Invoke(void* @this, int i)
|
||||
{
|
||||
int num = 0;
|
||||
num = i;
|
||||
unchecked
|
||||
{
|
||||
int num2;
|
||||
if ((uint)num < (uint)((crnd_vector*)@this)->field_1)
|
||||
{
|
||||
num2 = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
crnd_assert.Invoke(String_ededlgd.__pointer, String_yguirrd.__pointer, 590);
|
||||
num2 = 0;
|
||||
}
|
||||
return (byte*)((crnd_vector*)@this)->field_0 + (uint)num;
|
||||
}
|
||||
}
|
||||
}
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.GlobalVariables;
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??A?$vector@I@crnd@@QEAAAEAII@Z")]
|
||||
[DemangledName("public: unsigned int & __cdecl crnd::vector<unsigned int>::operator[](unsigned int)")]
|
||||
[CleanName("Index")]
|
||||
internal static partial class Index_rfutjka
|
||||
{
|
||||
public unsafe static void* Invoke(void* @this, int i)
|
||||
{
|
||||
int num = 0;
|
||||
num = i;
|
||||
unchecked
|
||||
{
|
||||
int num2;
|
||||
if ((uint)num < (uint)((crnd_vector_5*)@this)->field_1)
|
||||
{
|
||||
num2 = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
crnd_assert.Invoke(String_ededlgd.__pointer, String_yguirrd.__pointer, 590);
|
||||
num2 = 0;
|
||||
}
|
||||
return (byte*)((crnd_vector_5*)@this)->field_0 + (nint)(uint)num * (nint)4;
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
-38
@@ -8,57 +8,32 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("public: void __cdecl crnd::dxt3_block::set_alpha(unsigned int, unsigned int, unsigned int, bool)")]
|
||||
internal static partial class Set_alpha
|
||||
{
|
||||
public unsafe static void Invoke(void* @this, int x, int y, int value, bool scaled)
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke(void* @this, [NativeType("unsigned int")] int x, [NativeType("unsigned int")] int y, [NativeType("unsigned int")] int value, [NativeType("bool")] bool scaled)
|
||||
{
|
||||
sbyte b = 0;
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
int num4 = 0;
|
||||
int num5 = 0;
|
||||
b = (scaled ? ((sbyte)1) : ((sbyte)0));
|
||||
num = value;
|
||||
num2 = y;
|
||||
num3 = x;
|
||||
sbyte b = (scaled ? ((sbyte)1) : ((sbyte)0));
|
||||
int num = value;
|
||||
unchecked
|
||||
{
|
||||
int num6;
|
||||
if ((uint)num3 < 4u && (uint)num2 < 4u)
|
||||
if ((uint)x >= 4u || (uint)y >= 4u)
|
||||
{
|
||||
num6 = -1;
|
||||
crnd_assert.Invoke(String_jsxkht.__pointer, String_vvx8bt.__pointer, 2831);
|
||||
}
|
||||
else
|
||||
{
|
||||
crnd_assert.Invoke(String_cahur4b.__pointer, String_yguirrd.__pointer, 2831);
|
||||
num6 = 0;
|
||||
}
|
||||
int num8;
|
||||
if ((b & 1) == 1)
|
||||
{
|
||||
int num7;
|
||||
if ((uint)num <= 255u)
|
||||
if ((uint)num > 255u)
|
||||
{
|
||||
num7 = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
crnd_assert.Invoke(String_932ftxa.__pointer, String_yguirrd.__pointer, 2834);
|
||||
num7 = 0;
|
||||
crnd_assert.Invoke(String_exh4qe.__pointer, String_vvx8bt.__pointer, 2834);
|
||||
}
|
||||
num = (int)((uint)(num * 15 + 128) / 255u);
|
||||
}
|
||||
else if ((uint)num <= 15u)
|
||||
else if ((uint)num > 15u)
|
||||
{
|
||||
num8 = -1;
|
||||
crnd_assert.Invoke(String_sg8vgw.__pointer, String_vvx8bt.__pointer, 2837);
|
||||
}
|
||||
else
|
||||
{
|
||||
crnd_assert.Invoke(String_azii4xc.__pointer, String_yguirrd.__pointer, 2837);
|
||||
num8 = 0;
|
||||
}
|
||||
num4 = (num2 << 1) + (num3 >>> 1);
|
||||
num5 = (byte)((sbyte*)(&((crnd_dxt3_block*)@this)->field_0))[(uint)num4];
|
||||
((sbyte*)(&((crnd_dxt3_block*)@this)->field_0))[(uint)num4] = (sbyte)((num5 & ((15 << ((num3 & 1) << 2)) ^ -1)) | (num << ((num3 & 1) << 2)));
|
||||
int num2 = (y << 1) + (x >>> 1);
|
||||
int num3 = (byte)((sbyte*)(&((crnd_dxt3_block*)@this)->m_alpha))[(uint)num2];
|
||||
((sbyte*)(&((crnd_dxt3_block*)@this)->m_alpha))[(uint)num2] = (sbyte)((num3 & ((15 << ((x & 1) << 2)) ^ -1)) | (num << ((x & 1) << 2)));
|
||||
}
|
||||
}
|
||||
}
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??4?$color_quad@EH@crnd@@QEAAAEAV01@AEBV01@@Z")]
|
||||
[DemangledName("public: class crnd::color_quad<unsigned char, int> & __cdecl crnd::color_quad<unsigned char, int>::operator=(class crnd::color_quad<unsigned char, int> const &)")]
|
||||
internal static partial class _4_color_quad
|
||||
{
|
||||
public unsafe static void* Invoke(void* @this, void* other)
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
sbyte field_ = ((anon_b9ijpuc*)(&((crnd_color_quad*)other)->field_0))->field_0;
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)@this)->field_0))->field_0 = field_;
|
||||
sbyte field_2 = ((anon_b9ijpuc*)(&((crnd_color_quad*)other)->field_0))->field_1;
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)@this)->field_0))->field_1 = field_2;
|
||||
sbyte field_3 = ((anon_b9ijpuc*)(&((crnd_color_quad*)other)->field_0))->field_2;
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)@this)->field_0))->field_2 = field_3;
|
||||
sbyte field_4 = ((anon_b9ijpuc*)(&((crnd_color_quad*)other)->field_0))->field_3;
|
||||
((anon_b9ijpuc*)(&((crnd_color_quad*)@this)->field_0))->field_3 = field_4;
|
||||
return @this;
|
||||
}
|
||||
}
|
||||
}
|
||||
-71
@@ -1,71 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Intrinsics.Implemented;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??4decoder_tables@prefix_coding@crnd@@QEAAAEAV012@AEBV012@@Z")]
|
||||
[DemangledName("public: class crnd::prefix_coding::decoder_tables & __cdecl crnd::prefix_coding::decoder_tables::operator=(class crnd::prefix_coding::decoder_tables const &)")]
|
||||
internal static partial class _4decoder_tables
|
||||
{
|
||||
private partial struct LocalVariables
|
||||
{
|
||||
public unsafe void* field_0;
|
||||
|
||||
public unsafe void* field_1;
|
||||
}
|
||||
|
||||
public unsafe static void* Invoke(void* @this, void* other)
|
||||
{
|
||||
StackFrame startFrame = StackFrameList.Current.New<LocalVariables>();
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = null;
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_1 = null;
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_1 = other;
|
||||
unchecked
|
||||
{
|
||||
if (@this == startFrame.GetLocalsPointer<LocalVariables>()->field_1)
|
||||
{
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = @this;
|
||||
}
|
||||
else
|
||||
{
|
||||
clear_ie5thac.Invoke(@this);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
llvm_memcpy_p0_p0_i64.Invoke(@this, startFrame.GetLocalsPointer<LocalVariables>()->field_1, 192L, isVolatile: false);
|
||||
if (((crnd_prefix_coding_decoder_tables*)startFrame.GetLocalsPointer<LocalVariables>()->field_1)->field_11 != null)
|
||||
{
|
||||
void* field_ = crnd_new_array_linsntd.Invoke(((crnd_prefix_coding_decoder_tables*)@this)->field_10);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
((crnd_prefix_coding_decoder_tables*)@this)->field_11 = field_;
|
||||
if (((crnd_prefix_coding_decoder_tables*)@this)->field_11 != null)
|
||||
{
|
||||
llvm_memcpy_p0_p0_i64.Invoke(((crnd_prefix_coding_decoder_tables*)@this)->field_11, ((crnd_prefix_coding_decoder_tables*)startFrame.GetLocalsPointer<LocalVariables>()->field_1)->field_11, 4L * (long)(uint)((crnd_prefix_coding_decoder_tables*)@this)->field_10, isVolatile: false);
|
||||
}
|
||||
}
|
||||
if (((crnd_prefix_coding_decoder_tables*)startFrame.GetLocalsPointer<LocalVariables>()->field_1)->field_13 != null)
|
||||
{
|
||||
void* field_2 = crnd_new_array_ovofsdb.Invoke(((crnd_prefix_coding_decoder_tables*)@this)->field_12);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
((crnd_prefix_coding_decoder_tables*)@this)->field_13 = field_2;
|
||||
if (((crnd_prefix_coding_decoder_tables*)@this)->field_13 != null)
|
||||
{
|
||||
llvm_memcpy_p0_p0_i64.Invoke(((crnd_prefix_coding_decoder_tables*)@this)->field_13, ((crnd_prefix_coding_decoder_tables*)startFrame.GetLocalsPointer<LocalVariables>()->field_1)->field_13, 2L * (long)(uint)((crnd_prefix_coding_decoder_tables*)@this)->field_12, isVolatile: false);
|
||||
}
|
||||
}
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = @this;
|
||||
}
|
||||
void* field_3 = startFrame.GetLocalsPointer<LocalVariables>()->field_0;
|
||||
StackFrameList.Current.Clear(startFrame);
|
||||
return field_3;
|
||||
}
|
||||
}
|
||||
}
|
||||
-85
@@ -1,85 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??4static_huffman_data_model@crnd@@QEAAAEAV01@AEBV01@@Z")]
|
||||
[DemangledName("public: class crnd::static_huffman_data_model & __cdecl crnd::static_huffman_data_model::operator=(class crnd::static_huffman_data_model const &)")]
|
||||
internal static partial class _4static_huffman_data_model
|
||||
{
|
||||
private partial struct LocalVariables
|
||||
{
|
||||
public unsafe void* field_0;
|
||||
|
||||
public unsafe void* field_1;
|
||||
}
|
||||
|
||||
public unsafe static void* Invoke(void* @this, void* rhs)
|
||||
{
|
||||
StackFrame startFrame = StackFrameList.Current.New<LocalVariables>();
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = null;
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_1 = null;
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_1 = rhs;
|
||||
unchecked
|
||||
{
|
||||
if (@this == startFrame.GetLocalsPointer<LocalVariables>()->field_1)
|
||||
{
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = @this;
|
||||
}
|
||||
else
|
||||
{
|
||||
((crnd_static_huffman_data_model*)@this)->field_0 = ((crnd_static_huffman_data_model*)startFrame.GetLocalsPointer<LocalVariables>()->field_1)->field_0;
|
||||
_4_vector.Invoke(other: &((crnd_static_huffman_data_model*)startFrame.GetLocalsPointer<LocalVariables>()->field_1)->field_1, @this: &((crnd_static_huffman_data_model*)@this)->field_1);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if (Get_alloc_failed.Invoke(&((crnd_static_huffman_data_model*)@this)->field_1))
|
||||
{
|
||||
clear_egw7ktb.Invoke(@this);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = @this;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (((crnd_static_huffman_data_model*)startFrame.GetLocalsPointer<LocalVariables>()->field_1)->field_2 != null)
|
||||
{
|
||||
if (((crnd_static_huffman_data_model*)@this)->field_2 != null)
|
||||
{
|
||||
_4decoder_tables.Invoke(other: ((crnd_static_huffman_data_model*)startFrame.GetLocalsPointer<LocalVariables>()->field_1)->field_2, @this: ((crnd_static_huffman_data_model*)@this)->field_2);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
void* field_ = crnd_new_vzd3zqa.Invoke(((crnd_static_huffman_data_model*)startFrame.GetLocalsPointer<LocalVariables>()->field_1)->field_2);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
((crnd_static_huffman_data_model*)@this)->field_2 = field_;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
crnd_delete_rldcmnc.Invoke(((crnd_static_huffman_data_model*)@this)->field_2);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
((crnd_static_huffman_data_model*)@this)->field_2 = null;
|
||||
}
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = @this;
|
||||
}
|
||||
}
|
||||
void* field_2 = startFrame.GetLocalsPointer<LocalVariables>()->field_0;
|
||||
StackFrameList.Current.Clear(startFrame);
|
||||
return field_2;
|
||||
}
|
||||
}
|
||||
}
|
||||
+25
-44
@@ -8,62 +8,43 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("public: bool __cdecl crnd::vector<unsigned char>::assign(class crnd::vector<unsigned char> const &)")]
|
||||
internal static partial class assign
|
||||
{
|
||||
private partial struct LocalVariables
|
||||
[return: NativeType("bool")]
|
||||
public unsafe static bool Invoke(void* @this, [NativeType("class crnd::vector<unsigned char> const &")] void* other)
|
||||
{
|
||||
public bool field_0;
|
||||
|
||||
public unsafe void* field_1;
|
||||
}
|
||||
|
||||
public unsafe static bool Invoke(void* @this, void* other)
|
||||
{
|
||||
StackFrame startFrame = StackFrameList.Current.New<LocalVariables>();
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = false;
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_1 = null;
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_1 = other;
|
||||
if (@this == other)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
unchecked
|
||||
{
|
||||
if (@this == startFrame.GetLocalsPointer<LocalVariables>()->field_1)
|
||||
if (((crnd_vector_uksit8*)@this)->m_capacity == ((crnd_vector_uksit8*)other)->m_size)
|
||||
{
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = true;
|
||||
resize_zpvfc7.Invoke(@this, 0);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (((crnd_vector*)@this)->field_2 == ((crnd_vector*)startFrame.GetLocalsPointer<LocalVariables>()->field_1)->field_1)
|
||||
clear_mzsqxg.Invoke(@this);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
resize_rzzl5xd.Invoke(@this, 0);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else
|
||||
bool flag = increase_capacity_2iysmi.Invoke(@this, ((crnd_vector_uksit8*)other)->m_size, grow_hint: false);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
clear_q4odfmb.Invoke(@this);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bool flag = increase_capacity_a7boycc.Invoke(@this, ((crnd_vector*)startFrame.GetLocalsPointer<LocalVariables>()->field_1)->field_1, grow_hint: false);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!flag)
|
||||
{
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = false;
|
||||
goto IL_014e;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!flag)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
llvm_memcpy_p0_p0_i64.Invoke(((crnd_vector*)@this)->field_0, ((crnd_vector*)startFrame.GetLocalsPointer<LocalVariables>()->field_1)->field_0, (long)(uint)((crnd_vector*)startFrame.GetLocalsPointer<LocalVariables>()->field_1)->field_1 * 1L, isVolatile: false);
|
||||
((crnd_vector*)@this)->field_1 = ((crnd_vector*)startFrame.GetLocalsPointer<LocalVariables>()->field_1)->field_1;
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = true;
|
||||
}
|
||||
goto IL_014e;
|
||||
llvm_memcpy_p0_p0_i64.Invoke(((crnd_vector_uksit8*)@this)->m_p, ((crnd_vector_uksit8*)other)->m_p, (long)(uint)((crnd_vector_uksit8*)other)->m_size * 1L, isVolatile: false);
|
||||
((crnd_vector_uksit8*)@this)->m_size = ((crnd_vector_uksit8*)other)->m_size;
|
||||
return true;
|
||||
}
|
||||
IL_014e:
|
||||
bool field_ = startFrame.GetLocalsPointer<LocalVariables>()->field_0;
|
||||
StackFrameList.Current.Clear(startFrame);
|
||||
return field_;
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -7,8 +7,9 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("public: unsigned short * __cdecl crnd::vector<unsigned short>::begin(void)")]
|
||||
internal static partial class begin
|
||||
{
|
||||
[return: NativeType("unsigned short *")]
|
||||
public unsafe static void* Invoke(void* @this)
|
||||
{
|
||||
return unchecked((crnd_vector_8*)@this)->field_0;
|
||||
return unchecked((crnd_vector_h6df48*)@this)->m_p;
|
||||
}
|
||||
}
|
||||
+6
-8
@@ -6,19 +6,17 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("unsigned int __cdecl crnd::math::ceil_log2i(unsigned int)")]
|
||||
internal static partial class ceil_log2i
|
||||
{
|
||||
public static int Invoke(int v)
|
||||
[return: NativeType("unsigned int")]
|
||||
public static int Invoke([NativeType("unsigned int")] int v)
|
||||
{
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
num = v;
|
||||
num2 = floor_log2i.Invoke(num);
|
||||
int num = floor_log2i.Invoke(v);
|
||||
unchecked
|
||||
{
|
||||
if (num2 != 32 && (uint)num > (uint)(1 << num2))
|
||||
if (num != 32 && (uint)v > (uint)(1 << num))
|
||||
{
|
||||
num2++;
|
||||
num++;
|
||||
}
|
||||
return num2;
|
||||
return num;
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
-7
@@ -6,19 +6,17 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("private: static int __cdecl crnd::color_quad<unsigned char, int>::clamp(int)")]
|
||||
internal static partial class clamp
|
||||
{
|
||||
public static int Invoke(int v)
|
||||
[return: NativeType("int")]
|
||||
public static int Invoke([NativeType("int")] int v)
|
||||
{
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
num2 = v;
|
||||
if (num2 < 0)
|
||||
if (v < 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (num2 > 255)
|
||||
if (v > 255)
|
||||
{
|
||||
return 255;
|
||||
}
|
||||
return num2;
|
||||
return v;
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?clear@?$vector@I@crnd@@QEAAXXZ")]
|
||||
[DemangledName("public: void __cdecl crnd::vector<unsigned int>::clear(void)")]
|
||||
[CleanName("clear")]
|
||||
internal static partial class clear_2hj7fd
|
||||
{
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke(void* @this)
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
if (((crnd_vector_rgfndh*)@this)->m_p != null)
|
||||
{
|
||||
destruct_array_h4d2m4.Invoke(parameter_1: ((crnd_vector_rgfndh*)@this)->m_size, parameter_0: ((crnd_vector_rgfndh*)@this)->m_p);
|
||||
crnd_free.Invoke(((crnd_vector_rgfndh*)@this)->m_p);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
((crnd_vector_rgfndh*)@this)->m_p = null;
|
||||
((crnd_vector_rgfndh*)@this)->m_size = 0;
|
||||
((crnd_vector_rgfndh*)@this)->m_capacity = 0;
|
||||
}
|
||||
((crnd_vector_rgfndh*)@this)->m_alloc_failed = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?clear@static_huffman_data_model@crnd@@QEAAXXZ")]
|
||||
[DemangledName("public: void __cdecl crnd::static_huffman_data_model::clear(void)")]
|
||||
[CleanName("clear")]
|
||||
internal static partial class clear_9udjtr
|
||||
{
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke(void* @this)
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
((crnd_static_huffman_data_model*)@this)->m_total_syms = 0;
|
||||
clear_mzsqxg.Invoke(&((crnd_static_huffman_data_model*)@this)->m_code_sizes);
|
||||
if (ExceptionInfo.Current == null && ((crnd_static_huffman_data_model*)@this)->m_pDecode_tables != null)
|
||||
{
|
||||
crnd_delete_bvucig.Invoke(((crnd_static_huffman_data_model*)@this)->m_pDecode_tables);
|
||||
if (ExceptionInfo.Current == null)
|
||||
{
|
||||
((crnd_static_huffman_data_model*)@this)->m_pDecode_tables = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?clear@?$vector@G@crnd@@QEAAXXZ")]
|
||||
[DemangledName("public: void __cdecl crnd::vector<unsigned short>::clear(void)")]
|
||||
[CleanName("clear")]
|
||||
internal static partial class clear_bqconyd
|
||||
{
|
||||
private partial struct LocalVariables
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe static void Invoke(void* @this)
|
||||
{
|
||||
StackFrame startFrame = StackFrameList.Current.New<LocalVariables>();
|
||||
unchecked
|
||||
{
|
||||
if (((crnd_vector_8*)@this)->field_0 != null)
|
||||
{
|
||||
destruct_array_l9jmj2b.Invoke(parameter_1: ((crnd_vector_8*)@this)->field_1, parameter_0: ((crnd_vector_8*)@this)->field_0);
|
||||
crnd_free.Invoke(((crnd_vector_8*)@this)->field_0);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
((crnd_vector_8*)@this)->field_0 = null;
|
||||
((crnd_vector_8*)@this)->field_1 = 0;
|
||||
((crnd_vector_8*)@this)->field_2 = 0;
|
||||
}
|
||||
((crnd_vector_8*)@this)->field_3 = 0;
|
||||
StackFrameList.Current.Clear(startFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?clear@static_huffman_data_model@crnd@@QEAAXXZ")]
|
||||
[DemangledName("public: void __cdecl crnd::static_huffman_data_model::clear(void)")]
|
||||
[CleanName("clear")]
|
||||
internal static partial class clear_egw7ktb
|
||||
{
|
||||
private partial struct LocalVariables
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe static void Invoke(void* @this)
|
||||
{
|
||||
StackFrame startFrame = StackFrameList.Current.New<LocalVariables>();
|
||||
unchecked
|
||||
{
|
||||
((crnd_static_huffman_data_model*)@this)->field_0 = 0;
|
||||
clear_q4odfmb.Invoke(&((crnd_static_huffman_data_model*)@this)->field_1);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (((crnd_static_huffman_data_model*)@this)->field_2 != null)
|
||||
{
|
||||
crnd_delete_rldcmnc.Invoke(((crnd_static_huffman_data_model*)@this)->field_2);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
((crnd_static_huffman_data_model*)@this)->field_2 = null;
|
||||
}
|
||||
StackFrameList.Current.Clear(startFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?clear@?$vector@Ublock_buffer_element@crn_unpacker@crnd@@@crnd@@QEAAXXZ")]
|
||||
[DemangledName("public: void __cdecl crnd::vector<struct crnd::crn_unpacker::block_buffer_element>::clear(void)")]
|
||||
[CleanName("clear")]
|
||||
internal static partial class clear_hv5vjw
|
||||
{
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke(void* @this)
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
if (((crnd_vector_v4kyxs*)@this)->m_p != null)
|
||||
{
|
||||
destruct_array_5dg5zj.Invoke(n: ((crnd_vector_v4kyxs*)@this)->m_size, p: ((crnd_vector_v4kyxs*)@this)->m_p);
|
||||
crnd_free.Invoke(((crnd_vector_v4kyxs*)@this)->m_p);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
((crnd_vector_v4kyxs*)@this)->m_p = null;
|
||||
((crnd_vector_v4kyxs*)@this)->m_size = 0;
|
||||
((crnd_vector_v4kyxs*)@this)->m_capacity = 0;
|
||||
}
|
||||
((crnd_vector_v4kyxs*)@this)->m_alloc_failed = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
-43
@@ -1,43 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?clear@decoder_tables@prefix_coding@crnd@@QEAAXXZ")]
|
||||
[DemangledName("public: void __cdecl crnd::prefix_coding::decoder_tables::clear(void)")]
|
||||
[CleanName("clear")]
|
||||
internal static partial class clear_ie5thac
|
||||
{
|
||||
private partial struct LocalVariables
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe static void Invoke(void* @this)
|
||||
{
|
||||
StackFrame startFrame = StackFrameList.Current.New<LocalVariables>();
|
||||
unchecked
|
||||
{
|
||||
if (((crnd_prefix_coding_decoder_tables*)@this)->field_11 != null)
|
||||
{
|
||||
crnd_delete_array_nughn5d.Invoke(((crnd_prefix_coding_decoder_tables*)@this)->field_11);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
((crnd_prefix_coding_decoder_tables*)@this)->field_11 = null;
|
||||
((crnd_prefix_coding_decoder_tables*)@this)->field_10 = 0;
|
||||
}
|
||||
if (((crnd_prefix_coding_decoder_tables*)@this)->field_13 != null)
|
||||
{
|
||||
crnd_delete_array_rytswyc.Invoke(((crnd_prefix_coding_decoder_tables*)@this)->field_13);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
((crnd_prefix_coding_decoder_tables*)@this)->field_13 = null;
|
||||
((crnd_prefix_coding_decoder_tables*)@this)->field_12 = 0;
|
||||
}
|
||||
StackFrameList.Current.Clear(startFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?clear@?$vector@G@crnd@@QEAAXXZ")]
|
||||
[DemangledName("public: void __cdecl crnd::vector<unsigned short>::clear(void)")]
|
||||
[CleanName("clear")]
|
||||
internal static partial class clear_isy3cf
|
||||
{
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke(void* @this)
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
if (((crnd_vector_h6df48*)@this)->m_p != null)
|
||||
{
|
||||
destruct_array_93njbe.Invoke(parameter_1: ((crnd_vector_h6df48*)@this)->m_size, parameter_0: ((crnd_vector_h6df48*)@this)->m_p);
|
||||
crnd_free.Invoke(((crnd_vector_h6df48*)@this)->m_p);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
((crnd_vector_h6df48*)@this)->m_p = null;
|
||||
((crnd_vector_h6df48*)@this)->m_size = 0;
|
||||
((crnd_vector_h6df48*)@this)->m_capacity = 0;
|
||||
}
|
||||
((crnd_vector_h6df48*)@this)->m_alloc_failed = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?clear@?$vector@Ublock_buffer_element@crn_unpacker@crnd@@@crnd@@QEAAXXZ")]
|
||||
[DemangledName("public: void __cdecl crnd::vector<struct crnd::crn_unpacker::block_buffer_element>::clear(void)")]
|
||||
[CleanName("clear")]
|
||||
internal static partial class clear_jenxxsd
|
||||
{
|
||||
private partial struct LocalVariables
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe static void Invoke(void* @this)
|
||||
{
|
||||
StackFrame startFrame = StackFrameList.Current.New<LocalVariables>();
|
||||
unchecked
|
||||
{
|
||||
if (((crnd_vector_11*)@this)->field_0 != null)
|
||||
{
|
||||
destruct_array_h3fegud.Invoke(n: ((crnd_vector_11*)@this)->field_1, p: ((crnd_vector_11*)@this)->field_0);
|
||||
crnd_free.Invoke(((crnd_vector_11*)@this)->field_0);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
((crnd_vector_11*)@this)->field_0 = null;
|
||||
((crnd_vector_11*)@this)->field_1 = 0;
|
||||
((crnd_vector_11*)@this)->field_2 = 0;
|
||||
}
|
||||
((crnd_vector_11*)@this)->field_3 = 0;
|
||||
StackFrameList.Current.Clear(startFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?clear@?$vector@E@crnd@@QEAAXXZ")]
|
||||
[DemangledName("public: void __cdecl crnd::vector<unsigned char>::clear(void)")]
|
||||
[CleanName("clear")]
|
||||
internal static partial class clear_mzsqxg
|
||||
{
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke(void* @this)
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
if (((crnd_vector_uksit8*)@this)->m_p != null)
|
||||
{
|
||||
destruct_array_s3iq3j.Invoke(parameter_1: ((crnd_vector_uksit8*)@this)->m_size, parameter_0: ((crnd_vector_uksit8*)@this)->m_p);
|
||||
crnd_free.Invoke(((crnd_vector_uksit8*)@this)->m_p);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
((crnd_vector_uksit8*)@this)->m_p = null;
|
||||
((crnd_vector_uksit8*)@this)->m_size = 0;
|
||||
((crnd_vector_uksit8*)@this)->m_capacity = 0;
|
||||
}
|
||||
((crnd_vector_uksit8*)@this)->m_alloc_failed = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?clear@?$vector@E@crnd@@QEAAXXZ")]
|
||||
[DemangledName("public: void __cdecl crnd::vector<unsigned char>::clear(void)")]
|
||||
[CleanName("clear")]
|
||||
internal static partial class clear_q4odfmb
|
||||
{
|
||||
private partial struct LocalVariables
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe static void Invoke(void* @this)
|
||||
{
|
||||
StackFrame startFrame = StackFrameList.Current.New<LocalVariables>();
|
||||
unchecked
|
||||
{
|
||||
if (((crnd_vector*)@this)->field_0 != null)
|
||||
{
|
||||
destruct_array_dhbxund.Invoke(parameter_1: ((crnd_vector*)@this)->field_1, parameter_0: ((crnd_vector*)@this)->field_0);
|
||||
crnd_free.Invoke(((crnd_vector*)@this)->field_0);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
((crnd_vector*)@this)->field_0 = null;
|
||||
((crnd_vector*)@this)->field_1 = 0;
|
||||
((crnd_vector*)@this)->field_2 = 0;
|
||||
}
|
||||
((crnd_vector*)@this)->field_3 = 0;
|
||||
StackFrameList.Current.Clear(startFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?clear@?$vector@I@crnd@@QEAAXXZ")]
|
||||
[DemangledName("public: void __cdecl crnd::vector<unsigned int>::clear(void)")]
|
||||
[CleanName("clear")]
|
||||
internal static partial class clear_utei2oa
|
||||
{
|
||||
private partial struct LocalVariables
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe static void Invoke(void* @this)
|
||||
{
|
||||
StackFrame startFrame = StackFrameList.Current.New<LocalVariables>();
|
||||
unchecked
|
||||
{
|
||||
if (((crnd_vector_5*)@this)->field_0 != null)
|
||||
{
|
||||
destruct_array_rsqiwgc.Invoke(parameter_1: ((crnd_vector_5*)@this)->field_1, parameter_0: ((crnd_vector_5*)@this)->field_0);
|
||||
crnd_free.Invoke(((crnd_vector_5*)@this)->field_0);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
((crnd_vector_5*)@this)->field_0 = null;
|
||||
((crnd_vector_5*)@this)->field_1 = 0;
|
||||
((crnd_vector_5*)@this)->field_2 = 0;
|
||||
}
|
||||
((crnd_vector_5*)@this)->field_3 = 0;
|
||||
StackFrameList.Current.Clear(startFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("?clear@decoder_tables@prefix_coding@crnd@@QEAAXXZ")]
|
||||
[DemangledName("public: void __cdecl crnd::prefix_coding::decoder_tables::clear(void)")]
|
||||
[CleanName("clear")]
|
||||
internal static partial class clear_v2azth
|
||||
{
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke(void* @this)
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
if (((crnd_prefix_coding_decoder_tables*)@this)->m_lookup != null)
|
||||
{
|
||||
crnd_delete_array_wgct9q.Invoke(((crnd_prefix_coding_decoder_tables*)@this)->m_lookup);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
((crnd_prefix_coding_decoder_tables*)@this)->m_lookup = null;
|
||||
((crnd_prefix_coding_decoder_tables*)@this)->m_cur_lookup_size = 0;
|
||||
}
|
||||
if (((crnd_prefix_coding_decoder_tables*)@this)->m_sorted_symbol_order != null)
|
||||
{
|
||||
crnd_delete_array_yym6az.Invoke(((crnd_prefix_coding_decoder_tables*)@this)->m_sorted_symbol_order);
|
||||
if (ExceptionInfo.Current == null)
|
||||
{
|
||||
((crnd_prefix_coding_decoder_tables*)@this)->m_sorted_symbol_order = null;
|
||||
((crnd_prefix_coding_decoder_tables*)@this)->m_cur_sorted_symbol_order_size = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??4?$color_quad@EH@crnd@@QEAAAEAV01@AEBV01@@Z")]
|
||||
[DemangledName("public: class crnd::color_quad<unsigned char, int> & __cdecl crnd::color_quad<unsigned char, int>::operator=(class crnd::color_quad<unsigned char, int> const &)")]
|
||||
internal static partial class color_quad_unsigned_char_int_Assignment
|
||||
{
|
||||
[return: NativeType("class crnd::color_quad<unsigned char, int> &")]
|
||||
public unsafe static void* Invoke(void* @this, [NativeType("class crnd::color_quad<unsigned char, int> const &")] void* other)
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
sbyte field_ = ((anon_m9uqrv*)(&((crnd_color_quad*)other)->field))->field_0;
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)@this)->field))->field_0 = field_;
|
||||
sbyte field_2 = ((anon_m9uqrv*)(&((crnd_color_quad*)other)->field))->field_1;
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)@this)->field))->field_1 = field_2;
|
||||
sbyte field_3 = ((anon_m9uqrv*)(&((crnd_color_quad*)other)->field))->field_2;
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)@this)->field))->field_2 = field_3;
|
||||
sbyte field_4 = ((anon_m9uqrv*)(&((crnd_color_quad*)other)->field))->field_3;
|
||||
((anon_m9uqrv*)(&((crnd_color_quad*)@this)->field))->field_3 = field_4;
|
||||
return @this;
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -6,7 +6,7 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("public: __cdecl crnd::color_quad<unsigned char, int>::color_quad<unsigned char, int>(int, int, int, int)")]
|
||||
internal static partial class color_quad_unsigned_char_int_Constructor
|
||||
{
|
||||
public unsafe static void* Invoke(void* @this, int red, int green, int blue, int alpha)
|
||||
public unsafe static void* Invoke(void* @this, [NativeType("int")] int red, [NativeType("int")] int green, [NativeType("int")] int blue, [NativeType("int")] int alpha)
|
||||
{
|
||||
set.Invoke(@this, red, green, blue, alpha);
|
||||
return @this;
|
||||
|
||||
+5
-5
@@ -7,17 +7,17 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("private: unsigned int __cdecl crnd::static_huffman_data_model::compute_decoder_table_bits(void) const")]
|
||||
internal static partial class compute_decoder_table_bits
|
||||
{
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke(void* @this)
|
||||
{
|
||||
int num = 0;
|
||||
num = 0;
|
||||
int result = 0;
|
||||
unchecked
|
||||
{
|
||||
if ((uint)((crnd_static_huffman_data_model*)@this)->field_0 > 16u)
|
||||
if ((uint)((crnd_static_huffman_data_model*)@this)->m_total_syms > 16u)
|
||||
{
|
||||
num = (byte)(sbyte)minimum.Invoke(1 + ceil_log2i.Invoke(((crnd_static_huffman_data_model*)@this)->field_0), 11);
|
||||
result = (byte)(sbyte)minimum.Invoke(1 + ceil_log2i.Invoke(((crnd_static_huffman_data_model*)@this)->m_total_syms), 11);
|
||||
}
|
||||
return num;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
-13
@@ -6,28 +6,25 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("unsigned int __cdecl crnd::utils::compute_max_mips(unsigned int, unsigned int)")]
|
||||
internal static partial class compute_max_mips
|
||||
{
|
||||
public static int Invoke(int width, int height)
|
||||
[return: NativeType("unsigned int")]
|
||||
public static int Invoke([NativeType("unsigned int")] int width, [NativeType("unsigned int")] int height)
|
||||
{
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
int num4 = 0;
|
||||
num2 = height;
|
||||
num3 = width;
|
||||
if ((num3 | num2) == 0)
|
||||
int num = height;
|
||||
int num2 = width;
|
||||
if ((num2 | num) == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
num4 = 1;
|
||||
int num3 = 1;
|
||||
unchecked
|
||||
{
|
||||
while (((uint)num3 <= 1u) ? ((uint)num2 > 1u) : true)
|
||||
while (((uint)num2 <= 1u) ? ((uint)num > 1u) : true)
|
||||
{
|
||||
num3 >>>= 1;
|
||||
num2 >>>= 1;
|
||||
num4++;
|
||||
num >>>= 1;
|
||||
num3++;
|
||||
}
|
||||
return num4;
|
||||
return num3;
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -6,9 +6,10 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[MangledName("?construct_array@?$scalar_type@G@crnd@@SAXPEAGI@Z")]
|
||||
[DemangledName("public: static void __cdecl crnd::scalar_type<unsigned short>::construct_array(unsigned short *, unsigned int)")]
|
||||
[CleanName("construct_array")]
|
||||
internal static partial class construct_array_gqnztta
|
||||
internal static partial class construct_array_2cauua
|
||||
{
|
||||
public unsafe static void Invoke(void* p, int n)
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke([NativeType("unsigned short *")] void* p, [NativeType("unsigned int")] int n)
|
||||
{
|
||||
llvm_memset_p0_i64.Invoke(p, 0, unchecked(2L * (long)(uint)n), isVolatile: false);
|
||||
}
|
||||
+3
-2
@@ -6,9 +6,10 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[MangledName("?construct_array@?$scalar_type@I@crnd@@SAXPEAII@Z")]
|
||||
[DemangledName("public: static void __cdecl crnd::scalar_type<unsigned int>::construct_array(unsigned int *, unsigned int)")]
|
||||
[CleanName("construct_array")]
|
||||
internal static partial class construct_array_45u5mpd
|
||||
internal static partial class construct_array_5nd2vv
|
||||
{
|
||||
public unsafe static void Invoke(void* p, int n)
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke([NativeType("unsigned int *")] void* p, [NativeType("unsigned int")] int n)
|
||||
{
|
||||
llvm_memset_p0_i64.Invoke(p, 0, unchecked(4L * (long)(uint)n), isVolatile: false);
|
||||
}
|
||||
+5
-6
@@ -6,16 +6,15 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[MangledName("??$construct_array@Ublock_buffer_element@crn_unpacker@crnd@@@helpers@crnd@@YAXPEAUblock_buffer_element@crn_unpacker@1@I@Z")]
|
||||
[DemangledName("void __cdecl crnd::helpers::construct_array<struct crnd::crn_unpacker::block_buffer_element>(struct crnd::crn_unpacker::block_buffer_element *, unsigned int)")]
|
||||
[CleanName("construct_array")]
|
||||
internal static partial class construct_array_f9hrzwd
|
||||
internal static partial class construct_array_69zh62
|
||||
{
|
||||
public unsafe static void Invoke(void* p, int n)
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke([NativeType("struct crnd::crn_unpacker::block_buffer_element *")] void* p, [NativeType("unsigned int")] int n)
|
||||
{
|
||||
void* ptr = null;
|
||||
void* ptr2 = null;
|
||||
ptr = p;
|
||||
void* ptr = p;
|
||||
unchecked
|
||||
{
|
||||
for (ptr2 = (byte*)ptr + (nint)(uint)n * (nint)sizeof(crnd_crn_unpacker_block_buffer_element); ptr != ptr2; ptr = (byte*)ptr + sizeof(crnd_crn_unpacker_block_buffer_element))
|
||||
for (void* ptr2 = (byte*)ptr + (nint)(uint)n * (nint)sizeof(crnd_crn_unpacker_block_buffer_element); ptr != ptr2; ptr = (byte*)ptr + sizeof(crnd_crn_unpacker_block_buffer_element))
|
||||
{
|
||||
}
|
||||
}
|
||||
+5
-6
@@ -5,16 +5,15 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[MangledName("??$construct_array@I@helpers@crnd@@YAXPEAII@Z")]
|
||||
[DemangledName("void __cdecl crnd::helpers::construct_array<unsigned int>(unsigned int *, unsigned int)")]
|
||||
[CleanName("construct_array")]
|
||||
internal static partial class construct_array_rijpqya
|
||||
internal static partial class construct_array_7hpyj8
|
||||
{
|
||||
public unsafe static void Invoke(void* p, int n)
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke([NativeType("unsigned int *")] void* p, [NativeType("unsigned int")] int n)
|
||||
{
|
||||
void* ptr = null;
|
||||
void* ptr2 = null;
|
||||
ptr = p;
|
||||
void* ptr = p;
|
||||
unchecked
|
||||
{
|
||||
for (ptr2 = (byte*)ptr + (nint)(uint)n * (nint)4; ptr != ptr2; ptr = (byte*)ptr + 4)
|
||||
for (void* ptr2 = (byte*)ptr + (nint)(uint)n * (nint)4; ptr != ptr2; ptr = (byte*)ptr + 4)
|
||||
{
|
||||
}
|
||||
}
|
||||
+4
-3
@@ -5,10 +5,11 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[MangledName("?construct_array@?$scalar_type@Ublock_buffer_element@crn_unpacker@crnd@@@crnd@@SAXPEAUblock_buffer_element@crn_unpacker@2@I@Z")]
|
||||
[DemangledName("public: static void __cdecl crnd::scalar_type<struct crnd::crn_unpacker::block_buffer_element>::construct_array(struct crnd::crn_unpacker::block_buffer_element *, unsigned int)")]
|
||||
[CleanName("construct_array")]
|
||||
internal static partial class construct_array_5afuwda
|
||||
internal static partial class construct_array_jcwhf4
|
||||
{
|
||||
public unsafe static void Invoke(void* p, int n)
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke([NativeType("struct crnd::crn_unpacker::block_buffer_element *")] void* p, [NativeType("unsigned int")] int n)
|
||||
{
|
||||
construct_array_f9hrzwd.Invoke(p, n);
|
||||
construct_array_69zh62.Invoke(p, n);
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -6,9 +6,10 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[MangledName("?construct_array@?$scalar_type@E@crnd@@SAXPEAEI@Z")]
|
||||
[DemangledName("public: static void __cdecl crnd::scalar_type<unsigned char>::construct_array(unsigned char *, unsigned int)")]
|
||||
[CleanName("construct_array")]
|
||||
internal static partial class construct_array_oifcoec
|
||||
internal static partial class construct_array_mseefg
|
||||
{
|
||||
public unsafe static void Invoke(void* p, int n)
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke([NativeType("unsigned char *")] void* p, [NativeType("unsigned int")] int n)
|
||||
{
|
||||
llvm_memset_p0_i64.Invoke(p, 0, unchecked(1L * (long)(uint)n), isVolatile: false);
|
||||
}
|
||||
+5
-6
@@ -5,16 +5,15 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[MangledName("??$construct_array@G@helpers@crnd@@YAXPEAGI@Z")]
|
||||
[DemangledName("void __cdecl crnd::helpers::construct_array<unsigned short>(unsigned short *, unsigned int)")]
|
||||
[CleanName("construct_array")]
|
||||
internal static partial class construct_array_pri7s5c
|
||||
internal static partial class construct_array_smzb78
|
||||
{
|
||||
public unsafe static void Invoke(void* p, int n)
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke([NativeType("unsigned short *")] void* p, [NativeType("unsigned int")] int n)
|
||||
{
|
||||
void* ptr = null;
|
||||
void* ptr2 = null;
|
||||
ptr = p;
|
||||
void* ptr = p;
|
||||
unchecked
|
||||
{
|
||||
for (ptr2 = (byte*)ptr + (nint)(uint)n * (nint)2; ptr != ptr2; ptr = (byte*)ptr + 2)
|
||||
for (void* ptr2 = (byte*)ptr + (nint)(uint)n * (nint)2; ptr != ptr2; ptr = (byte*)ptr + 2)
|
||||
{
|
||||
}
|
||||
}
|
||||
+3
-8
@@ -5,21 +5,16 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[MangledName("??$construct@Vcrn_unpacker@crnd@@@helpers@crnd@@YAPEAVcrn_unpacker@1@PEAV21@@Z")]
|
||||
[DemangledName("class crnd::crn_unpacker * __cdecl crnd::helpers::construct<class crnd::crn_unpacker>(class crnd::crn_unpacker *)")]
|
||||
[CleanName("construct")]
|
||||
internal static partial class construct_bzfae7a
|
||||
internal static partial class construct_fgrjha
|
||||
{
|
||||
private partial struct LocalVariables
|
||||
[return: NativeType("class crnd::crn_unpacker *")]
|
||||
public unsafe static void* Invoke([NativeType("class crnd::crn_unpacker *")] void* p)
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe static void* Invoke(void* p)
|
||||
{
|
||||
StackFrame startFrame = StackFrameList.Current.New<LocalVariables>();
|
||||
crn_unpacker_Constructor.Invoke(p);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
StackFrameList.Current.Clear(startFrame);
|
||||
return p;
|
||||
}
|
||||
}
|
||||
+4
-3
@@ -5,11 +5,12 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[MangledName("??$construct@Vdecoder_tables@prefix_coding@crnd@@@helpers@crnd@@YAPEAVdecoder_tables@prefix_coding@1@PEAV231@@Z")]
|
||||
[DemangledName("class crnd::prefix_coding::decoder_tables * __cdecl crnd::helpers::construct<class crnd::prefix_coding::decoder_tables>(class crnd::prefix_coding::decoder_tables *)")]
|
||||
[CleanName("construct")]
|
||||
internal static partial class construct_e5fhx3a
|
||||
internal static partial class construct_uri2px
|
||||
{
|
||||
public unsafe static void* Invoke(void* p)
|
||||
[return: NativeType("class crnd::prefix_coding::decoder_tables *")]
|
||||
public unsafe static void* Invoke([NativeType("class crnd::prefix_coding::decoder_tables *")] void* p)
|
||||
{
|
||||
decoder_tables_Constructor_2o5uqyd.Invoke(p);
|
||||
decoder_tables_Constructor_zsf5x5.Invoke(p);
|
||||
return p;
|
||||
}
|
||||
}
|
||||
+4
-9
@@ -5,21 +5,16 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[MangledName("??$construct@Vdecoder_tables@prefix_coding@crnd@@V123@@helpers@crnd@@YAPEAVdecoder_tables@prefix_coding@1@PEAV231@AEBV231@@Z")]
|
||||
[DemangledName("class crnd::prefix_coding::decoder_tables * __cdecl crnd::helpers::construct<class crnd::prefix_coding::decoder_tables, class crnd::prefix_coding::decoder_tables>(class crnd::prefix_coding::decoder_tables *, class crnd::prefix_coding::decoder_tables const &)")]
|
||||
[CleanName("construct")]
|
||||
internal static partial class construct_zybj4yc
|
||||
internal static partial class construct_va3fwv
|
||||
{
|
||||
private partial struct LocalVariables
|
||||
[return: NativeType("class crnd::prefix_coding::decoder_tables *")]
|
||||
public unsafe static void* Invoke([NativeType("class crnd::prefix_coding::decoder_tables *")] void* p, [NativeType("class crnd::prefix_coding::decoder_tables const &")] void* init)
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe static void* Invoke(void* p, void* init)
|
||||
{
|
||||
StackFrame startFrame = StackFrameList.Current.New<LocalVariables>();
|
||||
decoder_tables_Constructor_3v4xfjd.Invoke(p, init);
|
||||
decoder_tables_Constructor_jcwqfb.Invoke(p, init);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
StackFrameList.Current.Clear(startFrame);
|
||||
return p;
|
||||
}
|
||||
}
|
||||
+11
-15
@@ -6,29 +6,25 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("unsigned short __cdecl crnd::crc16(void const *, unsigned int, unsigned short)")]
|
||||
internal static partial class crc16
|
||||
{
|
||||
public unsafe static short Invoke(void* pBuf, int len, short crc)
|
||||
[return: NativeType("unsigned short")]
|
||||
public unsafe static short Invoke([NativeType("void const *")] void* pBuf, [NativeType("unsigned int")] int len, [NativeType("unsigned short")] short crc)
|
||||
{
|
||||
short num = 0;
|
||||
int num2 = 0;
|
||||
void* ptr = null;
|
||||
short num3 = 0;
|
||||
short num4 = 0;
|
||||
num = crc;
|
||||
num2 = len;
|
||||
short num = crc;
|
||||
int i = len;
|
||||
unchecked
|
||||
{
|
||||
num = (short)((ushort)num ^ -1);
|
||||
ptr = pBuf;
|
||||
for (; num2 != 0; num2 += -1)
|
||||
void* ptr = pBuf;
|
||||
for (; i != 0; i += -1)
|
||||
{
|
||||
void* ptr2 = ptr;
|
||||
ptr = (byte*)ptr2 + 1;
|
||||
num3 = (short)((byte)(*(sbyte*)ptr2) ^ ((ushort)num >> 8));
|
||||
short num2 = (short)((byte)(*(sbyte*)ptr2) ^ ((ushort)num >> 8));
|
||||
num = (short)((ushort)num << 8);
|
||||
num4 = (short)(((ushort)num3 >> 4) ^ (ushort)num3);
|
||||
num = (short)((ushort)num ^ (ushort)num4);
|
||||
num4 = (short)((ushort)num4 << 5);
|
||||
num = (short)((ushort)(short)((ushort)num ^ (ushort)num4) ^ (ushort)(short)((ushort)num4 << 7));
|
||||
short num3 = (short)(((ushort)num2 >> 4) ^ (ushort)num2);
|
||||
num = (short)((ushort)num ^ (ushort)num3);
|
||||
num3 = (short)((ushort)num3 << 5);
|
||||
num = (short)((ushort)(short)((ushort)num ^ (ushort)num3) ^ (ushort)(short)((ushort)num3 << 7));
|
||||
}
|
||||
return (short)((ushort)num ^ -1);
|
||||
}
|
||||
|
||||
+3
-3
@@ -5,11 +5,11 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??B?$crn_packed_uint@$00@crnd@@QEBAIXZ")]
|
||||
[DemangledName("public: unsigned int __cdecl crnd::crn_packed_uint<1>::operator unsigned int(void) const")]
|
||||
[CleanName("operator_unsigned_int")]
|
||||
internal static partial class operator_unsigned_int_neugqod
|
||||
internal static partial class crn_packed_uint_1_ToUInt32
|
||||
{
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke(void* @this)
|
||||
{
|
||||
return unchecked((byte)(*(sbyte*)(&((crnd_crn_packed_uint_1*)@this)->field_0)));
|
||||
return unchecked((byte)(*(sbyte*)(&((crnd_crn_packed_uint_wqy4pm*)@this)->m_buf)));
|
||||
}
|
||||
}
|
||||
+6
-8
@@ -5,20 +5,18 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??4?$crn_packed_uint@$01@crnd@@QEAAAEAU01@I@Z")]
|
||||
[DemangledName("public: struct crnd::crn_packed_uint<2> & __cdecl crnd::crn_packed_uint<2>::operator=(unsigned int)")]
|
||||
[CleanName("_4_crn_packed_uint")]
|
||||
internal static partial class _4_crn_packed_uint_5xksx5a
|
||||
internal static partial class crn_packed_uint_2_Assignment
|
||||
{
|
||||
public unsafe static void* Invoke(void* @this, int val)
|
||||
[return: NativeType("struct crnd::crn_packed_uint<2> &")]
|
||||
public unsafe static void* Invoke(void* @this, [NativeType("unsigned int")] int val)
|
||||
{
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
num = val;
|
||||
int num = val;
|
||||
num <<= 16;
|
||||
unchecked
|
||||
{
|
||||
for (num2 = 0; (uint)num2 < 2u; num2++)
|
||||
for (int i = 0; (uint)i < 2u; i++)
|
||||
{
|
||||
((sbyte*)(&((crnd_crn_packed_uint*)@this)->field_0))[(uint)num2] = (sbyte)(num >>> 24);
|
||||
((sbyte*)(&((crnd_crn_packed_uint_y3p293*)@this)->m_buf))[(uint)i] = (sbyte)(num >>> 24);
|
||||
num <<= 8;
|
||||
}
|
||||
return @this;
|
||||
+3
-3
@@ -5,11 +5,11 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??B?$crn_packed_uint@$01@crnd@@QEBAIXZ")]
|
||||
[DemangledName("public: unsigned int __cdecl crnd::crn_packed_uint<2>::operator unsigned int(void) const")]
|
||||
[CleanName("operator_unsigned_int")]
|
||||
internal static partial class operator_unsigned_int_f3crpsb
|
||||
internal static partial class crn_packed_uint_2_ToUInt32
|
||||
{
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke(void* @this)
|
||||
{
|
||||
return unchecked(((byte)(*(sbyte*)(&((crnd_crn_packed_uint*)@this)->field_0)) << 8) | (byte)((sbyte*)(&((crnd_crn_packed_uint*)@this)->field_0))[1]);
|
||||
return unchecked(((byte)(*(sbyte*)(&((crnd_crn_packed_uint_y3p293*)@this)->m_buf)) << 8) | (byte)((sbyte*)(&((crnd_crn_packed_uint_y3p293*)@this)->m_buf))[1]);
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -5,11 +5,11 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??B?$crn_packed_uint@$02@crnd@@QEBAIXZ")]
|
||||
[DemangledName("public: unsigned int __cdecl crnd::crn_packed_uint<3>::operator unsigned int(void) const")]
|
||||
[CleanName("operator_unsigned_int")]
|
||||
internal static partial class operator_unsigned_int_4iyly2b
|
||||
internal static partial class crn_packed_uint_3_ToUInt32
|
||||
{
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke(void* @this)
|
||||
{
|
||||
return unchecked(((byte)(*(sbyte*)(&((crnd_crn_packed_uint_2*)@this)->field_0)) << 16) | ((byte)((sbyte*)(&((crnd_crn_packed_uint_2*)@this)->field_0))[1] << 8) | (byte)((sbyte*)(&((crnd_crn_packed_uint_2*)@this)->field_0))[2]);
|
||||
return unchecked(((byte)(*(sbyte*)(&((crnd_crn_packed_uint_7g8wrq*)@this)->m_buf)) << 16) | ((byte)((sbyte*)(&((crnd_crn_packed_uint_7g8wrq*)@this)->m_buf))[1] << 8) | (byte)((sbyte*)(&((crnd_crn_packed_uint_7g8wrq*)@this)->m_buf))[2]);
|
||||
}
|
||||
}
|
||||
+6
-8
@@ -5,20 +5,18 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??4?$crn_packed_uint@$03@crnd@@QEAAAEAU01@I@Z")]
|
||||
[DemangledName("public: struct crnd::crn_packed_uint<4> & __cdecl crnd::crn_packed_uint<4>::operator=(unsigned int)")]
|
||||
[CleanName("_4_crn_packed_uint")]
|
||||
internal static partial class _4_crn_packed_uint_53ytska
|
||||
internal static partial class crn_packed_uint_4_Assignment
|
||||
{
|
||||
public unsafe static void* Invoke(void* @this, int val)
|
||||
[return: NativeType("struct crnd::crn_packed_uint<4> &")]
|
||||
public unsafe static void* Invoke(void* @this, [NativeType("unsigned int")] int val)
|
||||
{
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
num = val;
|
||||
int num = val;
|
||||
num <<= 0;
|
||||
unchecked
|
||||
{
|
||||
for (num2 = 0; (uint)num2 < 4u; num2++)
|
||||
for (int i = 0; (uint)i < 4u; i++)
|
||||
{
|
||||
((sbyte*)(&((crnd_crn_packed_uint_0*)@this)->field_0))[(uint)num2] = (sbyte)(num >>> 24);
|
||||
((sbyte*)(&((crnd_crn_packed_uint_25ciii*)@this)->m_buf))[(uint)i] = (sbyte)(num >>> 24);
|
||||
num <<= 8;
|
||||
}
|
||||
return @this;
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
using AssetRipper.Conversions.UnityCrunch.Structures;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??B?$crn_packed_uint@$03@crnd@@QEBAIXZ")]
|
||||
[DemangledName("public: unsigned int __cdecl crnd::crn_packed_uint<4>::operator unsigned int(void) const")]
|
||||
internal static partial class crn_packed_uint_4_ToUInt32
|
||||
{
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke(void* @this)
|
||||
{
|
||||
return unchecked(((byte)(*(sbyte*)(&((crnd_crn_packed_uint_25ciii*)@this)->m_buf)) << 24) | ((byte)((sbyte*)(&((crnd_crn_packed_uint_25ciii*)@this)->m_buf))[1] << 16) | ((byte)((sbyte*)(&((crnd_crn_packed_uint_25ciii*)@this)->m_buf))[2] << 8) | (byte)((sbyte*)(&((crnd_crn_packed_uint_25ciii*)@this)->m_buf))[3]);
|
||||
}
|
||||
}
|
||||
+30
-40
@@ -8,33 +8,25 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("public: __cdecl crnd::crn_unpacker::crn_unpacker(void)")]
|
||||
internal static partial class crn_unpacker_Constructor
|
||||
{
|
||||
private partial struct LocalVariables
|
||||
{
|
||||
public unsafe void* field_0;
|
||||
}
|
||||
|
||||
public unsafe static void* Invoke(void* @this)
|
||||
{
|
||||
StackFrame startFrame = StackFrameList.Current.New<LocalVariables>();
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = null;
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = @this;
|
||||
unchecked
|
||||
{
|
||||
((crnd_crn_unpacker*)@this)->field_0 = 519686845;
|
||||
((crnd_crn_unpacker*)@this)->field_1 = null;
|
||||
((crnd_crn_unpacker*)@this)->field_2 = 0;
|
||||
((crnd_crn_unpacker*)@this)->field_3 = null;
|
||||
symbol_codec_Constructor.Invoke(&((crnd_crn_unpacker*)@this)->field_4);
|
||||
crnd_static_huffman_data_model* field_ = &((crnd_crn_unpacker*)@this)->field_5;
|
||||
static_huffman_data_model_Constructor_tl33idc.Invoke(field_);
|
||||
InlineArray_2_tahu2ya* field_2 = &((crnd_crn_unpacker*)@this)->field_6;
|
||||
crnd_static_huffman_data_model* ptr = (crnd_static_huffman_data_model*)field_2;
|
||||
((crnd_crn_unpacker*)@this)->m_magic = 519686845;
|
||||
((crnd_crn_unpacker*)@this)->m_pData = null;
|
||||
((crnd_crn_unpacker*)@this)->m_data_size = 0;
|
||||
((crnd_crn_unpacker*)@this)->m_pHeader = null;
|
||||
symbol_codec_Constructor.Invoke(&((crnd_crn_unpacker*)@this)->m_codec);
|
||||
crnd_static_huffman_data_model* reference_encoding_dm = &((crnd_crn_unpacker*)@this)->m_reference_encoding_dm;
|
||||
static_huffman_data_model_Constructor_c98ih8.Invoke(reference_encoding_dm);
|
||||
InlineArray2_crnd_static_huffman_data_model* endpoint_delta_dm = &((crnd_crn_unpacker*)@this)->m_endpoint_delta_dm;
|
||||
crnd_static_huffman_data_model* ptr = (crnd_static_huffman_data_model*)endpoint_delta_dm;
|
||||
crnd_static_huffman_data_model* ptr2 = ptr + 2L;
|
||||
crnd_static_huffman_data_model* intPtr = ptr;
|
||||
while (true)
|
||||
{
|
||||
void* ptr3 = intPtr;
|
||||
static_huffman_data_model_Constructor_tl33idc.Invoke(ptr3);
|
||||
static_huffman_data_model_Constructor_c98ih8.Invoke(ptr3);
|
||||
if (ExceptionInfo.Current == null)
|
||||
{
|
||||
crnd_static_huffman_data_model* ptr4 = (crnd_static_huffman_data_model*)ptr3 + 1;
|
||||
@@ -43,14 +35,14 @@ internal static partial class crn_unpacker_Constructor
|
||||
intPtr = ptr4;
|
||||
continue;
|
||||
}
|
||||
InlineArray_2_tahu2ya* field_3 = &((crnd_crn_unpacker*)@this)->field_7;
|
||||
crnd_static_huffman_data_model* ptr5 = (crnd_static_huffman_data_model*)field_3;
|
||||
InlineArray2_crnd_static_huffman_data_model* selector_delta_dm = &((crnd_crn_unpacker*)@this)->m_selector_delta_dm;
|
||||
crnd_static_huffman_data_model* ptr5 = (crnd_static_huffman_data_model*)selector_delta_dm;
|
||||
crnd_static_huffman_data_model* ptr6 = ptr5 + 2L;
|
||||
crnd_static_huffman_data_model* intPtr2 = ptr5;
|
||||
while (true)
|
||||
{
|
||||
void* ptr7 = intPtr2;
|
||||
static_huffman_data_model_Constructor_tl33idc.Invoke(ptr7);
|
||||
static_huffman_data_model_Constructor_c98ih8.Invoke(ptr7);
|
||||
if (ExceptionInfo.Current == null)
|
||||
{
|
||||
crnd_static_huffman_data_model* ptr8 = (crnd_static_huffman_data_model*)ptr7 + 1;
|
||||
@@ -59,32 +51,30 @@ internal static partial class crn_unpacker_Constructor
|
||||
intPtr2 = ptr8;
|
||||
continue;
|
||||
}
|
||||
crnd_vector_5* field_4 = &((crnd_crn_unpacker*)@this)->field_8;
|
||||
vector_unsigned_int_Constructor.Invoke(field_4);
|
||||
crnd_vector_rgfndh* color_endpoints = &((crnd_crn_unpacker*)@this)->m_color_endpoints;
|
||||
vector_unsigned_int_Constructor.Invoke(color_endpoints);
|
||||
if (ExceptionInfo.Current == null)
|
||||
{
|
||||
crnd_vector_5* field_5 = &((crnd_crn_unpacker*)@this)->field_9;
|
||||
vector_unsigned_int_Constructor.Invoke(field_5);
|
||||
crnd_vector_rgfndh* color_selectors = &((crnd_crn_unpacker*)@this)->m_color_selectors;
|
||||
vector_unsigned_int_Constructor.Invoke(color_selectors);
|
||||
if (ExceptionInfo.Current == null)
|
||||
{
|
||||
crnd_vector_8* field_6 = &((crnd_crn_unpacker*)@this)->field_10;
|
||||
vector_unsigned_short_Constructor.Invoke(field_6);
|
||||
crnd_vector_h6df48* alpha_endpoints = &((crnd_crn_unpacker*)@this)->m_alpha_endpoints;
|
||||
vector_unsigned_short_Constructor.Invoke(alpha_endpoints);
|
||||
if (ExceptionInfo.Current == null)
|
||||
{
|
||||
crnd_vector_8* field_7 = &((crnd_crn_unpacker*)@this)->field_11;
|
||||
vector_unsigned_short_Constructor.Invoke(field_7);
|
||||
crnd_vector_h6df48* alpha_selectors = &((crnd_crn_unpacker*)@this)->m_alpha_selectors;
|
||||
vector_unsigned_short_Constructor.Invoke(alpha_selectors);
|
||||
if (ExceptionInfo.Current == null)
|
||||
{
|
||||
vector_struct_crnd_crn_unpacker_block_buffer_element_Constructor.Invoke(&((crnd_crn_unpacker*)@this)->field_12);
|
||||
vector_struct_crnd_crn_unpacker_block_buffer_element_Constructor.Invoke(&((crnd_crn_unpacker*)@this)->m_block_buffer);
|
||||
if (ExceptionInfo.Current == null)
|
||||
{
|
||||
void* field_8 = startFrame.GetLocalsPointer<LocalVariables>()->field_0;
|
||||
StackFrameList.Current.Clear(startFrame);
|
||||
return field_8;
|
||||
return @this;
|
||||
}
|
||||
ExceptionInfo current = ExceptionInfo.Current;
|
||||
ExceptionInfo.Current = null;
|
||||
vector_unsigned_short_Destructor.Invoke(field_7);
|
||||
vector_unsigned_short_Destructor.Invoke(alpha_selectors);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return null;
|
||||
@@ -93,7 +83,7 @@ internal static partial class crn_unpacker_Constructor
|
||||
}
|
||||
ExceptionInfo current2 = ExceptionInfo.Current;
|
||||
ExceptionInfo.Current = null;
|
||||
vector_unsigned_short_Destructor.Invoke(field_6);
|
||||
vector_unsigned_short_Destructor.Invoke(alpha_endpoints);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return null;
|
||||
@@ -102,7 +92,7 @@ internal static partial class crn_unpacker_Constructor
|
||||
}
|
||||
ExceptionInfo current3 = ExceptionInfo.Current;
|
||||
ExceptionInfo.Current = null;
|
||||
vector_unsigned_int_Destructor.Invoke(field_5);
|
||||
vector_unsigned_int_Destructor.Invoke(color_selectors);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return null;
|
||||
@@ -111,7 +101,7 @@ internal static partial class crn_unpacker_Constructor
|
||||
}
|
||||
ExceptionInfo current4 = ExceptionInfo.Current;
|
||||
ExceptionInfo.Current = null;
|
||||
vector_unsigned_int_Destructor.Invoke(field_4);
|
||||
vector_unsigned_int_Destructor.Invoke(color_endpoints);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return null;
|
||||
@@ -120,7 +110,7 @@ internal static partial class crn_unpacker_Constructor
|
||||
}
|
||||
ExceptionInfo current5 = ExceptionInfo.Current;
|
||||
ExceptionInfo.Current = null;
|
||||
crnd_static_huffman_data_model* ptr9 = (crnd_static_huffman_data_model*)field_3;
|
||||
crnd_static_huffman_data_model* ptr9 = (crnd_static_huffman_data_model*)selector_delta_dm;
|
||||
nint num = (nint)(ptr9 + 2L);
|
||||
while (true)
|
||||
{
|
||||
@@ -164,7 +154,7 @@ internal static partial class crn_unpacker_Constructor
|
||||
}
|
||||
ExceptionInfo current7 = ExceptionInfo.Current;
|
||||
ExceptionInfo.Current = null;
|
||||
crnd_static_huffman_data_model* ptr12 = (crnd_static_huffman_data_model*)field_2;
|
||||
crnd_static_huffman_data_model* ptr12 = (crnd_static_huffman_data_model*)endpoint_delta_dm;
|
||||
nint num3 = (nint)(ptr12 + 2L);
|
||||
while (true)
|
||||
{
|
||||
@@ -208,7 +198,7 @@ internal static partial class crn_unpacker_Constructor
|
||||
}
|
||||
ExceptionInfo current9 = ExceptionInfo.Current;
|
||||
ExceptionInfo.Current = null;
|
||||
static_huffman_data_model_Destructor.Invoke(field_);
|
||||
static_huffman_data_model_Destructor.Invoke(reference_encoding_dm);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return null;
|
||||
|
||||
+13
-22
@@ -7,43 +7,38 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("public: __cdecl crnd::crn_unpacker::~crn_unpacker(void)")]
|
||||
internal static partial class crn_unpacker_Destructor
|
||||
{
|
||||
private partial struct LocalVariables
|
||||
{
|
||||
}
|
||||
|
||||
public unsafe static void Invoke(void* @this)
|
||||
{
|
||||
StackFrame startFrame = StackFrameList.Current.New<LocalVariables>();
|
||||
unchecked
|
||||
{
|
||||
((crnd_crn_unpacker*)@this)->field_0 = 0;
|
||||
vector_struct_crnd_crn_unpacker_block_buffer_element_Destructor.Invoke(&((crnd_crn_unpacker*)@this)->field_12);
|
||||
((crnd_crn_unpacker*)@this)->m_magic = 0;
|
||||
vector_struct_crnd_crn_unpacker_block_buffer_element_Destructor.Invoke(&((crnd_crn_unpacker*)@this)->m_block_buffer);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
vector_unsigned_short_Destructor.Invoke(&((crnd_crn_unpacker*)@this)->field_11);
|
||||
vector_unsigned_short_Destructor.Invoke(&((crnd_crn_unpacker*)@this)->m_alpha_selectors);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
vector_unsigned_short_Destructor.Invoke(&((crnd_crn_unpacker*)@this)->field_10);
|
||||
vector_unsigned_short_Destructor.Invoke(&((crnd_crn_unpacker*)@this)->m_alpha_endpoints);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
vector_unsigned_int_Destructor.Invoke(&((crnd_crn_unpacker*)@this)->field_9);
|
||||
vector_unsigned_int_Destructor.Invoke(&((crnd_crn_unpacker*)@this)->m_color_selectors);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
vector_unsigned_int_Destructor.Invoke(&((crnd_crn_unpacker*)@this)->field_8);
|
||||
vector_unsigned_int_Destructor.Invoke(&((crnd_crn_unpacker*)@this)->m_color_endpoints);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
crnd_static_huffman_data_model* field_ = (crnd_static_huffman_data_model*)(&((crnd_crn_unpacker*)@this)->field_7);
|
||||
nint num = (nint)(field_ + 2L);
|
||||
crnd_static_huffman_data_model* selector_delta_dm = (crnd_static_huffman_data_model*)(&((crnd_crn_unpacker*)@this)->m_selector_delta_dm);
|
||||
nint num = (nint)(selector_delta_dm + 2L);
|
||||
while (true)
|
||||
{
|
||||
crnd_static_huffman_data_model* ptr = (crnd_static_huffman_data_model*)(num + (nint)(-1) * sizeof(crnd_static_huffman_data_model));
|
||||
@@ -52,14 +47,14 @@ internal static partial class crn_unpacker_Destructor
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (ptr == field_)
|
||||
if (ptr == selector_delta_dm)
|
||||
{
|
||||
break;
|
||||
}
|
||||
num = (nint)ptr;
|
||||
}
|
||||
crnd_static_huffman_data_model* field_2 = (crnd_static_huffman_data_model*)(&((crnd_crn_unpacker*)@this)->field_6);
|
||||
nint num2 = (nint)(field_2 + 2L);
|
||||
crnd_static_huffman_data_model* endpoint_delta_dm = (crnd_static_huffman_data_model*)(&((crnd_crn_unpacker*)@this)->m_endpoint_delta_dm);
|
||||
nint num2 = (nint)(endpoint_delta_dm + 2L);
|
||||
while (true)
|
||||
{
|
||||
crnd_static_huffman_data_model* ptr2 = (crnd_static_huffman_data_model*)(num2 + (nint)(-1) * sizeof(crnd_static_huffman_data_model));
|
||||
@@ -68,17 +63,13 @@ internal static partial class crn_unpacker_Destructor
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (ptr2 == field_2)
|
||||
if (ptr2 == endpoint_delta_dm)
|
||||
{
|
||||
break;
|
||||
}
|
||||
num2 = (nint)ptr2;
|
||||
}
|
||||
static_huffman_data_model_Destructor.Invoke(&((crnd_crn_unpacker*)@this)->field_5);
|
||||
if (ExceptionInfo.Current == null)
|
||||
{
|
||||
StackFrameList.Current.Clear(startFrame);
|
||||
}
|
||||
static_huffman_data_model_Destructor.Invoke(&((crnd_crn_unpacker*)@this)->m_reference_encoding_dm);
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
-5
@@ -10,12 +10,13 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("void __cdecl crnd::crnd_assert(char const *, char const *, unsigned int)")]
|
||||
internal static partial class crnd_assert
|
||||
{
|
||||
public unsafe static void Invoke(void* pExp, void* pFile, int line)
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke([NativeType("char const *")] void* pExp, [NativeType("char const *")] void* pFile, [NativeType("unsigned int")] int line)
|
||||
{
|
||||
InlineArray_512_w3otm9c inlineArray_512_w3otm9c = default(InlineArray_512_w3otm9c);
|
||||
sprintf.Invoke(&inlineArray_512_w3otm9c, String_tghxvvc.__pointer, default(ReadOnlySpan<nint>));
|
||||
crnd_output_debug_string.Invoke(&inlineArray_512_w3otm9c);
|
||||
puts.Invoke(&inlineArray_512_w3otm9c);
|
||||
InlineArray512_SByte inlineArray512_SByte = default(InlineArray512_SByte);
|
||||
sprintf.Invoke(&inlineArray512_SByte, String_bkvqbi.__pointer, default(ReadOnlySpan<nint>));
|
||||
crnd_output_debug_string.Invoke(&inlineArray512_SByte);
|
||||
puts.Invoke(&inlineArray512_SByte);
|
||||
if (crnd_is_debugger_present.Invoke())
|
||||
{
|
||||
crnd_debug_break.Invoke();
|
||||
|
||||
+15
-33
@@ -9,55 +9,37 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("bool __cdecl crnd::crnd_create_segmented_file(void const *, unsigned int, void *, unsigned int)")]
|
||||
internal static partial class crnd_create_segmented_file
|
||||
{
|
||||
public unsafe static bool Invoke(void* pData, int data_size, void* pBase_data, int base_data_size)
|
||||
[return: NativeType("bool")]
|
||||
public unsafe static bool Invoke([NativeType("void const *")] void* pData, [NativeType("unsigned int")] int data_size, [NativeType("void *")] void* pBase_data, [NativeType("unsigned int")] int base_data_size)
|
||||
{
|
||||
bool flag = false;
|
||||
int num = 0;
|
||||
void* ptr = null;
|
||||
int num2 = 0;
|
||||
void* ptr2 = null;
|
||||
void* ptr3 = null;
|
||||
int num3 = 0;
|
||||
void* ptr4 = null;
|
||||
num = base_data_size;
|
||||
ptr = pBase_data;
|
||||
num2 = data_size;
|
||||
ptr2 = pData;
|
||||
unchecked
|
||||
{
|
||||
if (ptr2 == null || (uint)num2 < 62u)
|
||||
if (pData == null || (uint)data_size < 62u)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
ptr3 = crnd_get_header.Invoke(ptr2, num2);
|
||||
if (ptr3 == null)
|
||||
void* ptr = crnd_get_header.Invoke(pData, data_size);
|
||||
if (ptr == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if ((operator_unsigned_int_f3crpsb.Invoke(&((crnd_crn_header*)ptr3)->field_10) & 1) != 0)
|
||||
if ((crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_flags) & 1) != 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
num3 = crnd_get_segmented_file_size.Invoke(ptr2, num2);
|
||||
if ((uint)num < (uint)num3)
|
||||
int num = crnd_get_segmented_file_size.Invoke(pData, data_size);
|
||||
if ((uint)base_data_size < (uint)num)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
llvm_memcpy_p0_p0_i64.Invoke(ptr, ptr2, (uint)num3, isVolatile: false);
|
||||
ptr4 = ptr;
|
||||
_4_crn_packed_uint_5xksx5a.Invoke(val: operator_unsigned_int_f3crpsb.Invoke(&((crnd_crn_header*)ptr4)->field_10) | 1, @this: &((crnd_crn_header*)ptr4)->field_10);
|
||||
_4_crn_packed_uint_53ytska.Invoke(&((crnd_crn_header*)ptr4)->field_3, num3);
|
||||
_4_crn_packed_uint_5xksx5a.Invoke(val: (ushort)crc16.Invoke(len: operator_unsigned_int_uxo4hgd.Invoke(&((crnd_crn_header*)ptr4)->field_3) - operator_unsigned_int_f3crpsb.Invoke(&((crnd_crn_header*)ptr4)->field_1), pBuf: (byte*)ptr + (uint)operator_unsigned_int_f3crpsb.Invoke(&((crnd_crn_header*)ptr4)->field_1), crc: 0), @this: &((crnd_crn_header*)ptr4)->field_4);
|
||||
_4_crn_packed_uint_5xksx5a.Invoke(val: (ushort)crc16.Invoke(len: operator_unsigned_int_f3crpsb.Invoke(&((crnd_crn_header*)ptr4)->field_1) - (int)((long)(&((crnd_crn_header*)ptr4)->field_3) - (long)ptr4), pBuf: &((crnd_crn_header*)ptr4)->field_3, crc: 0), @this: &((crnd_crn_header*)ptr4)->field_2);
|
||||
int num4;
|
||||
if (crnd_validate_file.Invoke(ptr4, num3, null))
|
||||
llvm_memcpy_p0_p0_i64.Invoke(pBase_data, pData, (uint)num, isVolatile: false);
|
||||
crn_packed_uint_2_Assignment.Invoke(val: crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)pBase_data)->m_flags) | 1, @this: &((crnd_crn_header*)pBase_data)->m_flags);
|
||||
crn_packed_uint_4_Assignment.Invoke(&((crnd_crn_header*)pBase_data)->m_data_size, num);
|
||||
crn_packed_uint_2_Assignment.Invoke(val: (ushort)crc16.Invoke(len: crn_packed_uint_4_ToUInt32.Invoke(&((crnd_crn_header*)pBase_data)->m_data_size) - crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)pBase_data)->m_header_size), pBuf: (byte*)pBase_data + (uint)crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)pBase_data)->m_header_size), crc: 0), @this: &((crnd_crn_header*)pBase_data)->m_data_crc16);
|
||||
crn_packed_uint_2_Assignment.Invoke(val: (ushort)crc16.Invoke(len: crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)pBase_data)->m_header_size) - (int)((long)(&((crnd_crn_header*)pBase_data)->m_data_size) - (long)pBase_data), pBuf: &((crnd_crn_header*)pBase_data)->m_data_size, crc: 0), @this: &((crnd_crn_header*)pBase_data)->m_header_crc16);
|
||||
if (!crnd_validate_file.Invoke(pBase_data, num, null))
|
||||
{
|
||||
num4 = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
crnd_assert.Invoke(String_2bpyz2d.__pointer, String_yguirrd.__pointer, 2374);
|
||||
num4 = 0;
|
||||
crnd_assert.Invoke(String_82dmwb.__pointer, String_vvx8bt.__pointer, 2374);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
+3
-3
@@ -7,9 +7,9 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("unsigned int __cdecl crnd::crnd_crn_format_to_fourcc(enum crn_format)")]
|
||||
internal static partial class crnd_crn_format_to_fourcc
|
||||
{
|
||||
public unsafe static int Invoke(int fmt)
|
||||
[return: NativeType("unsigned int")]
|
||||
public unsafe static int Invoke([NativeType("enum crn_format")] int fmt)
|
||||
{
|
||||
int num = 0;
|
||||
switch (fmt)
|
||||
{
|
||||
case 0:
|
||||
@@ -43,7 +43,7 @@ internal static partial class crnd_crn_format_to_fourcc
|
||||
case 14:
|
||||
return 1396781637;
|
||||
default:
|
||||
crnd_assert.Invoke(String_xxn2wad.__pointer, String_yguirrd.__pointer, 2126);
|
||||
crnd_assert.Invoke(String_ak4am9.__pointer, String_vvx8bt.__pointer, 2126);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -6,6 +6,7 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
[DemangledName("void __cdecl crnd::crnd_debug_break(void)")]
|
||||
internal static partial class crnd_debug_break
|
||||
{
|
||||
[return: NativeType("void")]
|
||||
public static void Invoke()
|
||||
{
|
||||
}
|
||||
|
||||
+3
-4
@@ -9,10 +9,9 @@ internal static partial class crnd_default_msize
|
||||
{
|
||||
public unsafe static readonly void* __pointer = PointerIndices.Register((delegate*<void*, void*, long>)(&Invoke));
|
||||
|
||||
public unsafe static long Invoke(void* p, void* pUser_data)
|
||||
[return: NativeType("unsigned __int64")]
|
||||
public unsafe static long Invoke([NativeType("void *")] void* p, [NativeType("void *")] void* pUser_data)
|
||||
{
|
||||
void* ptr = null;
|
||||
ptr = p;
|
||||
return (ptr == null) ? 0L : msize.Invoke(ptr);
|
||||
return (p == null) ? 0L : msize.Invoke(p);
|
||||
}
|
||||
}
|
||||
+23
-30
@@ -9,59 +9,52 @@ internal static partial class crnd_default_realloc
|
||||
{
|
||||
public unsafe static readonly void* __pointer = PointerIndices.Register((delegate*<void*, long, void*, bool, void*, void*>)(&Invoke));
|
||||
|
||||
public unsafe static void* Invoke(void* p, long size, void* pActual_size, bool movable, void* parameter_4)
|
||||
[return: NativeType("void *")]
|
||||
public unsafe static void* Invoke([NativeType("void *")] void* p, [NativeType("unsigned __int64")] long size, [NativeType("unsigned __int64 *")] void* pActual_size, [NativeType("bool")] bool movable, [NativeType("void *")] void* parameter_4)
|
||||
{
|
||||
sbyte b = 0;
|
||||
void* ptr = null;
|
||||
long num = 0L;
|
||||
void* ptr2 = null;
|
||||
void* ptr3 = null;
|
||||
void* ptr4 = null;
|
||||
b = (movable ? ((sbyte)1) : ((sbyte)0));
|
||||
ptr = pActual_size;
|
||||
num = size;
|
||||
ptr2 = p;
|
||||
sbyte b = (movable ? ((sbyte)1) : ((sbyte)0));
|
||||
unchecked
|
||||
{
|
||||
if (ptr2 == null)
|
||||
void* ptr;
|
||||
if (p == null)
|
||||
{
|
||||
ptr3 = malloc.Invoke(num);
|
||||
if (ptr != null)
|
||||
ptr = malloc.Invoke(size);
|
||||
if (pActual_size != null)
|
||||
{
|
||||
*(long*)ptr = ((ptr3 == null) ? 0L : msize.Invoke(ptr3));
|
||||
*(long*)pActual_size = ((ptr == null) ? 0L : msize.Invoke(ptr));
|
||||
}
|
||||
}
|
||||
else if (num == 0L)
|
||||
else if (size == 0L)
|
||||
{
|
||||
free.Invoke(ptr2);
|
||||
ptr3 = null;
|
||||
if (ptr != null)
|
||||
free.Invoke(p);
|
||||
ptr = null;
|
||||
if (pActual_size != null)
|
||||
{
|
||||
*(long*)ptr = 0L;
|
||||
*(long*)pActual_size = 0L;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr4 = ptr2;
|
||||
ptr3 = null;
|
||||
if (ptr3 != null)
|
||||
void* ptr2 = p;
|
||||
ptr = null;
|
||||
if (ptr != null)
|
||||
{
|
||||
ptr4 = ptr3;
|
||||
ptr2 = ptr;
|
||||
}
|
||||
else if ((b & 1) == 1)
|
||||
{
|
||||
ptr3 = realloc.Invoke(ptr2, num);
|
||||
if (ptr3 != null)
|
||||
ptr = realloc.Invoke(p, size);
|
||||
if (ptr != null)
|
||||
{
|
||||
ptr4 = ptr3;
|
||||
ptr2 = ptr;
|
||||
}
|
||||
}
|
||||
if (ptr != null)
|
||||
if (pActual_size != null)
|
||||
{
|
||||
*(long*)ptr = msize.Invoke(ptr4);
|
||||
*(long*)pActual_size = msize.Invoke(ptr2);
|
||||
}
|
||||
}
|
||||
return ptr3;
|
||||
return ptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
-50
@@ -1,50 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.GlobalVariables;
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??$crnd_delete_array@I@crnd@@YAXPEAI@Z")]
|
||||
[DemangledName("void __cdecl crnd::crnd_delete_array<unsigned int>(unsigned int *)")]
|
||||
[CleanName("crnd_delete_array")]
|
||||
internal static partial class crnd_delete_array_nughn5d
|
||||
{
|
||||
private partial struct LocalVariables
|
||||
{
|
||||
public unsafe void* field_0;
|
||||
|
||||
public int field_1;
|
||||
}
|
||||
|
||||
public unsafe static void Invoke(void* p)
|
||||
{
|
||||
StackFrame startFrame = StackFrameList.Current.New<LocalVariables>();
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = null;
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_1 = 0;
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = p;
|
||||
unchecked
|
||||
{
|
||||
if (startFrame.GetLocalsPointer<LocalVariables>()->field_0 != null)
|
||||
{
|
||||
int field_ = *(int*)((byte*)startFrame.GetLocalsPointer<LocalVariables>()->field_0 + -4);
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_1 = field_;
|
||||
int num;
|
||||
if (startFrame.GetLocalsPointer<LocalVariables>()->field_1 != 0 && startFrame.GetLocalsPointer<LocalVariables>()->field_1 == (*(int*)((byte*)startFrame.GetLocalsPointer<LocalVariables>()->field_0 + -8) ^ -1))
|
||||
{
|
||||
num = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
crnd_assert.Invoke(String_zzvckkc.__pointer, String_yguirrd.__pointer, 347);
|
||||
num = 0;
|
||||
}
|
||||
destruct_array_lrbdoxa.Invoke(n: startFrame.GetLocalsPointer<LocalVariables>()->field_1, p: startFrame.GetLocalsPointer<LocalVariables>()->field_0);
|
||||
crnd_free.Invoke((byte*)startFrame.GetLocalsPointer<LocalVariables>()->field_0 + -8);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
StackFrameList.Current.Clear(startFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
-50
@@ -1,50 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.GlobalVariables;
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??$crnd_delete_array@G@crnd@@YAXPEAG@Z")]
|
||||
[DemangledName("void __cdecl crnd::crnd_delete_array<unsigned short>(unsigned short *)")]
|
||||
[CleanName("crnd_delete_array")]
|
||||
internal static partial class crnd_delete_array_rytswyc
|
||||
{
|
||||
private partial struct LocalVariables
|
||||
{
|
||||
public unsafe void* field_0;
|
||||
|
||||
public int field_1;
|
||||
}
|
||||
|
||||
public unsafe static void Invoke(void* p)
|
||||
{
|
||||
StackFrame startFrame = StackFrameList.Current.New<LocalVariables>();
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = null;
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_1 = 0;
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = p;
|
||||
unchecked
|
||||
{
|
||||
if (startFrame.GetLocalsPointer<LocalVariables>()->field_0 != null)
|
||||
{
|
||||
int field_ = *(int*)((byte*)startFrame.GetLocalsPointer<LocalVariables>()->field_0 + -4);
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_1 = field_;
|
||||
int num;
|
||||
if (startFrame.GetLocalsPointer<LocalVariables>()->field_1 != 0 && startFrame.GetLocalsPointer<LocalVariables>()->field_1 == (*(int*)((byte*)startFrame.GetLocalsPointer<LocalVariables>()->field_0 + -8) ^ -1))
|
||||
{
|
||||
num = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
crnd_assert.Invoke(String_zzvckkc.__pointer, String_yguirrd.__pointer, 347);
|
||||
num = 0;
|
||||
}
|
||||
destruct_array_viasmsc.Invoke(n: startFrame.GetLocalsPointer<LocalVariables>()->field_1, p: startFrame.GetLocalsPointer<LocalVariables>()->field_0);
|
||||
crnd_free.Invoke((byte*)startFrame.GetLocalsPointer<LocalVariables>()->field_0 + -8);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
StackFrameList.Current.Clear(startFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.GlobalVariables;
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??$crnd_delete_array@I@crnd@@YAXPEAI@Z")]
|
||||
[DemangledName("void __cdecl crnd::crnd_delete_array<unsigned int>(unsigned int *)")]
|
||||
[CleanName("crnd_delete_array")]
|
||||
internal static partial class crnd_delete_array_wgct9q
|
||||
{
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke([NativeType("unsigned int *")] void* p)
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
if (p != null)
|
||||
{
|
||||
int num = *(int*)((byte*)p + -4);
|
||||
if (num == 0 || num != (*(int*)((byte*)p + -8) ^ -1))
|
||||
{
|
||||
crnd_assert.Invoke(String_576cmw.__pointer, String_vvx8bt.__pointer, 347);
|
||||
}
|
||||
destruct_array_yfmkw8.Invoke(p, num);
|
||||
crnd_free.Invoke((byte*)p + -8);
|
||||
if (ExceptionInfo.Current == null)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.GlobalVariables;
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??$crnd_delete_array@G@crnd@@YAXPEAG@Z")]
|
||||
[DemangledName("void __cdecl crnd::crnd_delete_array<unsigned short>(unsigned short *)")]
|
||||
[CleanName("crnd_delete_array")]
|
||||
internal static partial class crnd_delete_array_yym6az
|
||||
{
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke([NativeType("unsigned short *")] void* p)
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
if (p != null)
|
||||
{
|
||||
int num = *(int*)((byte*)p + -4);
|
||||
if (num == 0 || num != (*(int*)((byte*)p + -8) ^ -1))
|
||||
{
|
||||
crnd_assert.Invoke(String_576cmw.__pointer, String_vvx8bt.__pointer, 347);
|
||||
}
|
||||
destruct_array_v2phiu.Invoke(p, num);
|
||||
crnd_free.Invoke((byte*)p + -8);
|
||||
if (ExceptionInfo.Current == null)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??$crnd_delete@Vdecoder_tables@prefix_coding@crnd@@@crnd@@YAXPEAVdecoder_tables@prefix_coding@0@@Z")]
|
||||
[DemangledName("void __cdecl crnd::crnd_delete<class crnd::prefix_coding::decoder_tables>(class crnd::prefix_coding::decoder_tables *)")]
|
||||
[CleanName("crnd_delete")]
|
||||
internal static partial class crnd_delete_bvucig
|
||||
{
|
||||
[return: NativeType("void")]
|
||||
public unsafe static void Invoke([NativeType("class crnd::prefix_coding::decoder_tables *")] void* p)
|
||||
{
|
||||
if (p == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
destruct_kgci2b.Invoke(p);
|
||||
if (ExceptionInfo.Current == null)
|
||||
{
|
||||
crnd_free.Invoke(p);
|
||||
if (ExceptionInfo.Current == null)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
using AssetRipper.Conversions.UnityCrunch.Helpers;
|
||||
|
||||
namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
|
||||
|
||||
[MangledName("??$crnd_delete@Vcrn_unpacker@crnd@@@crnd@@YAXPEAVcrn_unpacker@0@@Z")]
|
||||
[DemangledName("void __cdecl crnd::crnd_delete<class crnd::crn_unpacker>(class crnd::crn_unpacker *)")]
|
||||
[CleanName("crnd_delete")]
|
||||
internal static partial class crnd_delete_e7rwdhb
|
||||
{
|
||||
private partial struct LocalVariables
|
||||
{
|
||||
public unsafe void* field_0;
|
||||
}
|
||||
|
||||
public unsafe static void Invoke(void* p)
|
||||
{
|
||||
StackFrame startFrame = StackFrameList.Current.New<LocalVariables>();
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = null;
|
||||
startFrame.GetLocalsPointer<LocalVariables>()->field_0 = p;
|
||||
if (startFrame.GetLocalsPointer<LocalVariables>()->field_0 != null)
|
||||
{
|
||||
destruct_f77lq2b.Invoke(startFrame.GetLocalsPointer<LocalVariables>()->field_0);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
crnd_free.Invoke(startFrame.GetLocalsPointer<LocalVariables>()->field_0);
|
||||
if (ExceptionInfo.Current != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
StackFrameList.Current.Clear(startFrame);
|
||||
}
|
||||
}
|
||||
Loaded 100 of 433 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user