public ExpandedEqdpFile(GenderRace raceCode, bool accessory) : base(CharacterUtility.EqdpIdx(raceCode, accessory)) { var def = ( byte * )DefaultData.Data; var blockSize = *( ushort * )(def + IdentifierSize); var totalBlockCount = *( ushort * )(def + IdentifierSize + 2); var totalBlockSize = blockSize * EqdpEntrySize; DataOffset = IdentifierSize + PreambleSize + totalBlockCount * BlockHeaderSize; var fullLength = DataOffset + totalBlockCount * totalBlockSize; fullLength += (FileAlignment - (fullLength & (FileAlignment - 1))) & (FileAlignment - 1); AllocateData(fullLength); Reset(); }
public static EqdpEntry GetDefault(GenderRace raceCode, bool accessory, int setIdx) => GetDefault(CharacterUtility.EqdpIdx(raceCode, accessory), setIdx);
public ExpandedEqdpFile?File(GenderRace race, bool accessory) => Files[Array.IndexOf(CharacterUtility.EqdpIndices, CharacterUtility.EqdpIdx(race, accessory))]; // TODO: female Hrothgar