Ejemplo n.º 1
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void Write(OStream s, Dictionary <NiObject, uint> link_map, List <NiObject> missing_link_stack, NifInfo info)
 {
     base.Write(s, link_map, missing_link_stack, info);
     binaryData.dataSize = (uint)binaryData.data.Count;
     Nif.NifStream(binaryData.dataSize, s, info);
     for (var i3 = 0; i3 < binaryData.data.Count; i3++)
     {
         Nif.NifStream(binaryData.data[i3], s, info);
     }
 }
Ejemplo n.º 2
0
        /*! NIFLIB_HIDDEN function.  For internal use only. */
        internal override void Read(IStream s, List <uint> link_stack, NifInfo info)
        {
            uint block_num;

            base.Read(s, link_stack, info);
            Nif.NifStream(out block_num, s, info);
            link_stack.Add(block_num);
            Nif.NifStream(out block_num, s, info);
            link_stack.Add(block_num);
        }
Ejemplo n.º 3
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void Read(IStream s, List <uint> link_stack, NifInfo info)
 {
     base.Read(s, link_stack, info);
     Nif.NifStream(out binaryData.dataSize, s, info);
     binaryData.data = new byte[binaryData.dataSize];
     for (var i3 = 0; i3 < binaryData.data.Count; i3++)
     {
         Nif.NifStream(out binaryData.data[i3], s, info);
     }
 }
Ejemplo n.º 4
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void Write(OStream s, Dictionary <NiObject, uint> link_map, List <NiObject> missing_link_stack, NifInfo info)
 {
     base.Write(s, link_map, missing_link_stack, info);
     Nif.NifStream(outerSpotAngle, s, info);
     if (info.version >= 0x14020005)
     {
         Nif.NifStream(innerSpotAngle, s, info);
     }
     Nif.NifStream(exponent, s, info);
 }
Ejemplo n.º 5
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void Read(IStream s, List <uint> link_stack, NifInfo info)
 {
     base.Read(s, link_stack, info);
     Nif.NifStream(out outerSpotAngle, s, info);
     if (info.version >= 0x14020005)
     {
         Nif.NifStream(out innerSpotAngle, s, info);
     }
     Nif.NifStream(out exponent, s, info);
 }
Ejemplo n.º 6
0
/*! NIFLIB_HIDDEN function.  For internal use only. */
        internal override void Write(OStream s, Dictionary <NiObject, uint> link_map, List <NiObject> missing_link_stack, NifInfo info)
        {
            base.Write(s, link_map, missing_link_stack, info);
            numTextures = (int)textures.Count;
            Nif.NifStream(numTextures, s, info);
            for (var i1 = 0; i1 < textures.Count; i1++)
            {
                Nif.NifStream(textures[i1], s, info);
            }
        }
Ejemplo n.º 7
0
/*! NIFLIB_HIDDEN function.  For internal use only. */
        internal override void Read(IStream s, List <uint> link_stack, NifInfo info)
        {
            base.Read(s, link_stack, info);
            Nif.NifStream(out numTextures, s, info);
            textures = new string[numTextures];
            for (var i1 = 0; i1 < textures.Count; i1++)
            {
                Nif.NifStream(out textures[i1], s, info);
            }
        }
Ejemplo n.º 8
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void Write(OStream s, Dictionary <NiObject, uint> link_map, List <NiObject> missing_link_stack, NifInfo info)
 {
     base.Write(s, link_map, missing_link_stack, info);
     numDataLayers = (uint)dataLayers.Count;
     numStripsData = (uint)stripsData.Count;
     if (info.version <= 0x0A000102)
     {
         Nif.NifStream(material.unknownInt, s, info);
     }
     if (info.version <= 0x14000005 && ((info.userVersion2 < 16)))
     {
         Nif.NifStream(material.material_ob, s, info);
     }
     if (((info.version == 0x14020007) && (info.userVersion2 <= 34)))
     {
         Nif.NifStream(material.material_fo, s, info);
     }
     if (((info.version == 0x14020007) && (info.userVersion2 > 34)))
     {
         Nif.NifStream(material.material_sk, s, info);
     }
     Nif.NifStream(radius, s, info);
     for (var i3 = 0; i3 < 5; i3++)
     {
         Nif.NifStream(unused[i3], s, info);
     }
     Nif.NifStream(growBy, s, info);
     if (info.version >= 0x0A010000)
     {
         Nif.NifStream(scale, s, info);
     }
     Nif.NifStream(numStripsData, s, info);
     for (var i3 = 0; i3 < stripsData.Count; i3++)
     {
         WriteRef((NiObject)stripsData[i3], s, info, link_map, missing_link_stack);
     }
     Nif.NifStream(numDataLayers, s, info);
     for (var i3 = 0; i3 < dataLayers.Count; i3++)
     {
         if (info.version <= 0x14000005 && ((info.userVersion2 < 16)))
         {
             Nif.NifStream(dataLayers[i3].layer_ob, s, info);
         }
         if (((info.version == 0x14020007) && (info.userVersion2 <= 34)))
         {
             Nif.NifStream(dataLayers[i3].layer_fo, s, info);
         }
         if (((info.version == 0x14020007) && (info.userVersion2 > 34)))
         {
             Nif.NifStream(dataLayers[i3].layer_sk, s, info);
         }
         Nif.NifStream(dataLayers[i3].flagsAndPartNumber, s, info);
         Nif.NifStream(dataLayers[i3].group, s, info);
     }
 }
/*! NIFLIB_HIDDEN function.  For internal use only. */
        internal override void Write(OStream s, Dictionary <NiObject, uint> link_map, List <NiObject> missing_link_stack, NifInfo info)
        {
            base.Write(s, link_map, missing_link_stack, info);
            numData = (uint)objectData.Count;
            Nif.NifStream(vertexDesc.vf1, s, info);
            Nif.NifStream(vertexDesc.vf2, s, info);
            Nif.NifStream(vertexDesc.vf3, s, info);
            Nif.NifStream(vertexDesc.vf4, s, info);
            Nif.NifStream(vertexDesc.vf5, s, info);
            Nif.NifStream(vertexDesc.vertexAttributes, s, info);
            Nif.NifStream(vertexDesc.vf8, s, info);
            Nif.NifStream(numVertices, s, info);
            Nif.NifStream(numTriangles, s, info);
            Nif.NifStream(unknownFlags1, s, info);
            Nif.NifStream(unknownFlags2, s, info);
            Nif.NifStream(numData, s, info);
            for (var i1 = 0; i1 < objectData.Count; i1++)
            {
                objectData[i1].numCombined = (uint)objectData[i1].combined.Count;
                objectData[i1].numVerts    = (uint)objectData[i1].vertexData.Count;
                Nif.NifStream(objectData[i1].numVerts, s, info);
                Nif.NifStream(objectData[i1].lodLevels, s, info);
                Nif.NifStream(objectData[i1].triCountLod0, s, info);
                Nif.NifStream(objectData[i1].triOffsetLod0, s, info);
                Nif.NifStream(objectData[i1].triCountLod1, s, info);
                Nif.NifStream(objectData[i1].triOffsetLod1, s, info);
                Nif.NifStream(objectData[i1].triCountLod2, s, info);
                Nif.NifStream(objectData[i1].triOffsetLod2, s, info);
                Nif.NifStream(objectData[i1].numCombined, s, info);
                for (var i2 = 0; i2 < objectData[i1].combined.Count; i2++)
                {
                    Nif.NifStream(objectData[i1].combined[i2].grayscaleToPaletteScale, s, info);
                    Nif.NifStream(objectData[i1].combined[i2].transform.rotation, s, info);
                    Nif.NifStream(objectData[i1].combined[i2].transform.translation, s, info);
                    Nif.NifStream(objectData[i1].combined[i2].transform.scale, s, info);
                    Nif.NifStream(objectData[i1].combined[i2].boundingSphere.center, s, info);
                    Nif.NifStream(objectData[i1].combined[i2].boundingSphere.radius, s, info);
                }
                Nif.NifStream(objectData[i1].vertexDesc.vf1, s, info);
                Nif.NifStream(objectData[i1].vertexDesc.vf2, s, info);
                Nif.NifStream(objectData[i1].vertexDesc.vf3, s, info);
                Nif.NifStream(objectData[i1].vertexDesc.vf4, s, info);
                Nif.NifStream(objectData[i1].vertexDesc.vf5, s, info);
                Nif.NifStream(objectData[i1].vertexDesc.vertexAttributes, s, info);
                Nif.NifStream(objectData[i1].vertexDesc.vf8, s, info);
                for (var i2 = 0; i2 < objectData[i1].vertexData.Count; i2++)
                {
                    Nif.NifStream(objectData[i1].vertexData[i2], s, info, objectData[i1].vertexDesc.vertexAttributes);
                }
                for (var i2 = 0; i2 < objectData[i1].triangles.Count; i2++)
                {
                    Nif.NifStream(objectData[i1].triangles[i2], s, info);
                }
            }
        }
Ejemplo n.º 10
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void Write(OStream s, Dictionary <NiObject, uint> link_map, List <NiObject> missing_link_stack, NifInfo info)
 {
     base.Write(s, link_map, missing_link_stack, info);
     numPartitions = (int)partitions.Count;
     Nif.NifStream(numPartitions, s, info);
     for (var i3 = 0; i3 < partitions.Count; i3++)
     {
         Nif.NifStream(partitions[i3].partFlag, s, info);
         Nif.NifStream(partitions[i3].bodyPart, s, info);
     }
 }
Ejemplo n.º 11
0
/*! NIFLIB_HIDDEN function.  For internal use only. */
        internal override void Read(IStream s, List <uint> link_stack, NifInfo info)
        {
            uint block_num;

            base.Read(s, link_stack, info);
            if (info.version <= 0x0A010067)
            {
                Nif.NifStream(out block_num, s, info);
                link_stack.Add(block_num);
            }
        }
Ejemplo n.º 12
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void Write(OStream s, Dictionary <NiObject, uint> link_map, List <NiObject> missing_link_stack, NifInfo info)
 {
     base.Write(s, link_map, missing_link_stack, info);
     numParticleSystems = (int)particleSystems.Count;
     Nif.NifStream(maxEmitterObjects, s, info);
     Nif.NifStream(numParticleSystems, s, info);
     for (var i3 = 0; i3 < particleSystems.Count; i3++)
     {
         WriteRef((NiObject)particleSystems[i3], s, info, link_map, missing_link_stack);
     }
 }
Ejemplo n.º 13
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void Read(IStream s, List <uint> link_stack, NifInfo info)
 {
     base.Read(s, link_stack, info);
     Nif.NifStream(out numPartitions, s, info);
     partitions = new BodyPartList[numPartitions];
     for (var i3 = 0; i3 < partitions.Count; i3++)
     {
         Nif.NifStream(out partitions[i3].partFlag, s, info);
         Nif.NifStream(out partitions[i3].bodyPart, s, info);
     }
 }
Ejemplo n.º 14
0
        /*! NIFLIB_HIDDEN function.  For internal use only. */
        internal override void Read(IStream s, List <uint> link_stack, NifInfo info)
        {
            uint block_num;

            base.Read(s, link_stack, info);
            if (info.version <= 0x14000005)
            {
                Nif.NifStream(out numSubShapes, s, info);
                subShapes = new OblivionSubShape[numSubShapes];
                for (var i4 = 0; i4 < subShapes.Count; i4++)
                {
                    if (info.version <= 0x14000005 && ((info.userVersion2 < 16)))
                    {
                        Nif.NifStream(out subShapes[i4].havokFilter.layer_ob, s, info);
                    }
                    if (((info.version == 0x14020007) && (info.userVersion2 <= 34)))
                    {
                        Nif.NifStream(out subShapes[i4].havokFilter.layer_fo, s, info);
                    }
                    if (((info.version == 0x14020007) && (info.userVersion2 > 34)))
                    {
                        Nif.NifStream(out subShapes[i4].havokFilter.layer_sk, s, info);
                    }
                    Nif.NifStream(out subShapes[i4].havokFilter.flagsAndPartNumber, s, info);
                    Nif.NifStream(out subShapes[i4].havokFilter.group, s, info);
                    Nif.NifStream(out subShapes[i4].numVertices, s, info);
                    if (info.version <= 0x0A000102)
                    {
                        Nif.NifStream(out subShapes[i4].material.unknownInt, s, info);
                    }
                    if (info.version <= 0x14000005 && ((info.userVersion2 < 16)))
                    {
                        Nif.NifStream(out subShapes[i4].material.material_ob, s, info);
                    }
                    if (((info.version == 0x14020007) && (info.userVersion2 <= 34)))
                    {
                        Nif.NifStream(out subShapes[i4].material.material_fo, s, info);
                    }
                    if (((info.version == 0x14020007) && (info.userVersion2 > 34)))
                    {
                        Nif.NifStream(out subShapes[i4].material.material_sk, s, info);
                    }
                }
            }
            Nif.NifStream(out userData, s, info);
            Nif.NifStream(out unused1, s, info);
            Nif.NifStream(out radius, s, info);
            Nif.NifStream(out unused2, s, info);
            Nif.NifStream(out scale, s, info);
            Nif.NifStream(out radiusCopy, s, info);
            Nif.NifStream(out scaleCopy, s, info);
            Nif.NifStream(out block_num, s, info);
            link_stack.Add(block_num);
        }
Ejemplo n.º 15
0
/*! NIFLIB_HIDDEN function.  For internal use only. */
        internal override void Write(OStream s, Dictionary <NiObject, uint> link_map, List <NiObject> missing_link_stack, NifInfo info)
        {
            base.Write(s, link_map, missing_link_stack, info);
            Nif.NifStream(shaderMap, s, info);
            Nif.NifStream(textureSlot, s, info);
            Nif.NifStream(operation, s, info);
            if (info.version <= 0x0A010067)
            {
                WriteRef((NiObject)data, s, info, link_map, missing_link_stack);
            }
        }
Ejemplo n.º 16
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void Write(OStream s, Dictionary <NiObject, uint> link_map, List <NiObject> missing_link_stack, NifInfo info)
 {
     base.Write(s, link_map, missing_link_stack, info);
     numVertices = (ushort)weight.Count;
     Nif.NifStream(numBytes, s, info);
     Nif.NifStream(numVertices, s, info);
     for (var i3 = 0; i3 < weight.Count; i3++)
     {
         Nif.NifStream(weight[i3], s, info);
     }
 }
Ejemplo n.º 17
0
/*! NIFLIB_HIDDEN function.  For internal use only. */
        internal override void Read(IStream s, List <uint> link_stack, NifInfo info)
        {
            base.Read(s, link_stack, info);
            Nif.NifStream(out bonelodCount, s, info);
            bonelodInfo = new BoneLOD[bonelodCount];
            for (var i1 = 0; i1 < bonelodInfo.Count; i1++)
            {
                Nif.NifStream(out bonelodInfo[i1].distance, s, info);
                Nif.NifStream(out bonelodInfo[i1].boneName, s, info);
            }
        }
Ejemplo n.º 18
0
/*! NIFLIB_HIDDEN function.  For internal use only. */
        internal override void Write(OStream s, Dictionary <NiObject, uint> link_map, List <NiObject> missing_link_stack, NifInfo info)
        {
            base.Write(s, link_map, missing_link_stack, info);
            Nif.NifStream(gravityAxis, s, info);
            Nif.NifStream(decay, s, info);
            Nif.NifStream(strength, s, info);
            Nif.NifStream(forceType, s, info);
            Nif.NifStream(turbulence, s, info);
            Nif.NifStream(turbulenceScale, s, info);
            WriteRef((NiObject)gravityObject, s, info, link_map, missing_link_stack);
        }
Ejemplo n.º 19
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void Write(OStream s, Dictionary <NiObject, uint> link_map, List <NiObject> missing_link_stack, NifInfo info)
 {
     base.Write(s, link_map, missing_link_stack, info);
     numNodes = (uint)nodes.Count;
     Nif.NifStream(numNodes, s, info);
     for (var i3 = 0; i3 < nodes.Count; i3++)
     {
         WriteRef((NiObject)nodes[i3], s, info, link_map, missing_link_stack);
     }
     WriteRef((NiObject)modifier, s, info, link_map, missing_link_stack);
 }
Ejemplo n.º 20
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void Write(OStream s, Dictionary <NiObject, uint> link_map, List <NiObject> missing_link_stack, NifInfo info)
 {
     base.Write(s, link_map, missing_link_stack, info);
     Nif.NifStream(flags, s, info);
     Nif.NifStream(bankDir, s, info);
     Nif.NifStream(maxBankAngle, s, info);
     Nif.NifStream(smoothing, s, info);
     Nif.NifStream(followAxis, s, info);
     WriteRef((NiObject)pathData, s, info, link_map, missing_link_stack);
     WriteRef((NiObject)percentData, s, info, link_map, missing_link_stack);
 }
Ejemplo n.º 21
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void Write(OStream s, Dictionary <NiObject, uint> link_map, List <NiObject> missing_link_stack, NifInfo info)
 {
     base.Write(s, link_map, missing_link_stack, info);
     Nif.NifStream(flags, s, info);
     Nif.NifStream(threshold, s, info);
     if (info.version <= 0x02030000)
     {
         Nif.NifStream(unknownShort1, s, info);
         Nif.NifStream(unknownInt2, s, info);
     }
 }
Ejemplo n.º 22
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void Read(IStream s, List <uint> link_stack, NifInfo info)
 {
     base.Read(s, link_stack, info);
     Nif.NifStream(out flags, s, info);
     Nif.NifStream(out threshold, s, info);
     if (info.version <= 0x02030000)
     {
         Nif.NifStream(out unknownShort1, s, info);
         Nif.NifStream(out unknownInt2, s, info);
     }
 }
Ejemplo n.º 23
0
/*! NIFLIB_HIDDEN function.  For internal use only. */
        internal override void Read(IStream s, List <uint> link_stack, NifInfo info)
        {
            base.Read(s, link_stack, info);
            Nif.NifStream(out heirGain, s, info);
            Nif.NifStream(out velGain, s, info);
            if ((info.userVersion2 < 9))
            {
                Nif.NifStream(out unkFloat1, s, info);
                Nif.NifStream(out unkFloat2, s, info);
            }
        }
Ejemplo n.º 24
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void Read(IStream s, List <uint> link_stack, NifInfo info)
 {
     base.Read(s, link_stack, info);
     if ((info.userVersion2 <= 34))
     {
         Nif.NifStream(out shaderType, s, info);
         Nif.NifStream(out shaderFlags, s, info);
         Nif.NifStream(out shaderFlags2, s, info);
         Nif.NifStream(out environmentMapScale, s, info);
     }
 }
Ejemplo n.º 25
0
/*! NIFLIB_HIDDEN function.  For internal use only. */
        internal override void Write(OStream s, Dictionary <NiObject, uint> link_map, List <NiObject> missing_link_stack, NifInfo info)
        {
            base.Write(s, link_map, missing_link_stack, info);
            Nif.NifStream(heirGain, s, info);
            Nif.NifStream(velGain, s, info);
            if ((info.userVersion2 < 9))
            {
                Nif.NifStream(unkFloat1, s, info);
                Nif.NifStream(unkFloat2, s, info);
            }
        }
Ejemplo n.º 26
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void Write(OStream s, Dictionary <NiObject, uint> link_map, List <NiObject> missing_link_stack, NifInfo info)
 {
     base.Write(s, link_map, missing_link_stack, info);
     if ((info.userVersion2 <= 34))
     {
         Nif.NifStream(shaderType, s, info);
         Nif.NifStream(shaderFlags, s, info);
         Nif.NifStream(shaderFlags2, s, info);
         Nif.NifStream(environmentMapScale, s, info);
     }
 }
Ejemplo n.º 27
0
/*! NIFLIB_HIDDEN function.  For internal use only. */
        internal override void Write(OStream s, Dictionary <NiObject, uint> link_map, List <NiObject> missing_link_stack, NifInfo info)
        {
            base.Write(s, link_map, missing_link_stack, info);
            bonelodCount = (uint)bonelodInfo.Count;
            Nif.NifStream(bonelodCount, s, info);
            for (var i1 = 0; i1 < bonelodInfo.Count; i1++)
            {
                Nif.NifStream(bonelodInfo[i1].distance, s, info);
                Nif.NifStream(bonelodInfo[i1].boneName, s, info);
            }
        }
Ejemplo n.º 28
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void Write(OStream s, Dictionary <NiObject, uint> link_map, List <NiObject> missing_link_stack, NifInfo info)
 {
     base.Write(s, link_map, missing_link_stack, info);
     for (var i2 = 0; i2 < lines.Count; i2++)
     {
         {
             bool tmp = lines[i2];
             Nif.NifStream(tmp, s, info);
         }
     }
 }
        /*! NIFLIB_HIDDEN function.  For internal use only. */
        internal override void Read(IStream s, List <uint> link_stack, NifInfo info)
        {
            uint block_num;

            base.Read(s, link_stack, info);
            Nif.NifStream(out block_num, s, info);
            link_stack.Add(block_num);
            Nif.NifStream(out chanceToInherit, s, info);
            Nif.NifStream(out velocityMultiplier, s, info);
            Nif.NifStream(out velocityVariation, s, info);
        }
Ejemplo n.º 30
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void Read(IStream s, List <uint> link_stack, NifInfo info)
 {
     base.Read(s, link_stack, info);
     Nif.NifStream(out numBytes, s, info);
     Nif.NifStream(out numVertices, s, info);
     weight = new float[numVertices];
     for (var i3 = 0; i3 < weight.Count; i3++)
     {
         Nif.NifStream(out weight[i3], s, info);
     }
 }