Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
EnCMapTableReader.cs
Go to the documentation of this file.
2
4
5internal readonly struct EnCMapTableReader
6{
7 internal readonly int NumberOfRows;
8
9 private readonly int _TokenOffset;
10
11 internal readonly int RowSize;
12
13 internal readonly MemoryBlock Block;
14
15 internal EnCMapTableReader(int numberOfRows, MemoryBlock containingBlock, int containingBlockOffset)
16 {
17 NumberOfRows = numberOfRows;
18 _TokenOffset = 0;
20 Block = containingBlock.GetMemoryBlockAt(containingBlockOffset, RowSize * numberOfRows);
21 }
22
23 internal uint GetToken(int rowId)
24 {
25 int num = (rowId - 1) * RowSize;
26 return Block.PeekUInt32(num + _TokenOffset);
27 }
28}
unsafe MemoryBlock GetMemoryBlockAt(int offset, int length)
unsafe uint PeekUInt32(int offset)
EnCMapTableReader(int numberOfRows, MemoryBlock containingBlock, int containingBlockOffset)