5 Commits
Author SHA1 Message Date
ds5678 9df8d3b80c Migrate solution file from .sln to .slnx format
Replaced the traditional Visual Studio `.sln` file with a new `.slnx` file format. The `.slnx` file uses an XML-based structure to define the solution, organizing "Solution Items" and project references. This change simplifies the solution structure but removes detailed configuration metadata previously present in the `.sln` file.
2025-11-25 18:04:26 -08:00
ds5678 44a7bee859 Updates from generator 2025-11-25 18:03:36 -08:00
ds5678 7d694d9c59 Recent changes from generation 2025-09-27 14:21:04 -07:00
ds5678 ee81b0cff8 Bump version to 1.0.3
Updated the `<VersionPrefix>` property in `Directory.Build.props`
from `1.0.2` to `1.0.3` to reflect a new release or update.
2025-09-21 21:29:29 -07:00
ds5678 293571cd58 Improve handling of mip levels 2025-09-21 21:29:10 -07:00
245 changed files with 1947 additions and 1621 deletions

No files matched your search

-41
View File
@@ -1,41 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 18
VisualStudioVersion = 18.0.11012.119
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
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssetRipper.Conversions.UnityCrunch.ConsoleApp", "AssetRipper.Conversions.UnityCrunch.ConsoleApp\AssetRipper.Conversions.UnityCrunch.ConsoleApp.csproj", "{469E74A1-200A-4F10-B9FB-121E9319FE70}"
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
{469E74A1-200A-4F10-B9FB-121E9319FE70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{469E74A1-200A-4F10-B9FB-121E9319FE70}.Debug|Any CPU.Build.0 = Debug|Any CPU
{469E74A1-200A-4F10-B9FB-121E9319FE70}.Release|Any CPU.ActiveCfg = Release|Any CPU
{469E74A1-200A-4F10-B9FB-121E9319FE70}.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
+12
View File
@@ -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>
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -10,6 +10,6 @@ internal static partial class Get_alloc_failed
[return: NativeType("bool")]
public unsafe static bool Invoke(void* @this)
{
return (unchecked((crnd_vector_f3cmzmc*)@this)->field_3 & 1) == 1;
return (unchecked((crnd_vector_uksit8*)@this)->m_alloc_failed & 1) == 1;
}
}
@@ -16,9 +16,9 @@ internal static partial class Get_alpha
{
if ((uint)x >= 4u || (uint)y >= 4u)
{
crnd_assert.Invoke(String_cahur4b.__pointer, String_yguirrd.__pointer, 2850);
crnd_assert.Invoke(String_jsxkht.__pointer, String_vvx8bt.__pointer, 2850);
}
int num = (byte)((sbyte*)(&((crnd_dxt3_block*)@this)->field_0))[(uint)((y << 1) + (x >>> 1))];
int num = (byte)((sbyte*)(&((crnd_dxt3_block*)@this)->m_alpha))[(uint)((y << 1) + (x >>> 1))];
if ((x & 1) != 0)
{
num >>>= 4;
@@ -15,33 +15,33 @@ internal static partial class Get_bits
{
if ((uint)num_bits > 32u)
{
crnd_assert.Invoke(String_bhrpdhd.__pointer, String_yguirrd.__pointer, 2642);
crnd_assert.Invoke(String_ya7rpa.__pointer, String_vvx8bt.__pointer, 2642);
}
while (((crnd_symbol_codec*)@this)->field_5 < num_bits)
while (((crnd_symbol_codec*)@this)->m_bit_count < num_bits)
{
int num = 0;
if (((crnd_symbol_codec*)@this)->field_1 != ((crnd_symbol_codec*)@this)->field_2)
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;
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 num2;
checked
{
unchecked((crnd_symbol_codec*)@this)->field_5 += 8;
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)
{
crnd_assert.Invoke(String_kf9n5db.__pointer, String_yguirrd.__pointer, 2650);
crnd_assert.Invoke(String_igi64g.__pointer, String_vvx8bt.__pointer, 2650);
}
num2 = num << 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 |= num2;
((crnd_symbol_codec*)@this)->m_bit_buf |= num2;
}
int result = ((crnd_symbol_codec*)@this)->field_4 >>> 32 - num_bits;
((crnd_symbol_codec*)@this)->field_4 <<= num_bits;
((crnd_symbol_codec*)@this)->field_5 -= num_bits;
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;
}
}
@@ -12,8 +12,8 @@ internal static partial class Get_bits_init
{
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;
}
}
}
@@ -10,13 +10,13 @@ internal static partial class Get_block_colors3
[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);
color_quad_unsigned_char_int_Assignment.Invoke(pDst, &crnd_color_quad);
color_quad_unsigned_char_int_Assignment.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;
}
@@ -10,16 +10,16 @@ internal static partial class Get_block_colors4
[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);
color_quad_unsigned_char_int_Assignment.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
{
color_quad_unsigned_char_int_Assignment.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;
}
}
@@ -6,25 +6,25 @@ 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
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_b9ijpuc*)(&((crnd_color_quad*)pDst)->field_0))->field_3 = (sbyte)l;
((anon_b9ijpuc*)(&((crnd_color_quad*)pDst)[1].field_0))->field_3 = (sbyte)h;
((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_b9ijpuc*)(&((crnd_color_quad*)pDst)[2L].field_0))->field_3 = field_;
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[2L].field))->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;
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[3L].field))->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;
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[4L].field))->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;
((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;
}
}
@@ -5,7 +5,7 @@ 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
{
[return: NativeType("unsigned int")]
public unsafe static int Invoke([NativeType("unsigned int *")] void* pDst, [NativeType("unsigned int")] int l, [NativeType("unsigned int")] int h)
@@ -5,7 +5,7 @@ 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
{
[return: NativeType("unsigned int")]
public unsafe static int Invoke([NativeType("unsigned int *")] void* pDst, [NativeType("unsigned int")] int l, [NativeType("unsigned int")] int h)
@@ -6,27 +6,27 @@ 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
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_b9ijpuc*)(&((crnd_color_quad*)pDst)->field_0))->field_3 = (sbyte)l;
((anon_b9ijpuc*)(&((crnd_color_quad*)pDst)[1].field_0))->field_3 = (sbyte)h;
((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_b9ijpuc*)(&((crnd_color_quad*)pDst)[2L].field_0))->field_3 = field_;
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[2L].field))->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;
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[3L].field))->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;
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[4L].field))->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;
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[5L].field))->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;
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[6L].field))->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;
((anon_m9uqrv*)(&((crnd_color_quad*)pDst)[7L].field))->field_3 = field_6;
return 8;
}
}
@@ -5,15 +5,15 @@ 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
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_xv25ufa.Invoke(pDst, l, h);
return Get_block_values8_ekrbu2.Invoke(pDst, l, h);
}
return Get_block_values6_7gyjbyc.Invoke(pDst, l, h);
return Get_block_values6_36ycpg.Invoke(pDst, l, h);
}
}
@@ -5,15 +5,15 @@ 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
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_ml7jl2d.Invoke(pDst, l, h);
return Get_block_values8_9fbjk8.Invoke(pDst, l, h);
}
return Get_block_values6_5klbycb.Invoke(pDst, l, h);
return Get_block_values6_8iwdqp.Invoke(pDst, l, h);
}
}
@@ -10,6 +10,6 @@ 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;
}
}
@@ -10,6 +10,6 @@ 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;
}
}
@@ -15,9 +15,9 @@ internal static partial class Get_unshifted_max_code
{
if ((uint)len < 1u || (uint)len > 16u)
{
crnd_assert.Invoke(String_ajzw4md.__pointer, String_yguirrd.__pointer, 1514);
crnd_assert.Invoke(String_s4qupc.__pointer, String_vvx8bt.__pointer, 1514);
}
int num = ((int*)(&((crnd_prefix_coding_decoder_tables*)@this)->field_8))[(uint)(len - 1)];
int num = ((int*)(&((crnd_prefix_coding_decoder_tables*)@this)->m_max_codes))[(uint)(len - 1)];
if (num == 0)
{
return -1;
@@ -17,23 +17,23 @@ internal static partial class Set_alpha
{
if ((uint)x >= 4u || (uint)y >= 4u)
{
crnd_assert.Invoke(String_cahur4b.__pointer, String_yguirrd.__pointer, 2831);
crnd_assert.Invoke(String_jsxkht.__pointer, String_vvx8bt.__pointer, 2831);
}
if ((b & 1) == 1)
{
if ((uint)num > 255u)
{
crnd_assert.Invoke(String_932ftxa.__pointer, String_yguirrd.__pointer, 2834);
crnd_assert.Invoke(String_exh4qe.__pointer, String_vvx8bt.__pointer, 2834);
}
num = (int)((uint)(num * 15 + 128) / 255u);
}
else if ((uint)num > 15u)
{
crnd_assert.Invoke(String_azii4xc.__pointer, String_yguirrd.__pointer, 2837);
crnd_assert.Invoke(String_sg8vgw.__pointer, String_vvx8bt.__pointer, 2837);
}
int num2 = (y << 1) + (x >>> 1);
int num3 = (byte)((sbyte*)(&((crnd_dxt3_block*)@this)->field_0))[(uint)num2];
((sbyte*)(&((crnd_dxt3_block*)@this)->field_0))[(uint)num2] = (sbyte)((num3 & ((15 << ((x & 1) << 2)) ^ -1)) | (num << ((x & 1) << 2)));
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)));
}
}
}
@@ -17,9 +17,9 @@ internal static partial class assign
}
unchecked
{
if (((crnd_vector_f3cmzmc*)@this)->field_2 == ((crnd_vector_f3cmzmc*)other)->field_1)
if (((crnd_vector_uksit8*)@this)->m_capacity == ((crnd_vector_uksit8*)other)->m_size)
{
resize_rzzl5xd.Invoke(@this, 0);
resize_zpvfc7.Invoke(@this, 0);
if (ExceptionInfo.Current != null)
{
return false;
@@ -27,12 +27,12 @@ internal static partial class assign
}
else
{
clear_q4odfmb.Invoke(@this);
clear_mzsqxg.Invoke(@this);
if (ExceptionInfo.Current != null)
{
return false;
}
bool flag = increase_capacity_a7boycc.Invoke(@this, ((crnd_vector_f3cmzmc*)other)->field_1, grow_hint: false);
bool flag = increase_capacity_2iysmi.Invoke(@this, ((crnd_vector_uksit8*)other)->m_size, grow_hint: false);
if (ExceptionInfo.Current != null)
{
return false;
@@ -42,8 +42,8 @@ internal static partial class assign
return false;
}
}
llvm_memcpy_p0_p0_i64.Invoke(((crnd_vector_f3cmzmc*)@this)->field_0, ((crnd_vector_f3cmzmc*)other)->field_0, (long)(uint)((crnd_vector_f3cmzmc*)other)->field_1 * 1L, isVolatile: false);
((crnd_vector_f3cmzmc*)@this)->field_1 = ((crnd_vector_f3cmzmc*)other)->field_1;
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;
}
}
@@ -10,6 +10,6 @@ internal static partial class begin
[return: NativeType("unsigned short *")]
public unsafe static void* Invoke(void* @this)
{
return unchecked((crnd_vector_rf9iywd*)@this)->field_0;
return unchecked((crnd_vector_h6df48*)@this)->m_p;
}
}
@@ -6,26 +6,26 @@ 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
internal static partial class clear_2hj7fd
{
[return: NativeType("void")]
public unsafe static void Invoke(void* @this)
{
unchecked
{
if (((crnd_vector_maaktjc*)@this)->field_0 != null)
if (((crnd_vector_rgfndh*)@this)->m_p != null)
{
destruct_array_rsqiwgc.Invoke(parameter_1: ((crnd_vector_maaktjc*)@this)->field_1, parameter_0: ((crnd_vector_maaktjc*)@this)->field_0);
crnd_free.Invoke(((crnd_vector_maaktjc*)@this)->field_0);
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_maaktjc*)@this)->field_0 = null;
((crnd_vector_maaktjc*)@this)->field_1 = 0;
((crnd_vector_maaktjc*)@this)->field_2 = 0;
((crnd_vector_rgfndh*)@this)->m_p = null;
((crnd_vector_rgfndh*)@this)->m_size = 0;
((crnd_vector_rgfndh*)@this)->m_capacity = 0;
}
((crnd_vector_maaktjc*)@this)->field_3 = 0;
((crnd_vector_rgfndh*)@this)->m_alloc_failed = 0;
}
}
}
@@ -6,21 +6,21 @@ 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
internal static partial class clear_9udjtr
{
[return: NativeType("void")]
public unsafe static void Invoke(void* @this)
{
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 && ((crnd_static_huffman_data_model*)@this)->field_2 != null)
((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_rldcmnc.Invoke(((crnd_static_huffman_data_model*)@this)->field_2);
crnd_delete_bvucig.Invoke(((crnd_static_huffman_data_model*)@this)->m_pDecode_tables);
if (ExceptionInfo.Current == null)
{
((crnd_static_huffman_data_model*)@this)->field_2 = null;
((crnd_static_huffman_data_model*)@this)->m_pDecode_tables = null;
}
}
}
@@ -6,26 +6,26 @@ 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
internal static partial class clear_hv5vjw
{
[return: NativeType("void")]
public unsafe static void Invoke(void* @this)
{
unchecked
{
if (((crnd_vector_y4ukjxd*)@this)->field_0 != null)
if (((crnd_vector_v4kyxs*)@this)->m_p != null)
{
destruct_array_h3fegud.Invoke(n: ((crnd_vector_y4ukjxd*)@this)->field_1, p: ((crnd_vector_y4ukjxd*)@this)->field_0);
crnd_free.Invoke(((crnd_vector_y4ukjxd*)@this)->field_0);
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_y4ukjxd*)@this)->field_0 = null;
((crnd_vector_y4ukjxd*)@this)->field_1 = 0;
((crnd_vector_y4ukjxd*)@this)->field_2 = 0;
((crnd_vector_v4kyxs*)@this)->m_p = null;
((crnd_vector_v4kyxs*)@this)->m_size = 0;
((crnd_vector_v4kyxs*)@this)->m_capacity = 0;
}
((crnd_vector_y4ukjxd*)@this)->field_3 = 0;
((crnd_vector_v4kyxs*)@this)->m_alloc_failed = 0;
}
}
}
@@ -1,37 +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
{
[return: NativeType("void")]
public unsafe static void Invoke(void* @this)
{
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)
{
((crnd_prefix_coding_decoder_tables*)@this)->field_13 = null;
((crnd_prefix_coding_decoder_tables*)@this)->field_12 = 0;
}
}
}
}
}
@@ -6,26 +6,26 @@ 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
internal static partial class clear_isy3cf
{
[return: NativeType("void")]
public unsafe static void Invoke(void* @this)
{
unchecked
{
if (((crnd_vector_rf9iywd*)@this)->field_0 != null)
if (((crnd_vector_h6df48*)@this)->m_p != null)
{
destruct_array_l9jmj2b.Invoke(parameter_1: ((crnd_vector_rf9iywd*)@this)->field_1, parameter_0: ((crnd_vector_rf9iywd*)@this)->field_0);
crnd_free.Invoke(((crnd_vector_rf9iywd*)@this)->field_0);
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_rf9iywd*)@this)->field_0 = null;
((crnd_vector_rf9iywd*)@this)->field_1 = 0;
((crnd_vector_rf9iywd*)@this)->field_2 = 0;
((crnd_vector_h6df48*)@this)->m_p = null;
((crnd_vector_h6df48*)@this)->m_size = 0;
((crnd_vector_h6df48*)@this)->m_capacity = 0;
}
((crnd_vector_rf9iywd*)@this)->field_3 = 0;
((crnd_vector_h6df48*)@this)->m_alloc_failed = 0;
}
}
}
@@ -6,26 +6,26 @@ 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
internal static partial class clear_mzsqxg
{
[return: NativeType("void")]
public unsafe static void Invoke(void* @this)
{
unchecked
{
if (((crnd_vector_f3cmzmc*)@this)->field_0 != null)
if (((crnd_vector_uksit8*)@this)->m_p != null)
{
destruct_array_dhbxund.Invoke(parameter_1: ((crnd_vector_f3cmzmc*)@this)->field_1, parameter_0: ((crnd_vector_f3cmzmc*)@this)->field_0);
crnd_free.Invoke(((crnd_vector_f3cmzmc*)@this)->field_0);
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_f3cmzmc*)@this)->field_0 = null;
((crnd_vector_f3cmzmc*)@this)->field_1 = 0;
((crnd_vector_f3cmzmc*)@this)->field_2 = 0;
((crnd_vector_uksit8*)@this)->m_p = null;
((crnd_vector_uksit8*)@this)->m_size = 0;
((crnd_vector_uksit8*)@this)->m_capacity = 0;
}
((crnd_vector_f3cmzmc*)@this)->field_3 = 0;
((crnd_vector_uksit8*)@this)->m_alloc_failed = 0;
}
}
}
@@ -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;
}
}
}
}
}
@@ -12,14 +12,14 @@ internal static partial class color_quad_unsigned_char_int_Assignment
{
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;
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;
}
}
@@ -13,9 +13,9 @@ internal static partial class compute_decoder_table_bits
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)
{
result = (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 result;
}
@@ -6,7 +6,7 @@ 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
{
[return: NativeType("void")]
public unsafe static void Invoke([NativeType("unsigned short *")] void* p, [NativeType("unsigned int")] int n)
@@ -6,7 +6,7 @@ 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
{
[return: NativeType("void")]
public unsafe static void Invoke([NativeType("unsigned int *")] void* p, [NativeType("unsigned int")] int n)
@@ -6,7 +6,7 @@ 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
{
[return: NativeType("void")]
public unsafe static void Invoke([NativeType("struct crnd::crn_unpacker::block_buffer_element *")] void* p, [NativeType("unsigned int")] int n)
@@ -5,7 +5,7 @@ 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
{
[return: NativeType("void")]
public unsafe static void Invoke([NativeType("unsigned int *")] void* p, [NativeType("unsigned int")] int n)
@@ -5,11 +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
{
[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);
}
}
@@ -6,7 +6,7 @@ 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
{
[return: NativeType("void")]
public unsafe static void Invoke([NativeType("unsigned char *")] void* p, [NativeType("unsigned int")] int n)
@@ -5,7 +5,7 @@ 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
{
[return: NativeType("void")]
public unsafe static void Invoke([NativeType("unsigned short *")] void* p, [NativeType("unsigned int")] int n)
@@ -5,7 +5,7 @@ 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
{
[return: NativeType("class crnd::crn_unpacker *")]
public unsafe static void* Invoke([NativeType("class crnd::crn_unpacker *")] void* p)
@@ -5,12 +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
{
[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;
}
}
@@ -5,12 +5,12 @@ 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
{
[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)
{
decoder_tables_Constructor_3v4xfjd.Invoke(p, init);
decoder_tables_Constructor_jcwqfb.Invoke(p, init);
if (ExceptionInfo.Current != null)
{
return null;
@@ -10,6 +10,6 @@ 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_94amu2d*)@this)->field_0)));
return unchecked((byte)(*(sbyte*)(&((crnd_crn_packed_uint_wqy4pm*)@this)->m_buf)));
}
}
@@ -16,7 +16,7 @@ internal static partial class crn_packed_uint_2_Assignment
{
for (int i = 0; (uint)i < 2u; i++)
{
((sbyte*)(&((crnd_crn_packed_uint_hnsywfd*)@this)->field_0))[(uint)i] = (sbyte)(num >>> 24);
((sbyte*)(&((crnd_crn_packed_uint_y3p293*)@this)->m_buf))[(uint)i] = (sbyte)(num >>> 24);
num <<= 8;
}
return @this;
@@ -10,6 +10,6 @@ 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_hnsywfd*)@this)->field_0)) << 8) | (byte)((sbyte*)(&((crnd_crn_packed_uint_hnsywfd*)@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]);
}
}
@@ -10,6 +10,6 @@ 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_fru7ewb*)@this)->field_0)) << 16) | ((byte)((sbyte*)(&((crnd_crn_packed_uint_fru7ewb*)@this)->field_0))[1] << 8) | (byte)((sbyte*)(&((crnd_crn_packed_uint_fru7ewb*)@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]);
}
}
@@ -16,7 +16,7 @@ internal static partial class crn_packed_uint_4_Assignment
{
for (int i = 0; (uint)i < 4u; i++)
{
((sbyte*)(&((crnd_crn_packed_uint_jymcebc*)@this)->field_0))[(uint)i] = (sbyte)(num >>> 24);
((sbyte*)(&((crnd_crn_packed_uint_25ciii*)@this)->m_buf))[(uint)i] = (sbyte)(num >>> 24);
num <<= 8;
}
return @this;
@@ -10,6 +10,6 @@ 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_jymcebc*)@this)->field_0)) << 24) | ((byte)((sbyte*)(&((crnd_crn_packed_uint_jymcebc*)@this)->field_0))[1] << 16) | ((byte)((sbyte*)(&((crnd_crn_packed_uint_jymcebc*)@this)->field_0))[2] << 8) | (byte)((sbyte*)(&((crnd_crn_packed_uint_jymcebc*)@this)->field_0))[3]);
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]);
}
}
@@ -12,21 +12,21 @@ internal static partial class crn_unpacker_Constructor
{
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_);
InlineArray2_crnd_static_huffman_data_model* 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;
@@ -35,14 +35,14 @@ internal static partial class crn_unpacker_Constructor
intPtr = ptr4;
continue;
}
InlineArray2_crnd_static_huffman_data_model* 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;
@@ -51,30 +51,30 @@ internal static partial class crn_unpacker_Constructor
intPtr2 = ptr8;
continue;
}
crnd_vector_maaktjc* 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_maaktjc* 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_rf9iywd* 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_rf9iywd* 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)
{
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;
@@ -83,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;
@@ -92,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;
@@ -101,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;
@@ -110,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)
{
@@ -154,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)
{
@@ -198,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;
@@ -11,34 +11,34 @@ internal static partial class crn_unpacker_Destructor
{
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));
@@ -47,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));
@@ -63,13 +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);
static_huffman_data_model_Destructor.Invoke(&((crnd_crn_unpacker*)@this)->m_reference_encoding_dm);
}
}
}
@@ -14,7 +14,7 @@ internal static partial class crnd_assert
public unsafe static void Invoke([NativeType("char const *")] void* pExp, [NativeType("char const *")] void* pFile, [NativeType("unsigned int")] int line)
{
InlineArray512_SByte inlineArray512_SByte = default(InlineArray512_SByte);
sprintf.Invoke(&inlineArray512_SByte, String_tghxvvc.__pointer, default(ReadOnlySpan<nint>));
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())
@@ -23,7 +23,7 @@ internal static partial class crnd_create_segmented_file
{
return false;
}
if ((crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_10) & 1) != 0)
if ((crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_flags) & 1) != 0)
{
return false;
}
@@ -33,13 +33,13 @@ internal static partial class crnd_create_segmented_file
return false;
}
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)->field_10) | 1, @this: &((crnd_crn_header*)pBase_data)->field_10);
crn_packed_uint_4_Assignment.Invoke(&((crnd_crn_header*)pBase_data)->field_3, num);
crn_packed_uint_2_Assignment.Invoke(val: (ushort)crc16.Invoke(len: crn_packed_uint_4_ToUInt32.Invoke(&((crnd_crn_header*)pBase_data)->field_3) - crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)pBase_data)->field_1), pBuf: (byte*)pBase_data + (uint)crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)pBase_data)->field_1), crc: 0), @this: &((crnd_crn_header*)pBase_data)->field_4);
crn_packed_uint_2_Assignment.Invoke(val: (ushort)crc16.Invoke(len: crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)pBase_data)->field_1) - (int)((long)(&((crnd_crn_header*)pBase_data)->field_3) - (long)pBase_data), pBuf: &((crnd_crn_header*)pBase_data)->field_3, crc: 0), @this: &((crnd_crn_header*)pBase_data)->field_2);
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))
{
crnd_assert.Invoke(String_2bpyz2d.__pointer, String_yguirrd.__pointer, 2374);
crnd_assert.Invoke(String_82dmwb.__pointer, String_vvx8bt.__pointer, 2374);
}
return true;
}
@@ -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;
}
}
@@ -6,7 +6,7 @@ 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
internal static partial class crnd_delete_array_wgct9q
{
[return: NativeType("void")]
public unsafe static void Invoke([NativeType("unsigned int *")] void* p)
@@ -18,9 +18,9 @@ internal static partial class crnd_delete_array_nughn5d
int num = *(int*)((byte*)p + -4);
if (num == 0 || num != (*(int*)((byte*)p + -8) ^ -1))
{
crnd_assert.Invoke(String_zzvckkc.__pointer, String_yguirrd.__pointer, 347);
crnd_assert.Invoke(String_576cmw.__pointer, String_vvx8bt.__pointer, 347);
}
destruct_array_lrbdoxa.Invoke(p, num);
destruct_array_yfmkw8.Invoke(p, num);
crnd_free.Invoke((byte*)p + -8);
if (ExceptionInfo.Current == null)
{
@@ -6,7 +6,7 @@ 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
internal static partial class crnd_delete_array_yym6az
{
[return: NativeType("void")]
public unsafe static void Invoke([NativeType("unsigned short *")] void* p)
@@ -18,9 +18,9 @@ internal static partial class crnd_delete_array_rytswyc
int num = *(int*)((byte*)p + -4);
if (num == 0 || num != (*(int*)((byte*)p + -8) ^ -1))
{
crnd_assert.Invoke(String_zzvckkc.__pointer, String_yguirrd.__pointer, 347);
crnd_assert.Invoke(String_576cmw.__pointer, String_vvx8bt.__pointer, 347);
}
destruct_array_viasmsc.Invoke(p, num);
destruct_array_v2phiu.Invoke(p, num);
crnd_free.Invoke((byte*)p + -8);
if (ExceptionInfo.Current == null)
{
@@ -5,7 +5,7 @@ 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_rldcmnc
internal static partial class crnd_delete_bvucig
{
[return: NativeType("void")]
public unsafe static void Invoke([NativeType("class crnd::prefix_coding::decoder_tables *")] void* p)
@@ -14,7 +14,7 @@ internal static partial class crnd_delete_rldcmnc
{
return;
}
destruct_py7r2pc.Invoke(p);
destruct_kgci2b.Invoke(p);
if (ExceptionInfo.Current == null)
{
crnd_free.Invoke(p);
@@ -5,7 +5,7 @@ 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
internal static partial class crnd_delete_ps427s
{
[return: NativeType("void")]
public unsafe static void Invoke([NativeType("class crnd::crn_unpacker *")] void* p)
@@ -14,7 +14,7 @@ internal static partial class crnd_delete_e7rwdhb
{
return;
}
destruct_f77lq2b.Invoke(p);
destruct_msam3p.Invoke(p);
if (ExceptionInfo.Current == null)
{
crnd_free.Invoke(p);
@@ -18,7 +18,7 @@ internal static partial class crnd_free
{
if (((int)p & 7) != 0)
{
crnd_mem_error.Invoke(String_gcwah5d.__pointer);
crnd_mem_error.Invoke(String_6fnra8.__pointer);
return;
}
((delegate*<void*, long, void*, bool, void*, void*>)g_pRealloc.Value)(p, 0L, null, true, g_pUser_data.Value);
@@ -30,7 +30,7 @@ internal static partial class crnd_get_crn_format_bits_per_texel
case 14:
return 8;
default:
crnd_assert.Invoke(String_xxn2wad.__pointer, String_yguirrd.__pointer, 2165);
crnd_assert.Invoke(String_ak4am9.__pointer, String_vvx8bt.__pointer, 2165);
return 0;
}
}
@@ -16,11 +16,11 @@ internal static partial class crnd_get_header
{
return null;
}
if (crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)pData)->field_0) != 18552)
if (crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)pData)->m_sig) != 18552)
{
return null;
}
if ((ulong)(uint)crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)pData)->field_1) < 74uL || (uint)data_size < (uint)crn_packed_uint_4_ToUInt32.Invoke(&((crnd_crn_header*)pData)->field_3))
if ((ulong)(uint)crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)pData)->m_header_size) < 74uL || (uint)data_size < (uint)crn_packed_uint_4_ToUInt32.Invoke(&((crnd_crn_header*)pData)->m_data_size))
{
return null;
}
@@ -25,17 +25,17 @@ internal static partial class crnd_get_level_data
{
return null;
}
if ((uint)level_index >= (uint)crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_7))
if ((uint)level_index >= (uint)crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_levels))
{
return null;
}
int num = crn_packed_uint_4_ToUInt32.Invoke((byte*)(&((crnd_crn_header*)ptr)->field_20) + (nint)(uint)level_index * (nint)sizeof(crnd_crn_packed_uint_jymcebc));
int num = crn_packed_uint_4_ToUInt32.Invoke((byte*)(&((crnd_crn_header*)ptr)->m_level_ofs) + (nint)(uint)level_index * (nint)sizeof(crnd_crn_packed_uint_25ciii));
if (pSize != null)
{
int num2 = data_size;
if ((uint)(level_index + 1) < (uint)crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_7))
if ((uint)(level_index + 1) < (uint)crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_levels))
{
num2 = crn_packed_uint_4_ToUInt32.Invoke((byte*)(&((crnd_crn_header*)ptr)->field_20) + (nint)(uint)(level_index + 1) * (nint)sizeof(crnd_crn_packed_uint_jymcebc));
num2 = crn_packed_uint_4_ToUInt32.Invoke((byte*)(&((crnd_crn_header*)ptr)->m_level_ofs) + (nint)(uint)(level_index + 1) * (nint)sizeof(crnd_crn_packed_uint_25ciii));
}
*(int*)pSize = num2 - num;
}
@@ -16,7 +16,7 @@ internal static partial class crnd_get_level_info
{
return false;
}
if ((long)(uint)((crnd_crn_level_info*)pLevel_info)->field_0 != 32L)
if ((long)(uint)((crnd_crn_level_info*)pLevel_info)->m_struct_size != 32L)
{
return false;
}
@@ -25,19 +25,19 @@ internal static partial class crnd_get_level_info
{
return false;
}
if ((uint)level_index >= (uint)crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_7))
if ((uint)level_index >= (uint)crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_levels))
{
return false;
}
int num = maximum.Invoke(1, crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_5) >>> level_index);
int num2 = maximum.Invoke(1, crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_6) >>> level_index);
((crnd_crn_level_info*)pLevel_info)->field_1 = num;
((crnd_crn_level_info*)pLevel_info)->field_2 = num2;
((crnd_crn_level_info*)pLevel_info)->field_3 = crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_8);
((crnd_crn_level_info*)pLevel_info)->field_4 = num + 3 >>> 2;
((crnd_crn_level_info*)pLevel_info)->field_5 = num2 + 3 >>> 2;
((crnd_crn_level_info*)pLevel_info)->field_6 = InstructionHelper.Select((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_9) != 0) ? (crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_9) == 9) : true, 8, 16);
((crnd_crn_level_info*)pLevel_info)->field_7 = crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_9);
int num = maximum.Invoke(1, crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_width) >>> level_index);
int num2 = maximum.Invoke(1, crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_height) >>> level_index);
((crnd_crn_level_info*)pLevel_info)->m_width = num;
((crnd_crn_level_info*)pLevel_info)->m_height = num2;
((crnd_crn_level_info*)pLevel_info)->m_faces = crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_faces);
((crnd_crn_level_info*)pLevel_info)->m_blocks_x = num + 3 >>> 2;
((crnd_crn_level_info*)pLevel_info)->m_blocks_y = num2 + 3 >>> 2;
((crnd_crn_level_info*)pLevel_info)->m_bytes_per_block = InstructionHelper.Select((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_format) != 0) ? (crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_format) == 9) : true, 8, 16);
((crnd_crn_level_info*)pLevel_info)->m_format = crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_format);
return true;
}
}
@@ -21,7 +21,7 @@ internal static partial class crnd_get_segmented_file_size
{
return 0;
}
return maximum.Invoke(maximum.Invoke(maximum.Invoke(maximum.Invoke(maximum.Invoke(crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_1), crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_14.field_0) + crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_14.field_1)), crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_15.field_0) + crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_15.field_1)), crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_16.field_0) + crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_16.field_1)), crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_17.field_0) + crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_17.field_1)), crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_19) + crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_18));
return maximum.Invoke(maximum.Invoke(maximum.Invoke(maximum.Invoke(maximum.Invoke(crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_header_size), crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_color_endpoints.m_ofs) + crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_color_endpoints.m_size)), crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_color_selectors.m_ofs) + crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_color_selectors.m_size)), crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_alpha_endpoints.m_ofs) + crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_alpha_endpoints.m_size)), crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_alpha_selectors.m_ofs) + crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_alpha_selectors.m_size)), crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_tables_ofs) + crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_tables_size));
}
}
}
@@ -16,7 +16,7 @@ internal static partial class crnd_get_texture_info
{
return false;
}
if ((long)(uint)((crnd_crn_texture_info*)pInfo)->field_0 != 36L)
if ((long)(uint)((crnd_crn_texture_info*)pInfo)->m_struct_size != 36L)
{
return false;
}
@@ -25,14 +25,14 @@ internal static partial class crnd_get_texture_info
{
return false;
}
((crnd_crn_texture_info*)pInfo)->field_1 = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_5);
((crnd_crn_texture_info*)pInfo)->field_2 = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_6);
((crnd_crn_texture_info*)pInfo)->field_3 = crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_7);
((crnd_crn_texture_info*)pInfo)->field_4 = crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_8);
((crnd_crn_texture_info*)pInfo)->field_8 = crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_9);
((crnd_crn_texture_info*)pInfo)->field_5 = InstructionHelper.Select((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_9) == 0) ? true : ((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_9) == 9) ? true : ((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_9) == 10) ? true : ((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_9) != 11) ? (crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_9) == 13) : true))), 8, 16);
((crnd_crn_texture_info*)pInfo)->field_6 = crn_packed_uint_4_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_12);
((crnd_crn_texture_info*)pInfo)->field_7 = crn_packed_uint_4_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_13);
((crnd_crn_texture_info*)pInfo)->m_width = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_width);
((crnd_crn_texture_info*)pInfo)->m_height = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_height);
((crnd_crn_texture_info*)pInfo)->m_levels = crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_levels);
((crnd_crn_texture_info*)pInfo)->m_faces = crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_faces);
((crnd_crn_texture_info*)pInfo)->m_format = crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_format);
((crnd_crn_texture_info*)pInfo)->m_bytes_per_block = InstructionHelper.Select((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_format) == 0) ? true : ((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_format) == 9) ? true : ((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_format) == 10) ? true : ((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_format) != 11) ? (crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_format) == 13) : true))), 8, 16);
((crnd_crn_texture_info*)pInfo)->m_userdata0 = crn_packed_uint_4_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_userdata0);
((crnd_crn_texture_info*)pInfo)->m_userdata1 = crn_packed_uint_4_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_userdata1);
return true;
}
}
@@ -28,7 +28,7 @@ internal static partial class crnd_malloc
void* ptr;
if ((ulong)num > 2147418112uL)
{
crnd_mem_error.Invoke(String_ypy7scc.__pointer);
crnd_mem_error.Invoke(String_mqjrcv.__pointer);
ptr = null;
}
else
@@ -48,14 +48,14 @@ internal static partial class crnd_malloc
}
if (ptr3 == null || (ulong)localsPointer->field_0 < (ulong)num)
{
crnd_mem_error.Invoke(String_xewaojb.__pointer);
crnd_mem_error.Invoke(String_eafej9.__pointer);
ptr = null;
}
else
{
if (((int)ptr3 & 7) != 0)
{
crnd_assert.Invoke(String_42humaa.__pointer, String_yguirrd.__pointer, 2017);
crnd_assert.Invoke(String_7eewk9.__pointer, String_vvx8bt.__pointer, 2017);
}
ptr = ptr3;
}
@@ -10,6 +10,6 @@ internal static partial class crnd_mem_error
[return: NativeType("void")]
public unsafe static void Invoke([NativeType("char const *")] void* p_msg)
{
crnd_assert.Invoke(p_msg, String_yguirrd.__pointer, 1993);
crnd_assert.Invoke(p_msg, String_vvx8bt.__pointer, 1993);
}
}
@@ -18,7 +18,7 @@ internal static partial class crnd_msize
{
if (((int)p & 7) != 0)
{
crnd_mem_error.Invoke(String_zijibvd.__pointer);
crnd_mem_error.Invoke(String_x22k5v.__pointer);
return 0L;
}
long result = ((delegate*<void*, void*, long>)g_pMSize.Value)(p, g_pUser_data.Value);
@@ -5,7 +5,7 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
[MangledName("??$crnd_new@Vdecoder_tables@prefix_coding@crnd@@@crnd@@YAPEAVdecoder_tables@prefix_coding@0@AEBV120@@Z")]
[DemangledName("class crnd::prefix_coding::decoder_tables * __cdecl crnd::crnd_new<class crnd::prefix_coding::decoder_tables>(class crnd::prefix_coding::decoder_tables const &)")]
[CleanName("crnd_new")]
internal static partial class crnd_new_vzd3zqa
internal static partial class crnd_new_485jak
{
[return: NativeType("class crnd::prefix_coding::decoder_tables *")]
public unsafe static void* Invoke([NativeType("class crnd::prefix_coding::decoder_tables const &")] void* init)
@@ -20,7 +20,7 @@ internal static partial class crnd_new_vzd3zqa
{
return null;
}
void* result = construct_zybj4yc.Invoke(ptr2, init);
void* result = construct_va3fwv.Invoke(ptr2, init);
if (ExceptionInfo.Current != null)
{
return null;
@@ -5,7 +5,7 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
[MangledName("??$crnd_new_array@G@crnd@@YAPEAGI@Z")]
[DemangledName("unsigned short * __cdecl crnd::crnd_new_array<unsigned short>(unsigned int)")]
[CleanName("crnd_new_array")]
internal static partial class crnd_new_array_ovofsdb
internal static partial class crnd_new_array_ped3ba
{
[return: NativeType("unsigned short *")]
public unsafe static void* Invoke([NativeType("unsigned int")] int num)
@@ -30,7 +30,7 @@ internal static partial class crnd_new_array_ovofsdb
void* ptr3 = (byte*)ptr2 + 8;
*(int*)((byte*)ptr3 + -4) = num2;
*(int*)((byte*)ptr3 + -8) = num2 ^ -1;
construct_array_pri7s5c.Invoke(ptr3, num2);
construct_array_smzb78.Invoke(ptr3, num2);
return ptr3;
}
}
@@ -5,7 +5,7 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
[MangledName("??$crnd_new_array@I@crnd@@YAPEAII@Z")]
[DemangledName("unsigned int * __cdecl crnd::crnd_new_array<unsigned int>(unsigned int)")]
[CleanName("crnd_new_array")]
internal static partial class crnd_new_array_linsntd
internal static partial class crnd_new_array_zqdtgg
{
[return: NativeType("unsigned int *")]
public unsafe static void* Invoke([NativeType("unsigned int")] int num)
@@ -30,7 +30,7 @@ internal static partial class crnd_new_array_linsntd
void* ptr3 = (byte*)ptr2 + 8;
*(int*)((byte*)ptr3 + -4) = num2;
*(int*)((byte*)ptr3 + -8) = num2 ^ -1;
construct_array_rijpqya.Invoke(ptr3, num2);
construct_array_7hpyj8.Invoke(ptr3, num2);
return ptr3;
}
}
@@ -5,7 +5,7 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
[MangledName("??$crnd_new@Vcrn_unpacker@crnd@@@crnd@@YAPEAVcrn_unpacker@0@XZ")]
[DemangledName("class crnd::crn_unpacker * __cdecl crnd::crnd_new<class crnd::crn_unpacker>(void)")]
[CleanName("crnd_new")]
internal static partial class crnd_new_xzix9sb
internal static partial class crnd_new_jsasrf
{
[return: NativeType("class crnd::crn_unpacker *")]
public unsafe static void* Invoke()
@@ -20,7 +20,7 @@ internal static partial class crnd_new_xzix9sb
{
return null;
}
void* result = construct_bzfae7a.Invoke(ptr2);
void* result = construct_fgrjha.Invoke(ptr2);
if (ExceptionInfo.Current != null)
{
return null;
@@ -5,7 +5,7 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
[MangledName("??$crnd_new@Vdecoder_tables@prefix_coding@crnd@@@crnd@@YAPEAVdecoder_tables@prefix_coding@0@XZ")]
[DemangledName("class crnd::prefix_coding::decoder_tables * __cdecl crnd::crnd_new<class crnd::prefix_coding::decoder_tables>(void)")]
[CleanName("crnd_new")]
internal static partial class crnd_new_9bg4xgd
internal static partial class crnd_new_nwmzm6
{
[return: NativeType("class crnd::prefix_coding::decoder_tables *")]
public unsafe static void* Invoke()
@@ -20,6 +20,6 @@ internal static partial class crnd_new_9bg4xgd
{
return null;
}
return construct_e5fhx3a.Invoke(ptr2);
return construct_uri2px.Invoke(ptr2);
}
}
@@ -24,12 +24,12 @@ internal static partial class crnd_realloc
void* ptr;
if (((int)p & 7) != 0)
{
crnd_mem_error.Invoke(String_ifury7b.__pointer);
crnd_mem_error.Invoke(String_f3peyu.__pointer);
ptr = null;
}
else if ((ulong)size > 2147418112uL)
{
crnd_mem_error.Invoke(String_ypy7scc.__pointer);
crnd_mem_error.Invoke(String_mqjrcv.__pointer);
ptr = null;
}
else
@@ -49,7 +49,7 @@ internal static partial class crnd_realloc
}
if (((int)ptr3 & 7) != 0)
{
crnd_assert.Invoke(String_42humaa.__pointer, String_yguirrd.__pointer, 2039);
crnd_assert.Invoke(String_7eewk9.__pointer, String_vvx8bt.__pointer, 2039);
}
ptr = ptr3;
}
@@ -6,12 +6,12 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
[MangledName("?crnd_trace@crnd@@YAXPEBDZZ")]
[DemangledName("void __cdecl crnd::crnd_trace(char const *, ...)")]
[CleanName("crnd_trace")]
internal static partial class crnd_trace_53itvya
internal static partial class crnd_trace_7532hv
{
public unsafe static void Invoke(void* pFmt, ReadOnlySpan<nint> args)
{
void* args2 = null;
InstructionHelper.VAStart(&args2, args);
crnd_trace_5g37v2a.Invoke(pFmt, args2);
crnd_trace_kv3t38.Invoke(pFmt, args2);
}
}
@@ -6,7 +6,7 @@ namespace AssetRipper.Conversions.UnityCrunch.GlobalFunctions;
[MangledName("?crnd_trace@crnd@@YAXPEBDPEAD@Z")]
[DemangledName("void __cdecl crnd::crnd_trace(char const *, char *)")]
[CleanName("crnd_trace")]
internal static partial class crnd_trace_5g37v2a
internal static partial class crnd_trace_kv3t38
{
[return: NativeType("void")]
public unsafe static void Invoke([NativeType("char const *")] void* pFmt, [NativeType("char *")] void* args)
@@ -13,7 +13,7 @@ internal static partial class crnd_unpack_begin
{
return null;
}
void* ptr = crnd_new_xzix9sb.Invoke();
void* ptr = crnd_new_jsasrf.Invoke();
if (ExceptionInfo.Current != null)
{
return null;
@@ -23,14 +23,14 @@ internal static partial class crnd_unpack_begin
{
return null;
}
bool flag = init_lqqdgrc.Invoke(ptr2, pData, data_size);
bool flag = init_4dt3g9.Invoke(ptr2, pData, data_size);
if (ExceptionInfo.Current != null)
{
return null;
}
if (!flag)
{
crnd_delete_e7rwdhb.Invoke(ptr2);
crnd_delete_ps427s.Invoke(ptr2);
if (ExceptionInfo.Current != null)
{
return null;
@@ -17,7 +17,7 @@ internal static partial class crnd_unpack_end
{
return false;
}
crnd_delete_e7rwdhb.Invoke(pContext);
crnd_delete_ps427s.Invoke(pContext);
if (ExceptionInfo.Current != null)
{
return false;
@@ -17,7 +17,7 @@ internal static partial class crnd_unpack_level
{
return false;
}
bool result = unpack_level_cvfjdga.Invoke(pContext, pDst, dst_size_in_bytes, row_pitch_in_bytes, level_index);
bool result = unpack_level_vni4dg.Invoke(pContext, pDst, dst_size_in_bytes, row_pitch_in_bytes, level_index);
if (ExceptionInfo.Current != null)
{
return false;
@@ -17,7 +17,7 @@ internal static partial class crnd_unpack_level_segmented
{
return false;
}
bool result = unpack_level_zjb72ec.Invoke(pContext, pSrc, src_size_in_bytes, pDst, dst_size_in_bytes, row_pitch_in_bytes, level_index);
bool result = unpack_level_u9ch6s.Invoke(pContext, pSrc, src_size_in_bytes, pDst, dst_size_in_bytes, row_pitch_in_bytes, level_index);
if (ExceptionInfo.Current != null)
{
return false;
@@ -15,11 +15,11 @@ internal static partial class crnd_validate_file
{
if (pFile_info != null)
{
if ((long)(uint)((crnd_crn_file_info*)pFile_info)->field_0 != 104L)
if ((long)(uint)((crnd_crn_file_info*)pFile_info)->m_struct_size != 104L)
{
return false;
}
llvm_memset_p0_i64.Invoke(&((crnd_crn_file_info*)pFile_info)->field_0 + 1, 0, 100L, isVolatile: false);
llvm_memset_p0_i64.Invoke(&((crnd_crn_file_info*)pFile_info)->m_struct_size + 1, 0, 100L, isVolatile: false);
}
if (pData == null || (uint)data_size < 62u)
{
@@ -30,55 +30,55 @@ internal static partial class crnd_validate_file
{
return false;
}
if ((ushort)crc16.Invoke(len: (int)checked(unchecked((uint)crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_1)) - unchecked((long)(&((crnd_crn_header*)ptr)->field_3) - (long)ptr)), pBuf: &((crnd_crn_header*)ptr)->field_3, crc: 0) != crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_2))
if ((ushort)crc16.Invoke(len: (int)checked(unchecked((uint)crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_header_size)) - unchecked((long)(&((crnd_crn_header*)ptr)->m_data_size) - (long)ptr)), pBuf: &((crnd_crn_header*)ptr)->m_data_size, crc: 0) != crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_header_crc16))
{
return false;
}
if ((ushort)crc16.Invoke(len: crn_packed_uint_4_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_3) - crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_1), pBuf: (byte*)pData + (uint)crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_1), crc: 0) != crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_4))
if ((ushort)crc16.Invoke(len: crn_packed_uint_4_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_data_size) - crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_header_size), pBuf: (byte*)pData + (uint)crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_header_size), crc: 0) != crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_data_crc16))
{
return false;
}
if (crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_8) != 1 && crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_8) != 6)
if (crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_faces) != 1 && crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_faces) != 6)
{
return false;
}
if ((uint)crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_5) < 1u || (uint)crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_5) > 4096u)
if ((uint)crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_width) < 1u || (uint)crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_width) > 4096u)
{
return false;
}
if ((uint)crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_6) < 1u || (uint)crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_6) > 4096u)
if ((uint)crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_height) < 1u || (uint)crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_height) > 4096u)
{
return false;
}
if ((uint)crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_7) < 1u || (uint)crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_7) > (uint)compute_max_mips.Invoke(height: crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_6), width: crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_5)))
if ((uint)crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_levels) < 1u || (uint)crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_levels) > (uint)compute_max_mips.Invoke(height: crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_height), width: crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_width)))
{
return false;
}
if (crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_9) < 0 || crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_9) >= 15)
if (crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_format) < 0 || crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_format) >= 15)
{
return false;
}
if (pFile_info != null)
{
((crnd_crn_file_info*)pFile_info)->field_1 = crn_packed_uint_4_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_3);
((crnd_crn_file_info*)pFile_info)->field_2 = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_1);
((crnd_crn_file_info*)pFile_info)->field_3 = crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_14.field_1) + crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_15.field_1) + crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_16.field_1) + crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_17.field_1);
((crnd_crn_file_info*)pFile_info)->field_4 = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_18);
((crnd_crn_file_info*)pFile_info)->field_5 = crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_7);
for (int i = 0; (uint)i < (uint)crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_7); i++)
((crnd_crn_file_info*)pFile_info)->m_actual_data_size = crn_packed_uint_4_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_data_size);
((crnd_crn_file_info*)pFile_info)->m_header_size = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_header_size);
((crnd_crn_file_info*)pFile_info)->m_total_palette_size = crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_color_endpoints.m_size) + crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_color_selectors.m_size) + crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_alpha_endpoints.m_size) + crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_alpha_selectors.m_size);
((crnd_crn_file_info*)pFile_info)->m_tables_size = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_tables_size);
((crnd_crn_file_info*)pFile_info)->m_levels = crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_levels);
for (int i = 0; (uint)i < (uint)crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_levels); i++)
{
int num = crn_packed_uint_4_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_3);
if ((uint)(i + 1) < (uint)crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_7))
int num = crn_packed_uint_4_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_data_size);
if ((uint)(i + 1) < (uint)crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_levels))
{
num = crn_packed_uint_4_ToUInt32.Invoke((byte*)(&((crnd_crn_header*)ptr)->field_20) + (nint)(uint)(i + 1) * (nint)sizeof(crnd_crn_packed_uint_jymcebc));
num = crn_packed_uint_4_ToUInt32.Invoke((byte*)(&((crnd_crn_header*)ptr)->m_level_ofs) + (nint)(uint)(i + 1) * (nint)sizeof(crnd_crn_packed_uint_25ciii));
}
int num2 = num - crn_packed_uint_4_ToUInt32.Invoke((byte*)(&((crnd_crn_header*)ptr)->field_20) + (nint)(uint)i * (nint)sizeof(crnd_crn_packed_uint_jymcebc));
((int*)(&((crnd_crn_file_info*)pFile_info)->field_6))[(uint)i] = num2;
int num2 = num - crn_packed_uint_4_ToUInt32.Invoke((byte*)(&((crnd_crn_header*)ptr)->m_level_ofs) + (nint)(uint)i * (nint)sizeof(crnd_crn_packed_uint_25ciii));
((int*)(&((crnd_crn_file_info*)pFile_info)->m_level_compressed_size))[(uint)i] = num2;
}
((crnd_crn_file_info*)pFile_info)->field_7 = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_14.field_2);
((crnd_crn_file_info*)pFile_info)->field_8 = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_15.field_2);
((crnd_crn_file_info*)pFile_info)->field_9 = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_16.field_2);
((crnd_crn_file_info*)pFile_info)->field_10 = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->field_17.field_2);
((crnd_crn_file_info*)pFile_info)->m_color_endpoint_palette_entries = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_color_endpoints.m_num);
((crnd_crn_file_info*)pFile_info)->m_color_selector_palette_entries = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_color_selectors.m_num);
((crnd_crn_file_info*)pFile_info)->m_alpha_endpoint_palette_entries = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_alpha_endpoints.m_num);
((crnd_crn_file_info*)pFile_info)->m_alpha_selector_palette_entries = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)ptr)->m_alpha_selectors.m_num);
}
return true;
}
@@ -13,43 +13,43 @@ internal static partial class decode
{
unchecked
{
void* field_ = ((crnd_static_huffman_data_model*)model)->field_2;
if (((crnd_symbol_codec*)@this)->field_5 < 24)
void* pDecode_tables = ((crnd_static_huffman_data_model*)model)->m_pDecode_tables;
if (((crnd_symbol_codec*)@this)->m_bit_count < 24)
{
if (((crnd_symbol_codec*)@this)->field_5 < 16)
if (((crnd_symbol_codec*)@this)->m_bit_count < 16)
{
int num = 0;
int num2 = 0;
void* ptr = ((crnd_symbol_codec*)@this)->field_1;
if (ptr < ((crnd_symbol_codec*)@this)->field_2)
void* ptr = ((crnd_symbol_codec*)@this)->m_pDecode_buf_next;
if (ptr < ((crnd_symbol_codec*)@this)->m_pDecode_buf_end)
{
void* ptr2 = ptr;
ptr = (byte*)ptr2 + 1;
num = (byte)(*(sbyte*)ptr2);
}
if (ptr < ((crnd_symbol_codec*)@this)->field_2)
if (ptr < ((crnd_symbol_codec*)@this)->m_pDecode_buf_end)
{
void* ptr3 = ptr;
ptr = (byte*)ptr3 + 1;
num2 = (byte)(*(sbyte*)ptr3);
}
((crnd_symbol_codec*)@this)->field_1 = ptr;
((crnd_symbol_codec*)@this)->m_pDecode_buf_next = ptr;
int num3;
checked
{
unchecked((crnd_symbol_codec*)@this)->field_5 += 16;
num3 = ((num << 8) | num2) << 32 - unchecked((crnd_symbol_codec*)@this)->field_5;
unchecked((crnd_symbol_codec*)@this)->m_bit_count += 16;
num3 = ((num << 8) | num2) << 32 - unchecked((crnd_symbol_codec*)@this)->m_bit_count;
}
((crnd_symbol_codec*)@this)->field_4 |= num3;
((crnd_symbol_codec*)@this)->m_bit_buf |= num3;
}
else
{
int num4;
if (((crnd_symbol_codec*)@this)->field_1 < ((crnd_symbol_codec*)@this)->field_2)
if (((crnd_symbol_codec*)@this)->m_pDecode_buf_next < ((crnd_symbol_codec*)@this)->m_pDecode_buf_end)
{
void** field_2 = &((crnd_symbol_codec*)@this)->field_1;
void* ptr4 = *field_2;
*field_2 = (byte*)ptr4 + 1;
void** pDecode_buf_next = &((crnd_symbol_codec*)@this)->m_pDecode_buf_next;
void* ptr4 = *pDecode_buf_next;
*pDecode_buf_next = (byte*)ptr4 + 1;
num4 = (byte)(*(sbyte*)ptr4);
}
else
@@ -60,44 +60,44 @@ internal static partial class decode
int num6;
checked
{
unchecked((crnd_symbol_codec*)@this)->field_5 += 8;
num6 = num5 << 32 - unchecked((crnd_symbol_codec*)@this)->field_5;
unchecked((crnd_symbol_codec*)@this)->m_bit_count += 8;
num6 = num5 << 32 - unchecked((crnd_symbol_codec*)@this)->m_bit_count;
}
((crnd_symbol_codec*)@this)->field_4 |= num6;
((crnd_symbol_codec*)@this)->m_bit_buf |= num6;
}
}
int num7 = (((crnd_symbol_codec*)@this)->field_4 >>> 16) + 1;
int num7 = (((crnd_symbol_codec*)@this)->m_bit_buf >>> 16) + 1;
int num9;
int i;
if ((uint)num7 <= (uint)((crnd_prefix_coding_decoder_tables*)field_)->field_4)
if ((uint)num7 <= (uint)((crnd_prefix_coding_decoder_tables*)pDecode_tables)->m_table_max_code)
{
int num8 = ((int*)((crnd_prefix_coding_decoder_tables*)field_)->field_11)[(uint)(((crnd_symbol_codec*)@this)->field_4 >>> 32 - ((crnd_prefix_coding_decoder_tables*)field_)->field_2)];
int num8 = ((int*)((crnd_prefix_coding_decoder_tables*)pDecode_tables)->m_lookup)[(uint)(((crnd_symbol_codec*)@this)->m_bit_buf >>> 32 - ((crnd_prefix_coding_decoder_tables*)pDecode_tables)->m_table_bits)];
if (num8 == -1)
{
crnd_assert.Invoke(String_fwybtzb.__pointer, String_yguirrd.__pointer, 2691);
crnd_assert.Invoke(String_hdsqwd.__pointer, String_vvx8bt.__pointer, 2691);
}
num9 = num8 & 0xFFFF;
i = num8 >>> 16;
if ((byte)(*(sbyte*)vector_unsigned_char_Index_3lowkad.Invoke(&((crnd_static_huffman_data_model*)model)->field_1, num9)) != i)
if ((byte)(*(sbyte*)vector_unsigned_char_Operator_btiznu.Invoke(&((crnd_static_huffman_data_model*)model)->m_code_sizes, num9)) != i)
{
crnd_assert.Invoke(String_e4i4x9a.__pointer, String_yguirrd.__pointer, 2695);
crnd_assert.Invoke(String_8pbqr2.__pointer, String_vvx8bt.__pointer, 2695);
}
}
else
{
for (i = ((crnd_prefix_coding_decoder_tables*)field_)->field_5; (uint)num7 > (uint)((int*)(&((crnd_prefix_coding_decoder_tables*)field_)->field_8))[(uint)(i - 1)]; i++)
for (i = ((crnd_prefix_coding_decoder_tables*)pDecode_tables)->m_decode_start_code_size; (uint)num7 > (uint)((int*)(&((crnd_prefix_coding_decoder_tables*)pDecode_tables)->m_max_codes))[(uint)(i - 1)]; i++)
{
}
int num10 = ((int*)(&((crnd_prefix_coding_decoder_tables*)field_)->field_9))[(uint)(i - 1)] + (((crnd_symbol_codec*)@this)->field_4 >>> 32 - i);
if ((uint)num10 >= (uint)((crnd_static_huffman_data_model*)model)->field_0)
int num10 = ((int*)(&((crnd_prefix_coding_decoder_tables*)pDecode_tables)->m_val_ptrs))[(uint)(i - 1)] + (((crnd_symbol_codec*)@this)->m_bit_buf >>> 32 - i);
if ((uint)num10 >= (uint)((crnd_static_huffman_data_model*)model)->m_total_syms)
{
crnd_assert.Invoke(String_xzkwrkb.__pointer, String_yguirrd.__pointer, 2709);
crnd_assert.Invoke(String_m5q5qr.__pointer, String_vvx8bt.__pointer, 2709);
return 0;
}
num9 = (ushort)((short*)((crnd_prefix_coding_decoder_tables*)field_)->field_13)[num10];
num9 = (ushort)((short*)((crnd_prefix_coding_decoder_tables*)pDecode_tables)->m_sorted_symbol_order)[num10];
}
((crnd_symbol_codec*)@this)->field_4 <<= i;
((crnd_symbol_codec*)@this)->field_5 -= i;
((crnd_symbol_codec*)@this)->m_bit_buf <<= i;
((crnd_symbol_codec*)@this)->m_bit_count -= i;
return num9;
}
}
@@ -20,16 +20,16 @@ internal static partial class decode_alpha_endpoints
localsPointer->field_0 = default(crnd_static_huffman_data_model);
unchecked
{
int num = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_16.field_2);
int num = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_alpha_endpoints.m_num);
bool flag;
if (!start_decoding.Invoke(&((crnd_crn_unpacker*)@this)->field_4, buf_size: crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_16.field_1), pBuf: (byte*)((crnd_crn_unpacker*)@this)->field_1 + (uint)crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_16.field_0)))
if (!start_decoding.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, buf_size: crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_alpha_endpoints.m_size), pBuf: (byte*)((crnd_crn_unpacker*)@this)->m_pData + (uint)crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_alpha_endpoints.m_ofs)))
{
flag = false;
}
else
{
static_huffman_data_model_Constructor_tl33idc.Invoke(&localsPointer->field_0);
bool flag2 = decode_receive_static_data_model.Invoke(&((crnd_crn_unpacker*)@this)->field_4, &localsPointer->field_0);
static_huffman_data_model_Constructor_c98ih8.Invoke(&localsPointer->field_0);
bool flag2 = decode_receive_static_data_model.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, &localsPointer->field_0);
if (ExceptionInfo.Current != null)
{
goto IL_01e3;
@@ -40,7 +40,7 @@ internal static partial class decode_alpha_endpoints
}
else
{
bool flag3 = resize_w95s75a.Invoke(&((crnd_crn_unpacker*)@this)->field_10, num);
bool flag3 = resize_9ubjj8.Invoke(&((crnd_crn_unpacker*)@this)->m_alpha_endpoints, num);
if (ExceptionInfo.Current != null)
{
goto IL_01e3;
@@ -51,7 +51,7 @@ internal static partial class decode_alpha_endpoints
}
else
{
void* ptr = vector_unsigned_short_Index.Invoke(&((crnd_crn_unpacker*)@this)->field_10, 0);
void* ptr = vector_unsigned_short_Operator.Invoke(&((crnd_crn_unpacker*)@this)->m_alpha_endpoints, 0);
if (ExceptionInfo.Current != null)
{
goto IL_01e3;
@@ -63,12 +63,12 @@ internal static partial class decode_alpha_endpoints
while ((uint)num4 < (uint)num)
{
int num5 = num2;
int num6 = decode.Invoke(&((crnd_crn_unpacker*)@this)->field_4, &localsPointer->field_0);
int num6 = decode.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, &localsPointer->field_0);
if (ExceptionInfo.Current == null)
{
num2 = (num5 + num6) & 0xFF;
int num7 = num3;
int num8 = decode.Invoke(&((crnd_crn_unpacker*)@this)->field_4, &localsPointer->field_0);
int num8 = decode.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, &localsPointer->field_0);
if (ExceptionInfo.Current == null)
{
num3 = (num7 + num8) & 0xFF;
@@ -82,7 +82,7 @@ internal static partial class decode_alpha_endpoints
}
goto IL_01e3;
}
stop_decoding.Invoke(&((crnd_crn_unpacker*)@this)->field_4);
stop_decoding.Invoke(&((crnd_crn_unpacker*)@this)->m_codec);
flag = true;
}
}
@@ -25,16 +25,16 @@ internal static partial class decode_alpha_selectors
localsPointer->field_1 = default(InlineArray64_SByte);
unchecked
{
start_decoding.Invoke(&((crnd_crn_unpacker*)@this)->field_4, buf_size: crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_17.field_1), pBuf: (byte*)((crnd_crn_unpacker*)@this)->field_1 + (uint)crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_17.field_0));
static_huffman_data_model_Constructor_tl33idc.Invoke(&localsPointer->field_0);
decode_receive_static_data_model.Invoke(&((crnd_crn_unpacker*)@this)->field_4, &localsPointer->field_0);
start_decoding.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, buf_size: crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_alpha_selectors.m_size), pBuf: (byte*)((crnd_crn_unpacker*)@this)->m_pData + (uint)crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_alpha_selectors.m_ofs));
static_huffman_data_model_Constructor_c98ih8.Invoke(&localsPointer->field_0);
decode_receive_static_data_model.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, &localsPointer->field_0);
if (ExceptionInfo.Current == null)
{
crnd_vector_rf9iywd* field_ = &((crnd_crn_unpacker*)@this)->field_11;
int num = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_17.field_2);
crnd_vector_h6df48* alpha_selectors = &((crnd_crn_unpacker*)@this)->m_alpha_selectors;
int num = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_alpha_selectors.m_num);
if (ExceptionInfo.Current == null)
{
resize_w95s75a.Invoke(field_, num * 3);
resize_9ubjj8.Invoke(alpha_selectors, num * 3);
if (ExceptionInfo.Current == null)
{
for (int i = 0; (uint)i < 64u; i++)
@@ -47,13 +47,13 @@ internal static partial class decode_alpha_selectors
int num4 = 0;
while (true)
{
if ((uint)num4 < (uint)size_lxodu4b.Invoke(&((crnd_crn_unpacker*)@this)->field_11))
if ((uint)num4 < (uint)size_g72hpe.Invoke(&((crnd_crn_unpacker*)@this)->m_alpha_selectors))
{
int num5 = 0;
int num6 = 0;
for (int j = 0; (uint)j < 24u; j += 6)
{
int num7 = decode.Invoke(&((crnd_crn_unpacker*)@this)->field_4, &localsPointer->field_0);
int num7 = decode.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, &localsPointer->field_0);
if (ExceptionInfo.Current != null)
{
goto end_IL_0160;
@@ -63,7 +63,7 @@ internal static partial class decode_alpha_selectors
}
for (int k = 0; (uint)k < 24u; k += 6)
{
int num8 = decode.Invoke(&((crnd_crn_unpacker*)@this)->field_4, &localsPointer->field_0);
int num8 = decode.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, &localsPointer->field_0);
if (ExceptionInfo.Current != null)
{
goto end_IL_0160;
@@ -72,21 +72,21 @@ internal static partial class decode_alpha_selectors
num6 |= (byte)((sbyte*)(&localsPointer->field_1))[(uint)((num3 >>> k) & 0x3F)] << k;
}
short num9 = (short)num5;
void* ptr = vector_unsigned_short_Index.Invoke(&((crnd_crn_unpacker*)@this)->field_11, num4++);
void* ptr = vector_unsigned_short_Operator.Invoke(&((crnd_crn_unpacker*)@this)->m_alpha_selectors, num4++);
if (ExceptionInfo.Current != null)
{
break;
}
*(short*)ptr = num9;
short num10 = (short)((num5 >>> 16) | (num6 << 8));
void* ptr2 = vector_unsigned_short_Index.Invoke(&((crnd_crn_unpacker*)@this)->field_11, num4++);
void* ptr2 = vector_unsigned_short_Operator.Invoke(&((crnd_crn_unpacker*)@this)->m_alpha_selectors, num4++);
if (ExceptionInfo.Current != null)
{
break;
}
*(short*)ptr2 = num10;
short num11 = (short)(num6 >>> 8);
void* ptr3 = vector_unsigned_short_Index.Invoke(&((crnd_crn_unpacker*)@this)->field_11, num4++);
void* ptr3 = vector_unsigned_short_Operator.Invoke(&((crnd_crn_unpacker*)@this)->m_alpha_selectors, num4++);
if (ExceptionInfo.Current != null)
{
break;
@@ -94,7 +94,7 @@ internal static partial class decode_alpha_selectors
*(short*)ptr3 = num11;
continue;
}
stop_decoding.Invoke(&((crnd_crn_unpacker*)@this)->field_4);
stop_decoding.Invoke(&((crnd_crn_unpacker*)@this)->m_codec);
static_huffman_data_model_Destructor.Invoke(&localsPointer->field_0);
if (ExceptionInfo.Current != null)
{
@@ -25,24 +25,24 @@ internal static partial class decode_alpha_selectors_etc
localsPointer->field_1 = default(InlineArray8_SByte);
unchecked
{
start_decoding.Invoke(&((crnd_crn_unpacker*)@this)->field_4, buf_size: crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_17.field_1), pBuf: (byte*)((crnd_crn_unpacker*)@this)->field_1 + (uint)crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_17.field_0));
static_huffman_data_model_Constructor_tl33idc.Invoke(&localsPointer->field_0);
decode_receive_static_data_model.Invoke(&((crnd_crn_unpacker*)@this)->field_4, &localsPointer->field_0);
start_decoding.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, buf_size: crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_alpha_selectors.m_size), pBuf: (byte*)((crnd_crn_unpacker*)@this)->m_pData + (uint)crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_alpha_selectors.m_ofs));
static_huffman_data_model_Constructor_c98ih8.Invoke(&localsPointer->field_0);
decode_receive_static_data_model.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, &localsPointer->field_0);
if (ExceptionInfo.Current == null)
{
crnd_vector_rf9iywd* field_ = &((crnd_crn_unpacker*)@this)->field_11;
int num = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_17.field_2);
crnd_vector_h6df48* alpha_selectors = &((crnd_crn_unpacker*)@this)->m_alpha_selectors;
int num = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_alpha_selectors.m_num);
if (ExceptionInfo.Current == null)
{
resize_w95s75a.Invoke(field_, num * 6);
resize_9ubjj8.Invoke(alpha_selectors, num * 6);
if (ExceptionInfo.Current == null)
{
llvm_memset_p0_i64.Invoke(&localsPointer->field_1, 0, 8L, isVolatile: false);
void* ptr = begin.Invoke(&((crnd_crn_unpacker*)@this)->field_11);
void* ptr = begin.Invoke(&((crnd_crn_unpacker*)@this)->m_alpha_selectors);
int num2 = 0;
while (true)
{
if ((uint)num2 < (uint)size_lxodu4b.Invoke(&((crnd_crn_unpacker*)@this)->field_11))
if ((uint)num2 < (uint)size_g72hpe.Invoke(&((crnd_crn_unpacker*)@this)->m_alpha_selectors))
{
int num3 = 0;
for (int i = 0; (uint)i < 16u; i++)
@@ -54,7 +54,7 @@ internal static partial class decode_alpha_selectors_etc
}
else
{
int num5 = decode.Invoke(&((crnd_crn_unpacker*)@this)->field_4, &localsPointer->field_0);
int num5 = decode.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, &localsPointer->field_0);
if (ExceptionInfo.Current != null)
{
goto end_IL_012b;
@@ -102,7 +102,7 @@ internal static partial class decode_alpha_selectors_etc
ptr = (byte*)ptr + 12;
continue;
}
stop_decoding.Invoke(&((crnd_crn_unpacker*)@this)->field_4);
stop_decoding.Invoke(&((crnd_crn_unpacker*)@this)->m_codec);
static_huffman_data_model_Destructor.Invoke(&localsPointer->field_0);
if (ExceptionInfo.Current != null)
{
@@ -25,20 +25,20 @@ internal static partial class decode_alpha_selectors_etcs
localsPointer->field_1 = default(InlineArray8_SByte);
unchecked
{
start_decoding.Invoke(&((crnd_crn_unpacker*)@this)->field_4, buf_size: crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_17.field_1), pBuf: (byte*)((crnd_crn_unpacker*)@this)->field_1 + (uint)crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_17.field_0));
static_huffman_data_model_Constructor_tl33idc.Invoke(&localsPointer->field_0);
decode_receive_static_data_model.Invoke(&((crnd_crn_unpacker*)@this)->field_4, &localsPointer->field_0);
start_decoding.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, buf_size: crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_alpha_selectors.m_size), pBuf: (byte*)((crnd_crn_unpacker*)@this)->m_pData + (uint)crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_alpha_selectors.m_ofs));
static_huffman_data_model_Constructor_c98ih8.Invoke(&localsPointer->field_0);
decode_receive_static_data_model.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, &localsPointer->field_0);
if (ExceptionInfo.Current == null)
{
crnd_vector_rf9iywd* field_ = &((crnd_crn_unpacker*)@this)->field_11;
int num = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_17.field_2);
crnd_vector_h6df48* alpha_selectors = &((crnd_crn_unpacker*)@this)->m_alpha_selectors;
int num = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_alpha_selectors.m_num);
if (ExceptionInfo.Current == null)
{
resize_w95s75a.Invoke(field_, num * 3);
resize_9ubjj8.Invoke(alpha_selectors, num * 3);
if (ExceptionInfo.Current == null)
{
llvm_memset_p0_i64.Invoke(&localsPointer->field_1, 0, 8L, isVolatile: false);
void* ptr = begin.Invoke(&((crnd_crn_unpacker*)@this)->field_11);
void* ptr = begin.Invoke(&((crnd_crn_unpacker*)@this)->m_alpha_selectors);
if (ExceptionInfo.Current == null)
{
void* ptr2 = ptr;
@@ -46,7 +46,7 @@ internal static partial class decode_alpha_selectors_etcs
while (true)
{
int num3 = num2;
int num4 = size_lxodu4b.Invoke(&((crnd_crn_unpacker*)@this)->field_11);
int num4 = size_g72hpe.Invoke(&((crnd_crn_unpacker*)@this)->m_alpha_selectors);
if (ExceptionInfo.Current != null)
{
break;
@@ -63,7 +63,7 @@ internal static partial class decode_alpha_selectors_etcs
}
else
{
int num7 = decode.Invoke(&((crnd_crn_unpacker*)@this)->field_4, &localsPointer->field_0);
int num7 = decode.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, &localsPointer->field_0);
if (ExceptionInfo.Current != null)
{
goto end_IL_013b;
@@ -93,7 +93,7 @@ internal static partial class decode_alpha_selectors_etcs
num2 += 6;
continue;
}
stop_decoding.Invoke(&((crnd_crn_unpacker*)@this)->field_4);
stop_decoding.Invoke(&((crnd_crn_unpacker*)@this)->m_codec);
static_huffman_data_model_Destructor.Invoke(&localsPointer->field_0);
if (ExceptionInfo.Current != null)
{
@@ -21,10 +21,10 @@ internal static partial class decode_color_endpoints
localsPointer->field_0 = default(InlineArray2_crnd_static_huffman_data_model);
unchecked
{
int num = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_14.field_2);
sbyte b = (sbyte)(byte)((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_9) == 10) ? (-1) : ((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_9) == 11) ? (-1) : ((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_9) == 12) ? (-1) : ((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_9) != 13) ? ((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_9) == 14) ? 1 : 0) : (-1)))));
sbyte b2 = (sbyte)(byte)((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_9) == 10) ? (-1) : ((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_9) != 11) ? ((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_9) == 12) ? 1 : 0) : (-1)));
bool flag = resize_a3d3m5b.Invoke(&((crnd_crn_unpacker*)@this)->field_8, num);
int num = crn_packed_uint_2_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_color_endpoints.m_num);
sbyte b = (sbyte)(byte)((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_format) == 10) ? (-1) : ((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_format) == 11) ? (-1) : ((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_format) == 12) ? (-1) : ((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_format) != 13) ? ((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_format) == 14) ? 1 : 0) : (-1)))));
sbyte b2 = (sbyte)(byte)((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_format) == 10) ? (-1) : ((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_format) != 11) ? ((crn_packed_uint_1_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_format) == 12) ? 1 : 0) : (-1)));
bool flag = resize_dreg6y.Invoke(&((crnd_crn_unpacker*)@this)->m_color_endpoints, num);
if (ExceptionInfo.Current != null)
{
return false;
@@ -34,7 +34,7 @@ internal static partial class decode_color_endpoints
{
flag2 = false;
}
else if (!start_decoding.Invoke(&((crnd_crn_unpacker*)@this)->field_4, buf_size: crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_14.field_1), pBuf: (byte*)((crnd_crn_unpacker*)@this)->field_1 + (uint)crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->field_3)->field_14.field_0)))
else if (!start_decoding.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, buf_size: crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_color_endpoints.m_size), pBuf: (byte*)((crnd_crn_unpacker*)@this)->m_pData + (uint)crn_packed_uint_3_ToUInt32.Invoke(&((crnd_crn_header*)((crnd_crn_unpacker*)@this)->m_pHeader)->m_color_endpoints.m_ofs)))
{
flag2 = false;
}
@@ -46,7 +46,7 @@ internal static partial class decode_color_endpoints
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;
@@ -85,7 +85,7 @@ internal static partial class decode_color_endpoints
{
if ((uint)num3 < (uint)InstructionHelper.Select((b & 1) == 1, 1, 2))
{
bool flag3 = decode_receive_static_data_model.Invoke(&((crnd_crn_unpacker*)@this)->field_4, (byte*)(&localsPointer->field_0) + (nint)(uint)num3 * (nint)sizeof(crnd_static_huffman_data_model));
bool flag3 = decode_receive_static_data_model.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, (byte*)(&localsPointer->field_0) + (nint)(uint)num3 * (nint)sizeof(crnd_static_huffman_data_model));
if (ExceptionInfo.Current == null)
{
if (!flag3)
@@ -105,7 +105,7 @@ internal static partial class decode_color_endpoints
int num7 = 0;
int num8 = 0;
int num9 = 0;
void* ptr6 = vector_unsigned_int_Index.Invoke(&((crnd_crn_unpacker*)@this)->field_8, 0);
void* ptr6 = vector_unsigned_int_Operator.Invoke(&((crnd_crn_unpacker*)@this)->m_color_endpoints, 0);
if (ExceptionInfo.Current == null)
{
void* ptr7 = ptr6;
@@ -116,7 +116,7 @@ internal static partial class decode_color_endpoints
num5 = 0;
while ((uint)num5 < 32u)
{
int num10 = decode.Invoke(&((crnd_crn_unpacker*)@this)->field_4, &localsPointer->field_0);
int num10 = decode.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, &localsPointer->field_0);
if (ExceptionInfo.Current == null)
{
num4 += num10 << num5;
@@ -133,32 +133,32 @@ internal static partial class decode_color_endpoints
continue;
}
int num12 = num4;
int num13 = decode.Invoke(&((crnd_crn_unpacker*)@this)->field_4, &localsPointer->field_0);
int num13 = decode.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, &localsPointer->field_0);
if (ExceptionInfo.Current == null)
{
num4 = (num12 + num13) & 0x1F;
int num14 = num5;
int num15 = decode.Invoke(&((crnd_crn_unpacker*)@this)->field_4, (byte*)(&localsPointer->field_0) + sizeof(crnd_static_huffman_data_model));
int num15 = decode.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, (byte*)(&localsPointer->field_0) + sizeof(crnd_static_huffman_data_model));
if (ExceptionInfo.Current == null)
{
num5 = (num14 + num15) & 0x3F;
int num16 = num6;
int num17 = decode.Invoke(&((crnd_crn_unpacker*)@this)->field_4, &localsPointer->field_0);
int num17 = decode.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, &localsPointer->field_0);
if (ExceptionInfo.Current == null)
{
num6 = (num16 + num17) & 0x1F;
int num18 = num7;
int num19 = decode.Invoke(&((crnd_crn_unpacker*)@this)->field_4, &localsPointer->field_0);
int num19 = decode.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, &localsPointer->field_0);
if (ExceptionInfo.Current == null)
{
num7 = (num18 + num19) & 0x1F;
int num20 = num8;
int num21 = decode.Invoke(&((crnd_crn_unpacker*)@this)->field_4, (byte*)(&localsPointer->field_0) + sizeof(crnd_static_huffman_data_model));
int num21 = decode.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, (byte*)(&localsPointer->field_0) + sizeof(crnd_static_huffman_data_model));
if (ExceptionInfo.Current == null)
{
num8 = (num20 + num21) & 0x3F;
int num22 = num9;
int num23 = decode.Invoke(&((crnd_crn_unpacker*)@this)->field_4, &localsPointer->field_0);
int num23 = decode.Invoke(&((crnd_crn_unpacker*)@this)->m_codec, &localsPointer->field_0);
if (ExceptionInfo.Current == null)
{
num9 = (num22 + num23) & 0x1F;
@@ -175,7 +175,7 @@ internal static partial class decode_color_endpoints
}
goto IL_0575;
}
stop_decoding.Invoke(&((crnd_crn_unpacker*)@this)->field_4);
stop_decoding.Invoke(&((crnd_crn_unpacker*)@this)->m_codec);
flag2 = true;
break;
}
Loaded 100 of 245 files, more files were not shown because too many files have changed in this diff. Show more