Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ IsDuplicateElement()

static unsafe bool Microsoft.Xna.Framework.Graphics.DeclarationManager.IsDuplicateElement ( _D3DVERTEXELEMENT9 * elements,
int pos )
inlinestaticprivate

Definition at line 397 of file DeclarationManager.cs.

398 {
399 int num = 0;
400 if (0 < pos)
401 {
402 byte b = (pos * 8 + (byte*)elements)[6];
403 _D3DVERTEXELEMENT9* ptr = (_D3DVERTEXELEMENT9*)((byte*)elements + 7);
404 do
405 {
406 if (b != *((byte*)ptr - 1) || (pos * 8 + (byte*)elements)[7] != *(byte*)ptr)
407 {
408 num++;
409 ptr = (_D3DVERTEXELEMENT9*)((byte*)ptr + 8);
410 continue;
411 }
412 return true;
413 }
414 while (num < pos);
415 }
416 return false;
417 }

Referenced by Microsoft.Xna.Framework.Graphics.DeclarationManager.CreateNativeDeclaration().