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
Clipper.cs
Go to the documentation of this file.
1using System;
4using UnityEngine;
5
7{
8 // Token: 0x0200035B RID: 859
9 public class Clipper
10 {
11 // Token: 0x06001654 RID: 5716 RVA: 0x00061E0C File Offset: 0x0006000C
12 public Clipper(SpriteBatch owner)
13 {
14 this.clippingBatch = owner;
15 }
16
17 // Token: 0x06001655 RID: 5717 RVA: 0x00061E28 File Offset: 0x00060028
18 public void SetClipState(bool horizonal, bool vertical)
19 {
20 }
21
22 // Token: 0x06001656 RID: 5718 RVA: 0x00061E38 File Offset: 0x00060038
23 public void SetClipRegionInner(int left, int right, int top, int bottom)
24 {
25 this.Left = left;
26 this.Top = right;
27 this.Top = top;
28 this.OuterLeft = bottom;
29 }
30
31 // Token: 0x06001657 RID: 5719 RVA: 0x00061E64 File Offset: 0x00060064
33 {
34 int left = this.Left;
35 int right = this.Right;
37 this.Left = left;
38 this.Right = right;
39 }
40
41 // Token: 0x06001658 RID: 5720 RVA: 0x00061E94 File Offset: 0x00060094
43 {
44 int left = this.Left;
45 int right = this.Right;
47 this.Left = left;
48 this.Right = right;
49 }
50
51 // Token: 0x06001659 RID: 5721 RVA: 0x00061EC4 File Offset: 0x000600C4
52 public void SetClipRegionOuter(int left, int right, int top, int bottom)
53 {
54 this.OuterLeft = left;
55 this.OuterTop = right;
56 this.FadeOuterLeft = left;
57 this.FadeOuterTop = right;
58 this.OuterTop = top;
59 this.FadeOuterLeft = bottom;
61 this.clipVertical = bottom != 0;
62 }
63
64 // Token: 0x0600165A RID: 5722 RVA: 0x00061F0C File Offset: 0x0006010C
65 public void SetClipRegionOuter(int left, int right, int top, int bottom, int fadeLeft, int fadeRight, int fadeTop, int fadeBottom)
66 {
67 this.OuterLeft = left;
68 this.OuterTop = right;
71 this.OuterTop = top;
72 this.FadeOuterLeft = bottom;
74 }
75
76 // Token: 0x0600165B RID: 5723 RVA: 0x00061F50 File Offset: 0x00060150
77 public void SetGeometryScale(bool enable, Vector2 centre, float scale)
78 {
79 }
80
81 // Token: 0x0600165C RID: 5724 RVA: 0x00061F60 File Offset: 0x00060160
83 {
84 }
85
86 // Token: 0x0600165D RID: 5725 RVA: 0x00061F70 File Offset: 0x00060170
87 [Il2CppSetOption(Option.NullChecks, false)]
88 [Il2CppSetOption(Option.ArrayBoundsChecks, false)]
90 {
91 if (this.geometryOffsetEnabled)
92 {
93 float x = this.geometryOffset.X;
94 Vector2 position = item.vertexTL.Position;
96 float y = this.geometryOffset.Y;
97 float x2 = this.geometryOffset.X;
98 Vector2 position2 = item.vertexTR.Position;
100 float y2 = this.geometryOffset.Y;
101 float x3 = this.geometryOffset.X;
102 Vector2 position3 = item.vertexBR.Position;
104 float y3 = this.geometryOffset.Y;
105 float x4 = this.geometryOffset.X;
106 Vector2 position4 = item.vertexBL.Position;
108 float y4 = this.geometryOffset.Y;
109 }
110 }
111
112 // Token: 0x0600165E RID: 5726 RVA: 0x00062054 File Offset: 0x00060254
113 [Il2CppSetOption(Option.NullChecks, false)]
114 [Il2CppSetOption(Option.ArrayBoundsChecks, false)]
116 {
117 if (this.geometryScaleEnabled)
118 {
119 Vector2 position = item.vertexTL.Position;
120 Vector2 position2 = item.vertexBL.Position;
121 float num = this.geometryScale;
122 item.vertexTL.Position = position;
123 }
124 float y = item.vertexTL.TextureCoordinate.y;
125 Vector2 position3 = item.vertexTL.Position;
126 float y2 = item.vertexTR.TextureCoordinate.y;
127 float y3 = item.vertexBR.TextureCoordinate.y;
128 float y4 = item.vertexBL.TextureCoordinate.y;
129 float y5 = item.vertexTL.TextureCoordinate.y;
130 Vector2 position4 = item.vertexTL.Position;
131 float y6 = item.vertexTR.TextureCoordinate.y;
132 float y7 = item.vertexBR.TextureCoordinate.y;
133 float y8 = item.vertexBL.TextureCoordinate.y;
134 int left = this.Left;
135 int top = this.Top;
136 int top2 = this.Top;
137 int outerLeft = this.OuterLeft;
138 }
139
140 // Token: 0x0600165F RID: 5727 RVA: 0x00062274 File Offset: 0x00060474
141 [Il2CppSetOption(Option.NullChecks, false)]
142 [Il2CppSetOption(Option.ArrayBoundsChecks, false)]
144 {
145 SpriteBatch spriteBatch = this.clippingBatch;
146 Texture2D texture = item.Texture;
148 }
149
150 // Token: 0x06001660 RID: 5728 RVA: 0x000622B8 File Offset: 0x000604B8
151 [Il2CppSetOption(Option.NullChecks, false)]
152 [Il2CppSetOption(Option.ArrayBoundsChecks, false)]
154 {
155 /*
156An exception occurred when decompiling this method (06001660)
157
158ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Microsoft.Xna.Framework.Graphics.Clipper::Clip(Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData,Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData,Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData,Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData[])
159
160 ---> System.Exception: Basic block has to end with unconditional control flow.
161{
162 IL_0327:
163 stloc:int32(var_73_32D, ldfld:int32(Clipper::outputCount, ldloc:Clipper(this)))
164 stloc:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData[](var_76_33C, ldfld:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData[](Clipper::input, ldloc:Clipper(this)))
165 stloc:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData[](var_77_344, ldfld:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData[](Clipper::output, ldloc:Clipper(this)))
166 stloc:int32(var_78_34C, ldfld:int32(Clipper::outputCount, ldloc:Clipper(this)))
167 stfld:int32(Clipper::outputCount, ldloc:Clipper(this), ldloc:int32(var_78_34C))
168 stloc:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData[](var_79_35C, ldfld:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData[](Clipper::input, ldloc:Clipper(this)))
169 stloc:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData[](var_80_364, ldfld:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData[](Clipper::output, ldloc:Clipper(this)))
170 stloc:int32(var_81_36C, ldfld:int32(Clipper::outputCount, ldloc:Clipper(this)))
171 stfld:int32(Clipper::outputCount, ldloc:Clipper(this), ldloc:int32(var_78_34C))
172 stloc:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData[](var_82_37C, ldfld:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData[](Clipper::input, ldloc:Clipper(this)))
173 stloc:Color32(var_84_389, ldfld:Color32(VertexData::Color, ldloc:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData[][exp:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData&](var_82_37C)))
174 stloc:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData[](var_85_391, ldfld:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData[](Clipper::output, ldloc:Clipper(this)))
175 stloc:int32(var_86_399, ldfld:int32(Clipper::outputCount, ldloc:Clipper(this)))
176 stfld:int32(Clipper::outputCount, ldloc:Clipper(this), ldloc:int32(var_78_34C))
177 stfld:Vector2(VertexData::Position, ldloc:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData[][exp:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData&](var_46), ldloc:int32[exp:Vector2](var_78_34C))
178 stloc:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData[](var_87_3B2, ldfld:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData[](Clipper::output, ldloc:Clipper(this)))
179 stfld:int32(int32::m_value, ldloc:int32[exp:int32&](var_47), ldloc:valuetype Microsoft.Xna.Framework.Graphics.SpriteBatcher/VertexData[][exp:int32](var_87_3B2))
180}
181
182 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
183 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 355
184 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
185 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
186 --- End of inner exception stack trace ---
187 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
188 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 1683
189*/;
190 }
191
192 // Token: 0x04002414 RID: 9236
194
195 // Token: 0x04002415 RID: 9237
197
198 // Token: 0x04002416 RID: 9238
200
201 // Token: 0x04002417 RID: 9239
202 private int inputCount;
203
204 // Token: 0x04002418 RID: 9240
205 private int outputCount;
206
207 // Token: 0x04002419 RID: 9241
209
210 // Token: 0x0400241A RID: 9242
212
213 // Token: 0x0400241B RID: 9243
214 private int Left;
215
216 // Token: 0x0400241C RID: 9244
217 private int Right;
218
219 // Token: 0x0400241D RID: 9245
220 private int Top;
221
222 // Token: 0x0400241E RID: 9246
223 private int Bottom;
224
225 // Token: 0x0400241F RID: 9247
226 private int OuterLeft;
227
228 // Token: 0x04002420 RID: 9248
229 private int OuterRight;
230
231 // Token: 0x04002421 RID: 9249
232 private int OuterTop;
233
234 // Token: 0x04002422 RID: 9250
235 private int OuterBottom;
236
237 // Token: 0x04002423 RID: 9251
238 private int FadeOuterLeft;
239
240 // Token: 0x04002424 RID: 9252
241 private int FadeOuterRight;
242
243 // Token: 0x04002425 RID: 9253
244 private int FadeOuterTop;
245
246 // Token: 0x04002426 RID: 9254
247 private int FadeOuterBottom;
248
249 // Token: 0x04002427 RID: 9255
250 private bool clipVertical;
251
252 // Token: 0x04002428 RID: 9256
253 private bool clipHorizontal;
254
255 // Token: 0x04002429 RID: 9257
257
258 // Token: 0x0400242A RID: 9258
260
261 // Token: 0x0400242B RID: 9259
262 private float geometryScale;
263
264 // Token: 0x0400242C RID: 9260
266
267 // Token: 0x0400242D RID: 9261
269 }
270}
class f__AnonymousType0<< Count > j__TPar
void InjectBatches(SpriteBatchItem item, bool resuseItem, int outNumPoints, SpriteBatcher.VertexData[] output)
Definition Clipper.cs:143
void Clip(SpriteBatchItem item)
Definition Clipper.cs:115
SpriteBatcher.VertexData[] output
Definition Clipper.cs:211
void SetGeometryOffset(bool enable, Vector2 offset)
Definition Clipper.cs:82
SpriteBatcher.VertexData[] cache1
Definition Clipper.cs:196
void SetGeometryScale(bool enable, Vector2 centre, float scale)
Definition Clipper.cs:77
void Offset(SpriteBatchItem item)
Definition Clipper.cs:89
void SetClipRegionOuter(int left, int right, int top, int bottom)
Definition Clipper.cs:52
SpriteBatcher.VertexData[] input
Definition Clipper.cs:208
void SetClipState(bool horizonal, bool vertical)
Definition Clipper.cs:18
void SetClipRegionOuter(int left, int right, int top, int bottom, int fadeLeft, int fadeRight, int fadeTop, int fadeBottom)
Definition Clipper.cs:65
SpriteBatcher.VertexData[] cache2
Definition Clipper.cs:199
void SetClipRegionInner(int left, int right, int top, int bottom)
Definition Clipper.cs:23
bool Clip(SpriteBatcher.VertexData p0, SpriteBatcher.VertexData p1, SpriteBatcher.VertexData p2, SpriteBatcher.VertexData p3, int clipLeft, int clipRight, int clipTop, int clipBottom, [Out] int numResultPoints, [Out] SpriteBatcher.VertexData[] result)
Definition Clipper.cs:153
SpriteBatchItem InsertNewBatchItem(Texture2D texture)