Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
EffectAnnotationCollection.cs
Go to the documentation of this file.
1using System;
4
6
7public sealed class EffectAnnotationCollection : IEnumerable<EffectAnnotation>
8{
9 private unsafe ID3DXBaseEffect* pEffect;
10
12
13 public EffectAnnotation this[int index]
14 {
15 get
16 {
17 if (index >= 0 && index < pAnnotation.Count)
18 {
19 return pAnnotation[index];
20 }
21 return null;
22 }
23 }
24
25 public EffectAnnotation this[string name]
26 {
27 get
28 {
30 if (enumerator.MoveNext())
31 {
32 do
33 {
34 EffectAnnotation 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 => pAnnotation.Count;
47
48 internal unsafe EffectAnnotationCollection(ID3DXBaseEffect* parent, sbyte* parentHandle, int count)
49 {
50 pEffect = parent;
51 base._002Ector();
53 int num = 0;
54 if (0 >= count)
55 {
56 return;
57 }
58 do
59 {
61 sbyte* handle = ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, sbyte*, uint, sbyte*>)(int)(*(uint*)(*(int*)ptr + 72)))((nint)ptr, parentHandle, (uint)num);
63 if (effectAnnotation._paramClass >= EffectParameterClass.Scalar && effectAnnotation._paramType >= EffectParameterType.Void)
64 {
66 }
67 num++;
68 }
69 while (num < count);
70 }
71
72 internal unsafe void UpdateParent(ID3DXBaseEffect* parent, sbyte* handle)
73 {
74 pEffect = parent;
75 int num = 0;
76 if (0 < pAnnotation.Count)
77 {
78 do
79 {
81 sbyte* handle2 = ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, sbyte*, uint, sbyte*>)(int)(*(uint*)(*(int*)ptr + 72)))((nint)ptr, handle, (uint)num);
84 effectAnnotation.pEffect = ptr2;
85 effectAnnotation._handle = handle2;
86 num++;
87 }
88 while (num < pAnnotation.Count);
89 }
90 }
91
96
101
103 {
104 //ILSpy generated this explicit interface implementation from .override directive in GetGenericEnumerator
105 return this.GetGenericEnumerator();
106 }
107
109 {
110 return pAnnotation.GetEnumerator();
111 }
112
114 {
115 //ILSpy generated this explicit interface implementation from .override directive in GetBaseEnumerator
116 return this.GetBaseEnumerator();
117 }
118}
unsafe void UpdateParent(ID3DXBaseEffect *parent, sbyte *handle)
unsafe EffectAnnotationCollection(ID3DXBaseEffect *parent, sbyte *parentHandle, int count)
void Add(TKey key, TValue value)
new IEnumerator< T > GetEnumerator()