Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DocumentTableReader.cs
Go to the documentation of this file.
2
4
5internal readonly struct DocumentTableReader
6{
7 internal readonly int NumberOfRows;
8
9 private readonly bool _isGuidHeapRefSizeSmall;
10
11 private readonly bool _isBlobHeapRefSizeSmall;
12
13 private readonly int _hashAlgorithmOffset;
14
15 private readonly int _hashOffset;
16
17 private readonly int _languageOffset;
18
19 internal readonly int RowSize;
20
21 internal readonly MemoryBlock Block;
22
23 internal DocumentTableReader(int numberOfRows, int guidHeapRefSize, int blobHeapRefSize, MemoryBlock containingBlock, int containingBlockOffset)
24 {
25 NumberOfRows = numberOfRows;
26 _isGuidHeapRefSizeSmall = guidHeapRefSize == 2;
27 _isBlobHeapRefSizeSmall = blobHeapRefSize == 2;
28 _hashAlgorithmOffset = blobHeapRefSize;
29 _hashOffset = _hashAlgorithmOffset + guidHeapRefSize;
30 _languageOffset = _hashOffset + blobHeapRefSize;
31 RowSize = _languageOffset + guidHeapRefSize;
32 Block = containingBlock.GetMemoryBlockAt(containingBlockOffset, RowSize * numberOfRows);
33 }
34
40
46
48 {
49 int num = (handle.RowId - 1) * RowSize;
51 }
52
54 {
55 int num = (handle.RowId - 1) * RowSize;
57 }
58}
unsafe MemoryBlock GetMemoryBlockAt(int offset, int length)
int PeekHeapReference(int offset, bool smallRefSize)
static BlobHandle FromOffset(int heapOffset)
Definition BlobHandle.cs:34
static DocumentNameBlobHandle FromOffset(int heapOffset)
DocumentNameBlobHandle GetName(DocumentHandle handle)
DocumentTableReader(int numberOfRows, int guidHeapRefSize, int blobHeapRefSize, MemoryBlock containingBlock, int containingBlockOffset)
static GuidHandle FromIndex(int heapIndex)
Definition GuidHandle.cs:18