Exemplo n.º 1
0
        public override void ReadData(ESPReader reader, long dataEnd)
        {
            while (reader.BaseStream.Position < dataEnd)
            {
                string subTag = reader.PeekTag();

                switch (subTag)
                {
                case "EDID":
                    if (EditorID == null)
                    {
                        EditorID = new SimpleSubrecord <String>();
                    }

                    EditorID.ReadBinary(reader);
                    break;

                case "NVER":
                    if (Version == null)
                    {
                        Version = new SimpleSubrecord <UInt32>();
                    }

                    Version.ReadBinary(reader);
                    break;

                case "DATA":
                    if (Data == null)
                    {
                        Data = new NavMeshData();
                    }

                    Data.ReadBinary(reader);
                    break;

                case "NVVX":
                    if (Vertices == null)
                    {
                        Vertices = new SimpleSubrecord <Byte[]>();
                    }

                    Vertices.ReadBinary(reader);
                    break;

                case "NVTR":
                    if (Triangles == null)
                    {
                        Triangles = new SimpleSubrecord <Byte[]>();
                    }

                    Triangles.ReadBinary(reader);
                    break;

                case "NVCA":
                    if (Unknown == null)
                    {
                        Unknown = new SimpleSubrecord <Byte[]>();
                    }

                    Unknown.ReadBinary(reader);
                    break;

                case "NVDP":
                    if (Doors == null)
                    {
                        Doors = new NavMeshDoorList();
                    }

                    Doors.ReadBinary(reader);
                    break;

                case "NVGD":
                    if (Grid == null)
                    {
                        Grid = new SimpleSubrecord <Byte[]>();
                    }

                    Grid.ReadBinary(reader);
                    break;

                case "NVEX":
                    if (ExternalConnections == null)
                    {
                        ExternalConnections = new NavMeshExternalConnectionList();
                    }

                    ExternalConnections.ReadBinary(reader);
                    break;

                default:
                    throw new Exception();
                }
            }
        }
Exemplo n.º 2
0
        public override void ReadData(ESPReader reader, long dataEnd)
        {
            while (reader.BaseStream.Position < dataEnd)
            {
                string subTag = reader.PeekTag();

                switch (subTag)
                {
                case "EDID":
                    if (EditorID == null)
                    {
                        EditorID = new SimpleSubrecord <String>();
                    }

                    EditorID.ReadBinary(reader);
                    break;

                case "OBND":
                    if (ObjectBounds == null)
                    {
                        ObjectBounds = new ObjectBounds();
                    }

                    ObjectBounds.ReadBinary(reader);
                    break;

                case "FULL":
                    if (Name == null)
                    {
                        Name = new SimpleSubrecord <String>();
                    }

                    Name.ReadBinary(reader);
                    break;

                case "MODL":
                    if (Model == null)
                    {
                        Model = new Model();
                    }

                    Model.ReadBinary(reader);
                    break;

                case "DEST":
                    if (Destructable == null)
                    {
                        Destructable = new Destructable();
                    }

                    Destructable.ReadBinary(reader);
                    break;

                case "DATA":
                    if (Unknown == null)
                    {
                        Unknown = new SimpleSubrecord <Byte>();
                    }

                    Unknown.ReadBinary(reader);
                    break;

                case "SNAM":
                    if (Sound == null)
                    {
                        Sound = new RecordReference();
                    }

                    Sound.ReadBinary(reader);
                    break;

                default:
                    throw new Exception();
                }
            }
        }
Exemplo n.º 3
0
        public override void ReadData(ESPReader reader, long dataEnd)
        {
            while (reader.BaseStream.Position < dataEnd)
            {
                string subTag = reader.PeekTag();

                switch (subTag)
                {
                case "EDID":
                    if (EditorID == null)
                    {
                        EditorID = new SimpleSubrecord <String>();
                    }

                    EditorID.ReadBinary(reader);
                    break;

                case "aIAD":
                    if (ImageSpaceModifierSunrise == null)
                    {
                        ImageSpaceModifierSunrise = new RecordReference();
                    }

                    ImageSpaceModifierSunrise.ReadBinary(reader);
                    break;

                case "bIAD":
                    if (ImageSpaceModifierDay == null)
                    {
                        ImageSpaceModifierDay = new RecordReference();
                    }

                    ImageSpaceModifierDay.ReadBinary(reader);
                    break;

                case "cIAD":
                    if (ImageSpaceModifierSunset == null)
                    {
                        ImageSpaceModifierSunset = new RecordReference();
                    }

                    ImageSpaceModifierSunset.ReadBinary(reader);
                    break;

                case "dIAD":
                    if (ImageSpaceModifierNight == null)
                    {
                        ImageSpaceModifierNight = new RecordReference();
                    }

                    ImageSpaceModifierNight.ReadBinary(reader);
                    break;

                case "eIAD":
                    if (ImageSpaceModifierHighNoon == null)
                    {
                        ImageSpaceModifierHighNoon = new RecordReference();
                    }

                    ImageSpaceModifierHighNoon.ReadBinary(reader);
                    break;

                case "fIAD":
                    if (ImageSpaceModifierMidnight == null)
                    {
                        ImageSpaceModifierMidnight = new RecordReference();
                    }

                    ImageSpaceModifierMidnight.ReadBinary(reader);
                    break;

                case "DNAM":
                    if (CloudTextureLayer0 == null)
                    {
                        CloudTextureLayer0 = new SimpleSubrecord <String>();
                    }

                    CloudTextureLayer0.ReadBinary(reader);
                    break;

                case "CNAM":
                    if (CloudTextureLayer1 == null)
                    {
                        CloudTextureLayer1 = new SimpleSubrecord <String>();
                    }

                    CloudTextureLayer1.ReadBinary(reader);
                    break;

                case "ANAM":
                    if (CloudTextureLayer2 == null)
                    {
                        CloudTextureLayer2 = new SimpleSubrecord <String>();
                    }

                    CloudTextureLayer2.ReadBinary(reader);
                    break;

                case "BNAM":
                    if (CloudTextureLayer3 == null)
                    {
                        CloudTextureLayer3 = new SimpleSubrecord <String>();
                    }

                    CloudTextureLayer3.ReadBinary(reader);
                    break;

                case "MODL":
                    if (Model == null)
                    {
                        Model = new Model();
                    }

                    Model.ReadBinary(reader);
                    break;

                case "LNAM":
                    if (Unknown == null)
                    {
                        Unknown = new SimpleSubrecord <Byte[]>();
                    }

                    Unknown.ReadBinary(reader);
                    break;

                case "ONAM":
                    if (CloudLayerSpeed == null)
                    {
                        CloudLayerSpeed = new CloudLayerSpeed();
                    }

                    CloudLayerSpeed.ReadBinary(reader);
                    break;

                case "PNAM":
                    if (CloudLayerColors == null)
                    {
                        CloudLayerColors = new CloudLayerColors();
                    }

                    CloudLayerColors.ReadBinary(reader);
                    break;

                case "NAM0":
                    if (EnvironmentalColors == null)
                    {
                        EnvironmentalColors = new EnvironmentalColors();
                    }

                    EnvironmentalColors.ReadBinary(reader);
                    break;

                case "FNAM":
                    if (WeatherFogDistance == null)
                    {
                        WeatherFogDistance = new WeatherFogDistance();
                    }

                    WeatherFogDistance.ReadBinary(reader);
                    break;

                case "INAM":
                    if (Unused == null)
                    {
                        Unused = new SimpleSubrecord <Byte[]>();
                    }

                    Unused.ReadBinary(reader);
                    break;

                case "DATA":
                    if (Data == null)
                    {
                        Data = new WeatherData();
                    }

                    Data.ReadBinary(reader);
                    break;

                case "SNAM":
                    if (Sounds == null)
                    {
                        Sounds = new List <WeatherSound>();
                    }

                    WeatherSound tempSNAM = new WeatherSound();
                    tempSNAM.ReadBinary(reader);
                    Sounds.Add(tempSNAM);
                    break;

                default:
                    throw new Exception();
                }
            }
        }
Exemplo n.º 4
0
        public override void ReadData(ESPReader reader, long dataEnd)
        {
            while (reader.BaseStream.Position < dataEnd)
            {
                string subTag = reader.PeekTag();

                switch (subTag)
                {
                case "EDID":
                    if (EditorID == null)
                    {
                        EditorID = new SimpleSubrecord <String>();
                    }

                    EditorID.ReadBinary(reader);
                    break;

                case "OBND":
                    if (ObjectBounds == null)
                    {
                        ObjectBounds = new ObjectBounds();
                    }

                    ObjectBounds.ReadBinary(reader);
                    break;

                case "FULL":
                    if (Name == null)
                    {
                        Name = new SimpleSubrecord <String>();
                    }

                    Name.ReadBinary(reader);
                    break;

                case "MODL":
                    if (Model == null)
                    {
                        Model = new Model();
                    }

                    Model.ReadBinary(reader);
                    break;

                case "ACBS":
                    if (BaseStats == null)
                    {
                        BaseStats = new NPCBaseStats();
                    }

                    BaseStats.ReadBinary(reader);
                    break;

                case "SNAM":
                    if (Factions == null)
                    {
                        Factions = new List <FactionMembership>();
                    }

                    FactionMembership tempSNAM = new FactionMembership();
                    tempSNAM.ReadBinary(reader);
                    Factions.Add(tempSNAM);
                    break;

                case "INAM":
                    if (DeathItem == null)
                    {
                        DeathItem = new RecordReference();
                    }

                    DeathItem.ReadBinary(reader);
                    break;

                case "VTCK":
                    if (VoiceType == null)
                    {
                        VoiceType = new RecordReference();
                    }

                    VoiceType.ReadBinary(reader);
                    break;

                case "TPLT":
                    if (Template == null)
                    {
                        Template = new RecordReference();
                    }

                    Template.ReadBinary(reader);
                    break;

                case "RNAM":
                    if (Race == null)
                    {
                        Race = new RecordReference();
                    }

                    Race.ReadBinary(reader);
                    break;

                case "SPLO":
                    if (ActorEffects == null)
                    {
                        ActorEffects = new List <RecordReference>();
                    }

                    RecordReference tempSPLO = new RecordReference();
                    tempSPLO.ReadBinary(reader);
                    ActorEffects.Add(tempSPLO);
                    break;

                case "EITM":
                    if (UnarmedAttackEffect == null)
                    {
                        UnarmedAttackEffect = new RecordReference();
                    }

                    UnarmedAttackEffect.ReadBinary(reader);
                    break;

                case "EAMT":
                    if (UnarmedAttackAnimation == null)
                    {
                        UnarmedAttackAnimation = new SimpleSubrecord <UInt16>();
                    }

                    UnarmedAttackAnimation.ReadBinary(reader);
                    break;

                case "DEST":
                    if (Destructable == null)
                    {
                        Destructable = new Destructable();
                    }

                    Destructable.ReadBinary(reader);
                    break;

                case "SCRI":
                    if (Script == null)
                    {
                        Script = new RecordReference();
                    }

                    Script.ReadBinary(reader);
                    break;

                case "CNTO":
                    if (Contents == null)
                    {
                        Contents = new List <InventoryItem>();
                    }

                    InventoryItem tempCNTO = new InventoryItem();
                    tempCNTO.ReadBinary(reader);
                    Contents.Add(tempCNTO);
                    break;

                case "AIDT":
                    if (AIData == null)
                    {
                        AIData = new AIData();
                    }

                    AIData.ReadBinary(reader);
                    break;

                case "PKID":
                    if (Packages == null)
                    {
                        Packages = new List <RecordReference>();
                    }

                    RecordReference tempPKID = new RecordReference();
                    tempPKID.ReadBinary(reader);
                    Packages.Add(tempPKID);
                    break;

                case "CNAM":
                    if (Class == null)
                    {
                        Class = new RecordReference();
                    }

                    Class.ReadBinary(reader);
                    break;

                case "DATA":
                    if (Data == null)
                    {
                        Data = new NPCData();
                    }

                    Data.ReadBinary(reader);
                    break;

                case "DNAM":
                    if (Skills == null)
                    {
                        Skills = new NPCSkills();
                    }

                    Skills.ReadBinary(reader);
                    break;

                case "PNAM":
                    if (HeadParts == null)
                    {
                        HeadParts = new List <RecordReference>();
                    }

                    RecordReference tempPNAM = new RecordReference();
                    tempPNAM.ReadBinary(reader);
                    HeadParts.Add(tempPNAM);
                    break;

                case "HNAM":
                    if (HairType == null)
                    {
                        HairType = new RecordReference();
                    }

                    HairType.ReadBinary(reader);
                    break;

                case "LNAM":
                    if (HairLength == null)
                    {
                        HairLength = new SimpleSubrecord <Single>();
                    }

                    HairLength.ReadBinary(reader);
                    break;

                case "ENAM":
                    if (Eyes == null)
                    {
                        Eyes = new RecordReference();
                    }

                    Eyes.ReadBinary(reader);
                    break;

                case "HCLR":
                    if (HairColor == null)
                    {
                        HairColor = new SimpleSubrecord <Color>();
                    }

                    HairColor.ReadBinary(reader);
                    break;

                case "ZNAM":
                    if (CombatStyle == null)
                    {
                        CombatStyle = new RecordReference();
                    }

                    CombatStyle.ReadBinary(reader);
                    break;

                case "NAM4":
                    if (ImpactMaterialType == null)
                    {
                        ImpactMaterialType = new SimpleSubrecord <MaterialTypeUInt>();
                    }

                    ImpactMaterialType.ReadBinary(reader);
                    break;

                case "FGGS":
                    if (FaceGenGeometrySymmetric == null)
                    {
                        FaceGenGeometrySymmetric = new SimpleSubrecord <Byte[]>();
                    }

                    FaceGenGeometrySymmetric.ReadBinary(reader);
                    break;

                case "FGGA":
                    if (FaceGenGeometryAsymmetric == null)
                    {
                        FaceGenGeometryAsymmetric = new SimpleSubrecord <Byte[]>();
                    }

                    FaceGenGeometryAsymmetric.ReadBinary(reader);
                    break;

                case "FGTS":
                    if (FaceGenTexture == null)
                    {
                        FaceGenTexture = new SimpleSubrecord <Byte[]>();
                    }

                    FaceGenTexture.ReadBinary(reader);
                    break;

                case "NAM5":
                    if (Unknown == null)
                    {
                        Unknown = new SimpleSubrecord <UInt16>();
                    }

                    Unknown.ReadBinary(reader);
                    break;

                case "NAM6":
                    if (Height == null)
                    {
                        Height = new SimpleSubrecord <Single>();
                    }

                    Height.ReadBinary(reader);
                    break;

                case "NAM7":
                    if (Weight == null)
                    {
                        Weight = new SimpleSubrecord <Single>();
                    }

                    Weight.ReadBinary(reader);
                    break;

                default:
                    throw new Exception();
                }
            }
        }
Exemplo n.º 5
0
        public override void ReadData(ESPReader reader, long dataEnd)
        {
            while (reader.BaseStream.Position < dataEnd)
            {
                string subTag = reader.PeekTag();

                switch (subTag)
                {
                case "EDID":
                    if (EditorID == null)
                    {
                        EditorID = new SimpleSubrecord <String>();
                    }

                    EditorID.ReadBinary(reader);
                    break;

                case "FULL":
                    if (Name == null)
                    {
                        Name = new SimpleSubrecord <String>();
                    }

                    Name.ReadBinary(reader);
                    break;

                case "DATA":
                    if (CellFlags == null)
                    {
                        CellFlags = new SimpleSubrecord <CellFlags>();
                    }

                    CellFlags.ReadBinary(reader);
                    break;

                case "XCLC":
                    if (Grid == null)
                    {
                        Grid = new CellGrid();
                    }

                    Grid.ReadBinary(reader);
                    break;

                case "XCLL":
                    if (Lighting == null)
                    {
                        Lighting = new CellLighting();
                    }

                    Lighting.ReadBinary(reader);
                    break;

                case "IMPF":
                    if (FootstepMaterial == null)
                    {
                        FootstepMaterial = new FootstepMaterial();
                    }

                    FootstepMaterial.ReadBinary(reader);
                    break;

                case "LTMP":
                    if (LightTemplate == null)
                    {
                        LightTemplate = new RecordReference();
                    }

                    LightTemplate.ReadBinary(reader);
                    break;

                case "LNAM":
                    if (LightTemplateInherit == null)
                    {
                        LightTemplateInherit = new SimpleSubrecord <LightTemplateInheritFlags>();
                    }

                    LightTemplateInherit.ReadBinary(reader);
                    break;

                case "XCLW":
                    if (WaterHeight == null)
                    {
                        WaterHeight = new SimpleSubrecord <Single>();
                    }

                    WaterHeight.ReadBinary(reader);
                    break;

                case "XNAM":
                    if (WaterNoiseTexture == null)
                    {
                        WaterNoiseTexture = new SimpleSubrecord <String>();
                    }

                    WaterNoiseTexture.ReadBinary(reader);
                    break;

                case "XCLR":
                    if (Regions == null)
                    {
                        Regions = new SortedFormArray();
                    }

                    Regions.ReadBinary(reader);
                    break;

                case "XCIM":
                    if (ImageSpace == null)
                    {
                        ImageSpace = new RecordReference();
                    }

                    ImageSpace.ReadBinary(reader);
                    break;

                case "XCET":
                    if (Unknown == null)
                    {
                        Unknown = new SimpleSubrecord <Byte>();
                    }

                    Unknown.ReadBinary(reader);
                    break;

                case "XEZN":
                    if (EncounterZone == null)
                    {
                        EncounterZone = new RecordReference();
                    }

                    EncounterZone.ReadBinary(reader);
                    break;

                case "XCCM":
                    if (Climate == null)
                    {
                        Climate = new RecordReference();
                    }

                    Climate.ReadBinary(reader);
                    break;

                case "XCWT":
                    if (Water == null)
                    {
                        Water = new RecordReference();
                    }

                    Water.ReadBinary(reader);
                    break;

                case "XOWN":
                    if (Owner == null)
                    {
                        Owner = new RecordReference();
                    }

                    Owner.ReadBinary(reader);
                    break;

                case "XRNK":
                    if (FactionRank == null)
                    {
                        FactionRank = new SimpleSubrecord <Int32>();
                    }

                    FactionRank.ReadBinary(reader);
                    break;

                case "XCAS":
                    if (AcousticSpace == null)
                    {
                        AcousticSpace = new RecordReference();
                    }

                    AcousticSpace.ReadBinary(reader);
                    break;

                case "XCMT":
                    if (Unused == null)
                    {
                        Unused = new SimpleSubrecord <Byte>();
                    }

                    Unused.ReadBinary(reader);
                    break;

                case "XCMO":
                    if (MusicType == null)
                    {
                        MusicType = new RecordReference();
                    }

                    MusicType.ReadBinary(reader);
                    break;

                default:
                    throw new Exception();
                }
            }
        }
Exemplo n.º 6
0
        public override void ReadBinary(ESPReader reader)
        {
            List <string> readTags = new List <string>();

            while (reader.BaseStream.Position < reader.BaseStream.Length)
            {
                string subTag = reader.PeekTag();

                switch (subTag)
                {
                case "MODL":
                    if (readTags.Contains("MODL"))
                    {
                        return;
                    }
                    if (FileName == null)
                    {
                        FileName = new SimpleSubrecord <String>();
                    }

                    FileName.ReadBinary(reader);
                    break;

                case "MODB":
                    if (readTags.Contains("MODB"))
                    {
                        return;
                    }
                    if (Unknown == null)
                    {
                        Unknown = new SimpleSubrecord <Byte[]>();
                    }

                    Unknown.ReadBinary(reader);
                    break;

                case "MODT":
                    if (readTags.Contains("MODT"))
                    {
                        return;
                    }
                    if (TextureFileHash == null)
                    {
                        TextureFileHash = new SimpleSubrecord <Byte[]>();
                    }

                    TextureFileHash.ReadBinary(reader);
                    break;

                case "MODS":
                    if (readTags.Contains("MODS"))
                    {
                        return;
                    }
                    if (AlternateTextures == null)
                    {
                        AlternateTextures = new AlternateTextures();
                    }

                    AlternateTextures.ReadBinary(reader);
                    break;

                case "MODD":
                    if (readTags.Contains("MODD"))
                    {
                        return;
                    }
                    if (FaceGenModelFlags == null)
                    {
                        FaceGenModelFlags = new SimpleSubrecord <FaceGenModelFlags>();
                    }

                    FaceGenModelFlags.ReadBinary(reader);
                    break;

                default:
                    return;
                }

                readTags.Add(subTag);
            }
        }
Exemplo n.º 7
0
        public override void ReadData(ESPReader reader, long dataEnd)
        {
            while (reader.BaseStream.Position < dataEnd)
            {
                string subTag = reader.PeekTag();

                switch (subTag)
                {
                case "EDID":
                    if (EditorID == null)
                    {
                        EditorID = new SimpleSubrecord <String>();
                    }

                    EditorID.ReadBinary(reader);
                    break;

                case "QSTI":
                    if (AddedQuests == null)
                    {
                        AddedQuests = new List <AddedQuest>();
                    }

                    AddedQuest tempQSTI = new AddedQuest();
                    tempQSTI.ReadBinary(reader);
                    AddedQuests.Add(tempQSTI);
                    break;

                case "QSTR":
                    if (RemovedQuests == null)
                    {
                        RemovedQuests = new List <RecordReference>();
                    }

                    RecordReference tempQSTR = new RecordReference();
                    tempQSTR.ReadBinary(reader);
                    RemovedQuests.Add(tempQSTR);
                    break;

                case "INFC":
                    if (UnusedInfos == null)
                    {
                        UnusedInfos = new List <SharedInfo>();
                    }

                    SharedInfo tempINFC = new SharedInfo();
                    tempINFC.ReadBinary(reader);
                    UnusedInfos.Add(tempINFC);
                    break;

                case "FULL":
                    if (Name == null)
                    {
                        Name = new SimpleSubrecord <String>();
                    }

                    Name.ReadBinary(reader);
                    break;

                case "PNAM":
                    if (Priority == null)
                    {
                        Priority = new SimpleSubrecord <Single>();
                    }

                    Priority.ReadBinary(reader);
                    break;

                case "TDUM":
                    if (Unknown == null)
                    {
                        Unknown = new SimpleSubrecord <String>();
                    }

                    Unknown.ReadBinary(reader);
                    break;

                case "DATA":
                    if (Data == null)
                    {
                        Data = new DialogTopicData();
                    }

                    Data.ReadBinary(reader);
                    break;

                default:
                    throw new Exception();
                }
            }
        }
Exemplo n.º 8
0
        public override void ReadData(ESPReader reader, long dataEnd)
        {
            while (reader.BaseStream.Position < dataEnd)
            {
                string subTag = reader.PeekTag();

                switch (subTag)
                {
                case "EDID":
                    if (EditorID == null)
                    {
                        EditorID = new SimpleSubrecord <String>();
                    }

                    EditorID.ReadBinary(reader);
                    break;

                case "FULL":
                    if (Name == null)
                    {
                        Name = new SimpleSubrecord <String>();
                    }

                    Name.ReadBinary(reader);
                    break;

                case "DESC":
                    if (Description == null)
                    {
                        Description = new SimpleSubrecord <String>();
                    }

                    Description.ReadBinary(reader);
                    break;

                case "XNAM":
                    if (Relationships == null)
                    {
                        Relationships = new List <Relationship>();
                    }

                    Relationship tempXNAM = new Relationship();
                    tempXNAM.ReadBinary(reader);
                    Relationships.Add(tempXNAM);
                    break;

                case "DATA":
                    if (Data == null)
                    {
                        Data = new RaceData();
                    }

                    Data.ReadBinary(reader);
                    break;

                case "ONAM":
                    if (OlderRace == null)
                    {
                        OlderRace = new RecordReference();
                    }

                    OlderRace.ReadBinary(reader);
                    break;

                case "YNAM":
                    if (YoungerRace == null)
                    {
                        YoungerRace = new RecordReference();
                    }

                    YoungerRace.ReadBinary(reader);
                    break;

                case "NAM2":
                    if (UnknownMarker == null)
                    {
                        UnknownMarker = new SubMarker();
                    }

                    UnknownMarker.ReadBinary(reader);
                    break;

                case "VTCK":
                    if (DefaultVoices == null)
                    {
                        DefaultVoices = new RaceDefaultVoices();
                    }

                    DefaultVoices.ReadBinary(reader);
                    break;

                case "DNAM":
                    if (DefaultHairStyles == null)
                    {
                        DefaultHairStyles = new RaceDefaultHairStyles();
                    }

                    DefaultHairStyles.ReadBinary(reader);
                    break;

                case "CNAM":
                    if (DefaultHairColors == null)
                    {
                        DefaultHairColors = new RaceDefaultHairColors();
                    }

                    DefaultHairColors.ReadBinary(reader);
                    break;

                case "PNAM":
                    if (FaceGenMainClamp == null)
                    {
                        FaceGenMainClamp = new SimpleSubrecord <Single>();
                    }

                    FaceGenMainClamp.ReadBinary(reader);
                    break;

                case "UNAM":
                    if (FaceGenFaceClamp == null)
                    {
                        FaceGenFaceClamp = new SimpleSubrecord <Single>();
                    }

                    FaceGenFaceClamp.ReadBinary(reader);
                    break;

                case "ATTR":
                    if (Unknown == null)
                    {
                        Unknown = new SimpleSubrecord <Byte[]>();
                    }

                    Unknown.ReadBinary(reader);
                    break;

                case "NAM0":
                    if (HeadData == null)
                    {
                        HeadData = new RaceHeadData();
                    }

                    HeadData.ReadBinary(reader);
                    break;

                case "NAM1":
                    if (BodyData == null)
                    {
                        BodyData = new RaceBodyData();
                    }

                    BodyData.ReadBinary(reader);
                    break;

                case "HNAM":
                    if (Hairs == null)
                    {
                        Hairs = new FormArray();
                    }

                    Hairs.ReadBinary(reader);
                    break;

                case "ENAM":
                    if (Eyes == null)
                    {
                        Eyes = new FormArray();
                    }

                    Eyes.ReadBinary(reader);
                    break;

                case "MNAM":
                    if (MaleFaceGenData == null)
                    {
                        MaleFaceGenData = new FaceGenData();
                    }

                    MaleFaceGenData.ReadBinary(reader);
                    break;

                case "FNAM":
                    if (FemaleFaceGenData == null)
                    {
                        FemaleFaceGenData = new FaceGenData();
                    }

                    FemaleFaceGenData.ReadBinary(reader);
                    break;

                default:
                    throw new Exception();
                }
            }
        }