Beispiel #1
0
    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();
    }
Beispiel #2
0
 public static EqdpEntry GetDefault(GenderRace raceCode, bool accessory, int setIdx)
 => GetDefault(CharacterUtility.EqdpIdx(raceCode, accessory), setIdx);
Beispiel #3
0
 public ExpandedEqdpFile?File(GenderRace race, bool accessory)
 => Files[Array.IndexOf(CharacterUtility.EqdpIndices, CharacterUtility.EqdpIdx(race, accessory))];           // TODO: female Hrothgar