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
SpriteBatchItem.cs
Go to the documentation of this file.
1using System;
4using UnityEngine;
5
7{
8 // Token: 0x0200038F RID: 911
9 public class SpriteBatchItem
10 {
11 // Token: 0x0600184D RID: 6221 RVA: 0x00068138 File Offset: 0x00066338
12 public static void PushExpandedClippingRegion()
13 {
14 if (!true)
15 {
16 }
17 }
18
19 // Token: 0x0600184E RID: 6222 RVA: 0x0006814C File Offset: 0x0006634C
20 public static void PopExpandedClippingRegion()
21 {
22 if (!true)
23 {
24 }
25 }
26
27 // Token: 0x0600184F RID: 6223 RVA: 0x00068160 File Offset: 0x00066360
28 public static void EnableClipping(Rectangle inner, Rectangle outer, SpriteBatch batcher, bool vertical)
29 {
30 int num = 1;
31 if (num == 0)
32 {
33 }
34 if (num == 0)
35 {
36 }
37 }
38
39 // Token: 0x06001850 RID: 6224 RVA: 0x00068178 File Offset: 0x00066378
40 public static void PushClippedImageRegion(Rectangle region, SpriteBatch batcher, bool enableGeometryScale, Vector2 geometryScaleCentre, float geometryScale)
41 {
42 int num = 1;
43 if (num == 0)
44 {
45 }
46 if (num == 0)
47 {
48 }
49 }
50
51 // Token: 0x06001851 RID: 6225 RVA: 0x000681A0 File Offset: 0x000663A0
52 public static void PopClippedImageRegion()
53 {
54 if (!true)
55 {
56 }
57 int num = 1;
58 if (num == 0)
59 {
60 }
61 int value = num.m_value;
62 }
63
64 // Token: 0x06001852 RID: 6226 RVA: 0x000681C4 File Offset: 0x000663C4
65 public static void DisabledClipping()
66 {
67 if (!true)
68 {
69 }
70 }
71
72 // Token: 0x06001853 RID: 6227 RVA: 0x000681D4 File Offset: 0x000663D4
73 public static void SetGeometryOffset(SpriteBatch batcher, bool enabled, Vector2 offset)
74 {
75 if (!true)
76 {
77 }
78 if (!true)
79 {
80 }
81 }
82
83 // Token: 0x06001854 RID: 6228 RVA: 0x000681E8 File Offset: 0x000663E8
85 {
86 }
87
88 // Token: 0x06001855 RID: 6229 RVA: 0x000681FC File Offset: 0x000663FC
89 [Il2CppSetOption(Option.NullChecks, false)]
90 [Il2CppSetOption(Option.ArrayBoundsChecks, false)]
91 public void Set(float x, float y, float dx, float dy, float w, float h, float sin, float cos, Color color, Vector2 texCoordTL, Vector2 texCoordBR)
92 {
93 int num = 1;
94 byte r = color.R;
95 if (num == 0)
96 {
97 }
98 byte g = color.G;
99 byte b = color.B;
100 Texture2D texture = this.Texture;
101 if (texture == null)
102 {
103 bool flag;
104 this.vertexTL.Color.a = (flag ? 1 : 0);
105 float y2 = texCoordTL.Y;
106 this.vertexTR.Color.a = (flag ? 1 : 0);
107 float num2;
109 float y3 = texCoordTL.Y;
110 this.vertexBL.Color.a = (flag ? 1 : 0);
111 float num3;
113 float y4 = texCoordBR.Y;
114 this.vertexBR.Color.a = (flag ? 1 : 0);
115 float y5 = texCoordBR.Y;
117 return;
118 }
120 if (packedEntry != null)
121 {
122 int unityWidth = texture.UnityWidth;
123 int unityHeight = texture.UnityHeight;
124 short textureHeight = packedEntry.TextureHeight;
125 short textureOffsetX = packedEntry.TextureOffsetX;
126 short textureOffsetY = packedEntry.TextureOffsetY;
127 int tileDataOffset = packedEntry.TileDataOffset;
128 short textureScale = packedEntry.TextureScale;
129 float x2 = texCoordBR.X;
130 float y6 = texCoordBR.Y;
131 bool tileTrimming = packedEntry.TileTrimming;
132 float x3 = texCoordTL.X;
133 float y7 = texCoordTL.Y;
134 float x4 = texCoordBR.X;
135 float y8 = texCoordBR.Y;
136 if (textureOffsetX == 0)
137 {
138 }
139 return;
140 }
141 }
142
143 // Token: 0x06001856 RID: 6230 RVA: 0x00068474 File Offset: 0x00066674
144 [Il2CppSetOption(Option.NullChecks, false)]
145 [Il2CppSetOption(Option.ArrayBoundsChecks, false)]
146 public void Set(float x, float y, float dx, float dy, float w, float h, float sin, float cos, VertexColors colors, Vector2 texCoordTL, Vector2 texCoordBR)
147 {
148 Texture2D texture = this.Texture;
149 if (texture == null)
150 {
151 float num;
153 float y2 = texCoordTL.Y;
154 float num2;
156 byte r = colors.TopRightColor.R;
158 byte g = colors.TopRightColor.G;
160 byte b = colors.TopRightColor.B;
164 float y3 = texCoordTL.Y;
165 float num3;
167 byte r2 = colors.BottomLeftColor.R;
169 byte g2 = colors.BottomLeftColor.G;
171 byte b2 = colors.BottomLeftColor.B;
175 float y4 = texCoordBR.Y;
178 byte r3 = colors.BottomRightColor.R;
180 byte g3 = colors.BottomRightColor.G;
182 byte b3 = colors.BottomRightColor.B;
186 float y5 = texCoordBR.Y;
188 return;
189 }
191 if (packedEntry != null)
192 {
193 int unityWidth = texture.UnityWidth;
194 int unityHeight = texture.UnityHeight;
195 short textureHeight = packedEntry.TextureHeight;
196 short textureOffsetX = packedEntry.TextureOffsetX;
197 short textureOffsetY = packedEntry.TextureOffsetY;
198 short textureScale = packedEntry.TextureScale;
199 float x2 = texCoordTL.X;
200 float y6 = texCoordTL.Y;
201 float x3 = texCoordBR.X;
202 float y7 = texCoordBR.Y;
203 bool tileTrimming = packedEntry.TileTrimming;
204 float x4 = texCoordTL.X;
205 float y8 = texCoordTL.Y;
206 float x5 = texCoordBR.X;
207 float y9 = texCoordBR.Y;
208 if (textureOffsetX == 0)
209 {
210 }
211 return;
212 }
213 }
214
215 // Token: 0x06001857 RID: 6231 RVA: 0x00068808 File Offset: 0x00066A08
216 [Il2CppSetOption(Option.ArrayBoundsChecks, false)]
217 [Il2CppSetOption(Option.NullChecks, false)]
218 public void Set(float x, float y, float w, float h, Color color, Vector2 texCoordTL, Vector2 texCoordBR)
219 {
220 int num = 1;
221 byte r = color.R;
222 if (num == 0)
223 {
224 }
225 byte g = color.G;
226 byte b = color.B;
227 Texture2D texture = this.Texture;
228 if (texture == null)
229 {
230 bool flag;
231 this.vertexTL.Color.a = (flag ? 1 : 0);
232 float y2 = texCoordTL.Y;
233 this.vertexTR.Color.a = (flag ? 1 : 0);
235 float y3 = texCoordTL.Y;
236 this.vertexBL.Color.a = (flag ? 1 : 0);
238 float y4 = texCoordBR.Y;
240 this.vertexBR.Color.a = (flag ? 1 : 0);
241 float y5 = texCoordBR.Y;
243 return;
244 }
246 if (packedEntry != null)
247 {
248 int unityWidth = texture.UnityWidth;
249 int unityHeight = texture.UnityHeight;
250 int tileDataOffset = packedEntry.TileDataOffset;
251 short textureHeight = packedEntry.TextureHeight;
252 short textureOffsetX = packedEntry.TextureOffsetX;
253 short textureOffsetY = packedEntry.TextureOffsetY;
254 short textureScale = packedEntry.TextureScale;
255 float x2 = texCoordTL.X;
256 float y6 = texCoordTL.Y;
257 float x3 = texCoordBR.X;
258 float y7 = texCoordBR.Y;
259 bool tileTrimming = packedEntry.TileTrimming;
260 float x4 = texCoordTL.X;
261 float y8 = texCoordTL.Y;
262 float x5 = texCoordBR.X;
263 float y9 = texCoordBR.Y;
264 if (textureOffsetX == 0)
265 {
266 }
267 return;
268 }
269 }
270
271 // Token: 0x06001858 RID: 6232 RVA: 0x00068A90 File Offset: 0x00066C90
272 [Il2CppSetOption(Option.NullChecks, false)]
273 [Il2CppSetOption(Option.ArrayBoundsChecks, false)]
274 public void Set(float x, float y, float w, float h, VertexColors color, Vector2 texCoordTL, Vector2 texCoordBR)
275 {
276 Texture2D texture = this.Texture;
277 if (texture == null)
278 {
279 float y2 = texCoordTL.Y;
281 byte r = color.TopRightColor.R;
283 byte g = color.TopRightColor.G;
285 byte b = color.TopRightColor.B;
289 float y3 = texCoordTL.Y;
291 byte r2 = color.BottomLeftColor.R;
293 byte g2 = color.BottomLeftColor.G;
295 byte b2 = color.BottomLeftColor.B;
299 float y4 = texCoordBR.Y;
301 byte r3 = color.BottomRightColor.R;
303 byte g3 = color.BottomRightColor.G;
305 byte b3 = color.BottomRightColor.B;
309 float y5 = texCoordBR.Y;
311 return;
312 }
314 if (packedEntry != null)
315 {
316 int unityWidth = texture.UnityWidth;
317 int unityHeight = texture.UnityHeight;
318 int tileDataOffset = packedEntry.TileDataOffset;
319 short textureHeight = packedEntry.TextureHeight;
320 short textureOffsetX = packedEntry.TextureOffsetX;
321 short textureOffsetY = packedEntry.TextureOffsetY;
322 short textureScale = packedEntry.TextureScale;
323 float x2 = texCoordTL.X;
324 float y6 = texCoordTL.Y;
325 float x3 = texCoordBR.X;
326 float y7 = texCoordBR.Y;
327 bool tileTrimming = packedEntry.TileTrimming;
328 float x4 = texCoordTL.X;
329 float y8 = texCoordTL.Y;
330 float x5 = texCoordBR.X;
331 float y9 = texCoordBR.Y;
332 if (textureOffsetX == 0)
333 {
334 }
335 return;
336 }
337 }
338
339 // Token: 0x06001859 RID: 6233 RVA: 0x00068E14 File Offset: 0x00067014
340 // Note: this type is marked as 'beforefieldinit'.
342 {
343 }
344
345 // Token: 0x0400268D RID: 9869
346 private const float uvFixupOffset = 0.031f;
347
348 // Token: 0x0400268E RID: 9870
349 private static bool clippingPushedEnabledBackup;
350
351 // Token: 0x0400268F RID: 9871
352 private static bool clippingVerticalBackup;
353
354 // Token: 0x04002690 RID: 9872
355 private static bool clippingHorzontalBackup;
356
357 // Token: 0x04002691 RID: 9873
359
360 // Token: 0x04002692 RID: 9874
362
363 // Token: 0x04002693 RID: 9875
364 public static bool clippingEnabled;
365
366 // Token: 0x04002694 RID: 9876
367 public static bool geometryOffsetEnabled;
368
369 // Token: 0x04002695 RID: 9877
370 private static bool clippingVertical;
371
372 // Token: 0x04002696 RID: 9878
373 private static bool clippingHorzontal;
374
375 // Token: 0x04002697 RID: 9879
376 private static Rectangle clippingInner;
377
378 // Token: 0x04002698 RID: 9880
380
381 // Token: 0x04002699 RID: 9881
383
384 // Token: 0x0400269A RID: 9882
385 private static Clipper clipperObject;
386
387 // Token: 0x0400269B RID: 9883
388 public int BatchKey;
389
390 // Token: 0x0400269C RID: 9884
392
393 // Token: 0x0400269D RID: 9885
395
396 // Token: 0x0400269E RID: 9886
398
399 // Token: 0x0400269F RID: 9887
401
402 // Token: 0x040026A0 RID: 9888
404
405 // Token: 0x040026A1 RID: 9889
407
408 // Token: 0x040026A2 RID: 9890
410
411 // Token: 0x040026A3 RID: 9891
412 public static float ColourScale;
413
414 // Token: 0x040026A4 RID: 9892
415 public static bool EnableMaterialTrimming;
416
417 // Token: 0x040026A5 RID: 9893
419
420 // Token: 0x040026A6 RID: 9894
422 }
423}
class f__AnonymousType0<< Count > j__TPar
static void EnableClipping(Rectangle inner, Rectangle outer, SpriteBatch batcher, bool vertical)
void Set(float x, float y, float w, float h, Color color, Vector2 texCoordTL, Vector2 texCoordBR)
void Set(float x, float y, float dx, float dy, float w, float h, float sin, float cos, Color color, Vector2 texCoordTL, Vector2 texCoordBR)
void Set(float x, float y, float w, float h, VertexColors color, Vector2 texCoordTL, Vector2 texCoordBR)
void Set(float x, float y, float dx, float dy, float w, float h, float sin, float cos, VertexColors colors, Vector2 texCoordTL, Vector2 texCoordBR)
static void PushClippedImageRegion(Rectangle region, SpriteBatch batcher, bool enableGeometryScale, Vector2 geometryScaleCentre, float geometryScale)
static void SetGeometryOffset(SpriteBatch batcher, bool enabled, Vector2 offset)