Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
PropertyPtrTableReader.cs
Go to the documentation of this file.
2
4
5internal readonly struct PropertyPtrTableReader
6{
7 internal readonly int NumberOfRows;
8
9 private readonly bool _IsPropertyTableRowRefSizeSmall;
10
11 private readonly int _PropertyOffset;
12
13 internal readonly int RowSize;
14
15 internal readonly MemoryBlock Block;
16
17 internal PropertyPtrTableReader(int numberOfRows, int propertyTableRowRefSize, MemoryBlock containingBlock, int containingBlockOffset)
18 {
19 NumberOfRows = numberOfRows;
20 _IsPropertyTableRowRefSizeSmall = propertyTableRowRefSize == 2;
22 RowSize = _PropertyOffset + propertyTableRowRefSize;
23 Block = containingBlock.GetMemoryBlockAt(containingBlockOffset, RowSize * numberOfRows);
24 }
25
31}
int PeekReference(int offset, bool smallRefSize)
unsafe MemoryBlock GetMemoryBlockAt(int offset, int length)
PropertyPtrTableReader(int numberOfRows, int propertyTableRowRefSize, MemoryBlock containingBlock, int containingBlockOffset)
static PropertyDefinitionHandle FromRowId(int rowId)