Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
EffectPassCollection.cs
Go to the documentation of this file.
1using System;
4
6
7public sealed class EffectPassCollection : IEnumerable<EffectPass>
8{
9 private unsafe ID3DXBaseEffect* pEffect;
10
12
13 public EffectPass this[int index]
14 {
15 get
16 {
17 if (index >= 0 && index < pPass.Count)
18 {
19 return pPass[index];
20 }
21 return null;
22 }
23 }
24
25 public EffectPass this[string name]
26 {
27 get
28 {
30 if (enumerator.MoveNext())
31 {
32 do
33 {
34 EffectPass current = enumerator.Current;
35 if (current._name == name)
36 {
37 return current;
38 }
39 }
40 while (enumerator.MoveNext());
41 }
42 return null;
43 }
44 }
45
46 public int Count => pPass.Count;
47
49 {
50 pEffect = parent;
51 base._002Ector();
53 int num = 0;
54 if (0 < count)
55 {
56 do
57 {
59 sbyte* pass = ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, sbyte*, uint, sbyte*>)(int)(*(uint*)(*(int*)ptr + 56)))((nint)ptr, technique._handle, (uint)num);
61 num++;
62 }
63 while (num < count);
64 }
65 }
66
67 internal unsafe void UpdateParent(ID3DXBaseEffect* parent, sbyte* technique)
68 {
69 pEffect = parent;
70 int num = 0;
71 if (0 < pPass.Count)
72 {
73 do
74 {
76 sbyte* handle = ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, sbyte*, uint, sbyte*>)(int)(*(uint*)(*(int*)ptr + 56)))((nint)ptr, technique, (uint)num);
79 effectPass.pEffect = parent2;
80 effectPass._handle = handle;
81 effectPass.pAnnotations.UpdateParent(parent2, handle);
82 num++;
83 }
84 while (num < pPass.Count);
85 }
86 }
87
92
97
99 {
100 //ILSpy generated this explicit interface implementation from .override directive in GetGenericEnumerator
101 return this.GetGenericEnumerator();
102 }
103
105 {
106 return pPass.GetEnumerator();
107 }
108
110 {
111 //ILSpy generated this explicit interface implementation from .override directive in GetBaseEnumerator
112 return this.GetBaseEnumerator();
113 }
114}
unsafe void UpdateParent(ID3DXBaseEffect *parent, sbyte *technique)
unsafe EffectPassCollection(ID3DXBaseEffect *parent, EffectTechnique technique, int count)
void Add(TKey key, TValue value)
new IEnumerator< T > GetEnumerator()