/// <inheritdoc /> protected override void InitOffsets() { base.InitOffsets(); _index = new ExOffset <int>(0x00); _number = new ExOffset <int>(0x04); }
protected override void InitOffsets() { base.InitOffsets(); int curOff = 0x0; _data = new ExOffset <UIntPtr>(curOff); curOff += ExMemory.PointerSize; _count = new ExOffset <int>(curOff); curOff += 0x04; _max = new ExOffset <int>(curOff); }
internal static int GetClassSize(List <ExOffset> offsets) { if (offsets.Count == 0) { return(0); } // Get Biggest Offset int biggestOffset = offsets.Max(off => off.Offset); // Get Biggest Offset in size (Good for unions offsets) int biggestOffSize = offsets.Where(off => off.Offset == biggestOffset).Max(off => off.Size); // Get Offset ExOffset offset = offsets.Find(off => off.Offset == biggestOffset && off.Size == biggestOffSize); if (offset is null) { throw new NullReferenceException("'offset' can not be null."); } return(biggestOffset + offset.Size); }