Files
NobetaSource/Cpp2IL/Assembly-CSharp/XftWeapon/VertexPool.cs
2023-09-06 22:09:22 +02:00

324 lines
11 KiB
C#

using System;
using Cpp2IlInjected;
using UnityEngine;
namespace XftWeapon
{
// Token: 0x02000389 RID: 905
[Token(Token = "0x2000389")]
public class VertexPool
{
// Token: 0x170001DB RID: 475
// (get) Token: 0x06002227 RID: 8743 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x170001DB")]
public Mesh MyMesh
{
[Token(Token = "0x6002227")]
[Address(RVA = "0x9703F0", Offset = "0x96EBF0", VA = "0x1809703F0")]
get
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
}
// Token: 0x06002228 RID: 8744 RVA: 0x0004F9F8 File Offset: 0x0004DBF8
[Token(Token = "0x6002228")]
[Address(RVA = "0x970170", Offset = "0x96E970", VA = "0x180970170")]
public void RecalculateBounds()
{
this.MyMesh.RecalculateBounds();
}
// Token: 0x06002229 RID: 8745 RVA: 0x0004FA18 File Offset: 0x0004DC18
[Token(Token = "0x6002229")]
[Address(RVA = "0x9701A0", Offset = "0x96E9A0", VA = "0x1809701A0")]
public void SetMeshObjectActive(bool flag)
{
MeshFilter meshFilter = this._meshFilter;
int num = 0;
if (!(meshFilter == num))
{
this._meshFilter.gameObject.SetActive(flag);
}
}
// Token: 0x0600222A RID: 8746 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x600222A")]
[Address(RVA = "0x96F6C0", Offset = "0x96DEC0", VA = "0x18096F6C0")]
private void CreateMeshObj(XWeaponTrail owner, Material material)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x0600222B RID: 8747 RVA: 0x0004FA50 File Offset: 0x0004DC50
[Token(Token = "0x600222B")]
[Address(RVA = "0x96FA40", Offset = "0x96E240", VA = "0x18096FA40")]
public void Destroy()
{
if (!this._owner.UseWith2D)
{
UnityEngine.Object.DestroyImmediate(this._mesh2d);
return;
}
MeshFilter meshFilter = this._meshFilter;
int num = 0;
if (meshFilter != num)
{
UnityEngine.Object.Destroy(this._meshFilter.gameObject);
return;
}
}
// Token: 0x0600222C RID: 8748 RVA: 0x0004FAA4 File Offset: 0x0004DCA4
[Token(Token = "0x600222C")]
[Address(RVA = "0x970240", Offset = "0x96EA40", VA = "0x180970240")]
public VertexPool(Material material, XWeaponTrail owner)
{
int num = 0;
this._owner = owner;
this.VertexTotal = num;
this.VertCountChanged = num != 0;
if (!owner.UseWith2D)
{
Mesh mesh = new Mesh();
this._mesh2d = mesh;
}
this.CreateMeshObj(owner, material);
this._material = material;
Vector3[] array = new Vector3[4];
this.Vertices = array;
Vector2[] array2 = new Vector2[4];
this.UVs = array2;
Color[] array3 = new Color[4];
this.Colors = array3;
int[] array4 = new int[6];
this.Indices = array4;
this.VertexTotal = (int)((ulong)4L);
this.IndexTotal = (int)((ulong)6L);
this.ColorChanged = true;
this.IndiceChanged = true;
}
// Token: 0x0600222D RID: 8749 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x600222D")]
[Address(RVA = "0x96FCD0", Offset = "0x96E4D0", VA = "0x18096FCD0")]
public VertexPool.VertexSegment GetVertices(int vcount, int icount)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x0600222E RID: 8750 RVA: 0x0004FB68 File Offset: 0x0004DD68
[Token(Token = "0x600222E")]
[Address(RVA = "0x96FDF0", Offset = "0x96E5F0", VA = "0x18096FDF0")]
protected void InitArrays()
{
Vector3[] array = new Vector3[4];
this.Vertices = array;
Vector2[] array2 = new Vector2[4];
this.UVs = array2;
Color[] array3 = new Color[4];
this.Colors = array3;
int[] array4 = new int[6];
this.Indices = array4;
this.VertexTotal = (int)((ulong)4L);
this.IndexTotal = (int)((ulong)6L);
}
// Token: 0x0600222F RID: 8751 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x600222F")]
[Address(RVA = "0x96FB30", Offset = "0x96E330", VA = "0x18096FB30")]
public void EnlargeArrays(int count, int icount)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002230 RID: 8752 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002230")]
[Address(RVA = "0x96FED0", Offset = "0x96E6D0", VA = "0x18096FED0")]
public void LateUpdate()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x04002B7C RID: 11132
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4002B7C")]
public Vector3[] Vertices;
// Token: 0x04002B7D RID: 11133
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4002B7D")]
public int[] Indices;
// Token: 0x04002B7E RID: 11134
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4002B7E")]
public Vector2[] UVs;
// Token: 0x04002B7F RID: 11135
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x4002B7F")]
public Color[] Colors;
// Token: 0x04002B80 RID: 11136
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x4002B80")]
public bool IndiceChanged;
// Token: 0x04002B81 RID: 11137
[FieldOffset(Offset = "0x31")]
[Token(Token = "0x4002B81")]
public bool ColorChanged;
// Token: 0x04002B82 RID: 11138
[FieldOffset(Offset = "0x32")]
[Token(Token = "0x4002B82")]
public bool UVChanged;
// Token: 0x04002B83 RID: 11139
[FieldOffset(Offset = "0x33")]
[Token(Token = "0x4002B83")]
public bool VertChanged;
// Token: 0x04002B84 RID: 11140
[FieldOffset(Offset = "0x34")]
[Token(Token = "0x4002B84")]
public bool UV2Changed;
// Token: 0x04002B85 RID: 11141
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x4002B85")]
protected int VertexTotal;
// Token: 0x04002B86 RID: 11142
[FieldOffset(Offset = "0x3C")]
[Token(Token = "0x4002B86")]
protected int VertexUsed;
// Token: 0x04002B87 RID: 11143
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x4002B87")]
protected int IndexTotal;
// Token: 0x04002B88 RID: 11144
[FieldOffset(Offset = "0x44")]
[Token(Token = "0x4002B88")]
protected int IndexUsed;
// Token: 0x04002B89 RID: 11145
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x4002B89")]
public bool FirstUpdate = true;
// Token: 0x04002B8A RID: 11146
[FieldOffset(Offset = "0x49")]
[Token(Token = "0x4002B8A")]
protected bool VertCountChanged;
// Token: 0x04002B8B RID: 11147
[Token(Token = "0x4002B8B")]
public const int BlockSize = 108;
// Token: 0x04002B8C RID: 11148
[FieldOffset(Offset = "0x4C")]
[Token(Token = "0x4002B8C")]
public float BoundsScheduleTime = 1f;
// Token: 0x04002B8D RID: 11149
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x4002B8D")]
public float ElapsedTime;
// Token: 0x04002B8E RID: 11150
[FieldOffset(Offset = "0x58")]
[Token(Token = "0x4002B8E")]
protected XWeaponTrail _owner;
// Token: 0x04002B8F RID: 11151
[FieldOffset(Offset = "0x60")]
[Token(Token = "0x4002B8F")]
protected MeshFilter _meshFilter;
// Token: 0x04002B90 RID: 11152
[FieldOffset(Offset = "0x68")]
[Token(Token = "0x4002B90")]
protected Mesh _mesh2d;
// Token: 0x04002B91 RID: 11153
[FieldOffset(Offset = "0x70")]
[Token(Token = "0x4002B91")]
protected Material _material;
// Token: 0x0200038A RID: 906
[Token(Token = "0x200038A")]
public class VertexSegment
{
// Token: 0x06002231 RID: 8753 RVA: 0x0004FBC0 File Offset: 0x0004DDC0
[Token(Token = "0x6002231")]
[Address(RVA = "0x12E7C90", Offset = "0x12E6490", VA = "0x1812E7C90")]
public VertexSegment(int start, int count, int istart, int icount, VertexPool pool)
{
/*
An exception occurred when decompiling this method (06002231)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void XftWeapon.VertexPool/VertexSegment::.ctor(System.Int32,System.Int32,System.Int32,System.Int32,XftWeapon.VertexPool)
---> System.Exception: Basic block has to end with unconditional control flow.
{; Block_0:; call:void(object::.ctor, ldloc:VertexSegment[exp:object](this)); stfld:VertexPool(VertexSegment::Pool, ldloc:VertexSegment(this), ldc.i4:int32[exp:VertexPool](0)); stfld:int32(VertexSegment::VertStart, ldloc:VertexSegment(this), ldloc:int32(start)); stfld:int32(VertexSegment::VertCount, ldloc:VertexSegment(this), ldloc:int32(count)); stfld:int32(VertexSegment::IndexCount, ldloc:VertexSegment(this), ldc.i4:int32(0)); stfld:int32(VertexSegment::IndexStart, ldloc:VertexSegment(this), ldloc:int32(istart)); };
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 344
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
--- End of inner exception stack trace ---
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1618
*/;
}
// Token: 0x06002232 RID: 8754 RVA: 0x0004FBF8 File Offset: 0x0004DDF8
[Token(Token = "0x6002232")]
[Address(RVA = "0x12E7C10", Offset = "0x12E6410", VA = "0x1812E7C10")]
public void ClearIndices()
{
int num = this.IndexStart;
int num2 = this.IndexCount;
num2 += num;
if (num < num2)
{
int num3 = 0;
int[] indices = this.Pool.Indices;
num++;
indices[0] = num3;
int indexCount = this.IndexCount;
}
this.Pool.IndiceChanged = true;
}
// Token: 0x04002B92 RID: 11154
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4002B92")]
public int VertStart;
// Token: 0x04002B93 RID: 11155
[FieldOffset(Offset = "0x14")]
[Token(Token = "0x4002B93")]
public int IndexStart;
// Token: 0x04002B94 RID: 11156
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4002B94")]
public int VertCount;
// Token: 0x04002B95 RID: 11157
[FieldOffset(Offset = "0x1C")]
[Token(Token = "0x4002B95")]
public int IndexCount;
// Token: 0x04002B96 RID: 11158
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4002B96")]
public VertexPool Pool;
}
}
}