Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
PropertyMapTableReader.cs
Go to the documentation of this file.
2
4
5internal readonly struct PropertyMapTableReader
6{
7 internal readonly int NumberOfRows;
8
9 private readonly bool _IsTypeDefTableRowRefSizeSmall;
10
11 private readonly bool _IsPropertyRefSizeSmall;
12
13 private readonly int _ParentOffset;
14
15 private readonly int _PropertyListOffset;
16
17 internal readonly int RowSize;
18
19 internal readonly MemoryBlock Block;
20
21 internal PropertyMapTableReader(int numberOfRows, int typeDefTableRowRefSize, int propertyRefSize, MemoryBlock containingBlock, int containingBlockOffset)
22 {
23 NumberOfRows = numberOfRows;
24 _IsTypeDefTableRowRefSizeSmall = typeDefTableRowRefSize == 2;
25 _IsPropertyRefSizeSmall = propertyRefSize == 2;
26 _ParentOffset = 0;
27 _PropertyListOffset = _ParentOffset + typeDefTableRowRefSize;
28 RowSize = _PropertyListOffset + propertyRefSize;
29 Block = containingBlock.GetMemoryBlockAt(containingBlockOffset, RowSize * numberOfRows);
30 }
31
33 {
35 return num + 1;
36 }
37
43
44 internal int GetPropertyListStartFor(int rowId)
45 {
46 int num = (rowId - 1) * RowSize;
48 }
49}
int PeekReference(int offset, bool smallRefSize)
unsafe MemoryBlock GetMemoryBlockAt(int offset, int length)
int LinearSearchReference(int rowSize, int referenceOffset, uint referenceValue, bool isReferenceSmall)
PropertyMapTableReader(int numberOfRows, int typeDefTableRowRefSize, int propertyRefSize, MemoryBlock containingBlock, int containingBlockOffset)
static TypeDefinitionHandle FromRowId(int rowId)