terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
SetFactory.cs
Go to the documentation of this file.
1using System;
5
6namespace Terraria.ID
7{
8 // Token: 0x020005EE RID: 1518
9 public class SetFactory
10 {
11 // Token: 0x0600357E RID: 13694 RVA: 0x00210F38 File Offset: 0x0020F138
12 public SetFactory(int size)
13 {
14 do
15 {
16 base..ctor();
17 }
18 while (size == 0);
19 this._size = size;
20 }
21
22 // Token: 0x0600357F RID: 13695 RVA: 0x00210F58 File Offset: 0x0020F158
23 protected bool[] GetBoolBuffer()
24 {
25 object queueLock = this._queueLock;
27 if (boolBufferCache._size != 0)
28 {
29 return boolBufferCache.Dequeue();
30 }
31 int size = this._size;
32 long num = 0L;
34 if (num == 0L)
35 {
36 }
37 throw new OutOfMemoryException();
38 }
39
40 // Token: 0x06003580 RID: 13696 RVA: 0x00210FB8 File Offset: 0x0020F1B8
41 protected int[] GetIntBuffer()
42 {
43 object queueLock = this._queueLock;
45 if (intBufferCache._size != 0)
46 {
47 return intBufferCache.Dequeue();
48 }
49 int size = this._size;
50 long num = 0L;
52 if (num == 0L)
53 {
54 }
55 throw new OutOfMemoryException();
56 }
57
58 // Token: 0x06003581 RID: 13697 RVA: 0x00211018 File Offset: 0x0020F218
59 protected ushort[] GetUshortBuffer()
60 {
61 object queueLock = this._queueLock;
63 if (ushortBufferCache._size != 0)
64 {
66 }
67 int size = this._size;
68 long num = 0L;
70 if (num == 0L)
71 {
72 }
73 throw new OutOfMemoryException();
74 }
75
76 // Token: 0x06003582 RID: 13698 RVA: 0x00211078 File Offset: 0x0020F278
77 protected float[] GetFloatBuffer()
78 {
79 object queueLock = this._queueLock;
81 if (floatBufferCache._size != 0)
82 {
84 }
85 int size = this._size;
86 long num = 0L;
88 if (num == 0L)
89 {
90 }
91 throw new OutOfMemoryException();
92 }
93
94 // Token: 0x06003583 RID: 13699 RVA: 0x002110D8 File Offset: 0x0020F2D8
95 public void Recycle<T>(T[] buffer)
96 {
97 object queueLock = this._queueLock;
99 if (buffer != null && buffer == null)
100 {
101 throw new InvalidCastException();
102 }
103 }
104
105 // Token: 0x06003584 RID: 13700 RVA: 0x00211150 File Offset: 0x0020F350
106 public bool[] CreateBoolSet(params int[] types)
107 {
108 long num = 0L;
109 return this.CreateBoolSet(num != 0L, types);
110 }
111
112 // Token: 0x06003585 RID: 13701 RVA: 0x00211168 File Offset: 0x0020F368
113 public bool[] CreateBoolSet(bool defaultState, params int[] types)
114 {
115 return this.GetBoolBuffer();
116 }
117
118 // Token: 0x06003586 RID: 13702 RVA: 0x00211180 File Offset: 0x0020F380
119 public int[] CreateIntSet(params int[] types)
120 {
121 int[] array;
122 return array;
123 }
124
125 // Token: 0x06003587 RID: 13703 RVA: 0x00211190 File Offset: 0x0020F390
126 public int[] CreateIntSet(int defaultState, params int[] inputs)
127 {
128 return this.GetIntBuffer();
129 }
130
131 // Token: 0x06003588 RID: 13704 RVA: 0x002111AC File Offset: 0x0020F3AC
132 public ushort[] CreateUshortSet(ushort defaultState, params ushort[] inputs)
133 {
134 return this.GetUshortBuffer();
135 }
136
137 // Token: 0x06003589 RID: 13705 RVA: 0x002111C8 File Offset: 0x0020F3C8
138 public float[] CreateFloatSet(float defaultState, params float[] inputs)
139 {
140 return this.GetFloatBuffer();
141 }
142
143 // Token: 0x0600358A RID: 13706 RVA: 0x000021DB File Offset: 0x000003DB
145 {
146 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
147 }
148
149 // Token: 0x04006DB1 RID: 28081
150 protected int _size;
151
152 // Token: 0x04006DB2 RID: 28082
154
155 // Token: 0x04006DB3 RID: 28083
157
158 // Token: 0x04006DB4 RID: 28084
160
161 // Token: 0x04006DB5 RID: 28085
163
164 // Token: 0x04006DB6 RID: 28086
165 private object _queueLock;
166 }
167}
class f__AnonymousType0<< Count > j__TPar
static void Exit(object obj)
Definition Monitor.cs:47
readonly Queue< float[]> _floatBufferCache
int[] CreateIntSet(int defaultState, params int[] inputs)
ushort[] GetUshortBuffer()
Definition SetFactory.cs:59
bool[] CreateBoolSet(bool defaultState, params int[] types)
void Recycle< T >(T[] buffer)
Definition SetFactory.cs:95
ushort[] CreateUshortSet(ushort defaultState, params ushort[] inputs)
readonly Queue< bool[]> _boolBufferCache
readonly Queue< int[]> _intBufferCache
float[] CreateFloatSet(float defaultState, params float[] inputs)
bool[] CreateBoolSet(params int[] types)
readonly Queue< ushort[]> _ushortBufferCache
T[] CreateCustomSet< T >(T defaultState, params object[] inputs)
int[] CreateIntSet(params int[] types)