Esempio n. 1
0
 protected void loadRenderable(NIFFile file, BinaryReader ds)
 {
     loadAVObject(file, ds);
     numMaterials      = ds.readInt();
     materialExtraData = new List <int>(numMaterials);
     materialNames     = new List <String>(numMaterials);
     for (int i = 0; i < numMaterials; i++)
     {
         int    matNameIndex = ds.readInt();
         String matName      = file.getStringFromTable(matNameIndex);
         materialExtraData.Add(ds.readInt());
         materialNames.Add(matName);
     }
     materialIndex       = ds.readInt();
     materialNeedsUpdate = ds.readUnsignedByte() > 0;
 }
Esempio n. 2
0
        public void parse(NIFFile file, NIFObject baseo, BinaryReader ds)
        {
            streamLinkID = ds.readInt();
            instanced    = ds.readUnsignedByte() > 0;

            int numStreamSubmeshRegionMapEntries = ds.readUnsignedShort();

            submeshRegionMap = new List <int>(numStreamSubmeshRegionMapEntries);
            for (int i = 0; i < numStreamSubmeshRegionMapEntries; i++)
            {
                submeshRegionMap.Add(ds.readUnsignedShort());
            }
            int numElementDescs = ds.readInt();

            elementDescs = new List <Pair <String, int> >(numElementDescs);
            for (int i = 0; i < numElementDescs; i++)
            {
                int    descNameIndex = ds.readInt();
                String descName      = file.getStringFromTable(descNameIndex);
                int    descIndex     = ds.readInt();
                elementDescs.Add(NIF.Pair <String, int> .of(descName, descIndex));
            }
        }