Exemple #1
0
 public Ni3dsAnimationNode()
 {
     hasData      = false;
     unknownShort = (ushort)0;
     child        = null;
     count        = (uint)0;
 }
Exemple #2
0
 /*!
  * Sets a new external file texture.  Removes any existing texture references, whether internal or external.
  * \param[in] file_name The file name of the external texture.  Often needs to follow game guidlines to be found.
  */
 public void SetExternalTexture(string file_name)
 {
     useExternal = 1;
     pixelData   = null;
     fileName    = file_name;
     unknownLink = null;
 }
Exemple #3
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void FixLinks(Dictionary <uint, NiObject> objects, List <uint> link_stack, List <NiObject> missing_link_stack, NifInfo info)
 {
     base.FixLinks(objects, link_stack, missing_link_stack, info);
     skin           = FixLink <NiObject>(objects, link_stack, missing_link_stack, info);
     shaderProperty = FixLink <BSShaderProperty>(objects, link_stack, missing_link_stack, info);
     alphaProperty  = FixLink <NiAlphaProperty>(objects, link_stack, missing_link_stack, info);
 }
Exemple #4
0
 public NiEnvMappedTriShape()
 {
     unknown1    = (ushort)0;
     numChildren = (uint)0;
     child2      = null;
     child3      = null;
 }
Exemple #5
0
 public NiGeometry()
 {
     skin           = null;
     data           = null;
     skinInstance   = null;
     shaderProperty = null;
     alphaProperty  = null;
 }
Exemple #6
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void FixLinks(Dictionary <uint, NiObject> objects, List <uint> link_stack, List <NiObject> missing_link_stack, NifInfo info)
 {
     base.FixLinks(objects, link_stack, missing_link_stack, info);
     if (hasData)
     {
         child = FixLink <NiObject>(objects, link_stack, missing_link_stack, info);
     }
 }
 public NiSourceTexture()
 {
     useExternal       = (byte)1;
     unknownLink       = null;
     unknownByte       = (byte)1;
     pixelData         = null;
     isStatic          = (byte)1;
     directRender      = 1;
     persistRenderData = 0;
 }
Exemple #8
0
 public BSTriShape()
 {
     skin             = null;
     shaderProperty   = null;
     alphaProperty    = null;
     numTriangles     = (uint)0;
     numVertices      = (ushort)0;
     dataSize         = (uint)0;
     particleDataSize = (uint)0;
 }
Exemple #9
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void FixLinks(Dictionary <uint, NiObject> objects, List <uint> link_stack, List <NiObject> missing_link_stack, NifInfo info)
 {
     base.FixLinks(objects, link_stack, missing_link_stack, info);
     for (var i3 = 0; i3 < children.Count; i3++)
     {
         children[i3] = FixLink <NiAVObject>(objects, link_stack, missing_link_stack, info);
     }
     child2 = FixLink <NiObject>(objects, link_stack, missing_link_stack, info);
     child3 = FixLink <NiObject>(objects, link_stack, missing_link_stack, info);
 }
Exemple #10
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void FixLinks(Dictionary <uint, NiObject> objects, List <uint> link_stack, List <NiObject> missing_link_stack, NifInfo info)
 {
     base.FixLinks(objects, link_stack, missing_link_stack, info);
     if (info.version >= 0x0A010000)
     {
         if ((useExternal == 1))
         {
             unknownLink = FixLink <NiObject>(objects, link_stack, missing_link_stack, info);
         }
     }
     if ((useExternal == 0))
     {
         pixelData = FixLink <NiPixelFormat>(objects, link_stack, missing_link_stack, info);
     }
 }
Exemple #11
0
 /*! NIFLIB_HIDDEN function.  For internal use only. */
 internal override void FixLinks(Dictionary <uint, NiObject> objects, List <uint> link_stack, List <NiObject> missing_link_stack, NifInfo info)
 {
     base.FixLinks(objects, link_stack, missing_link_stack, info);
     emitter = FixLink <NiObject>(objects, link_stack, missing_link_stack, info);
     if (info.version <= 0x03010000)
     {
         particleLink = FixLink <NiObject>(objects, link_stack, missing_link_stack, info);
     }
     if (info.version >= 0x04000002)
     {
         unknownLink = FixLink <NiObject>(objects, link_stack, missing_link_stack, info);
     }
     particleExtra = FixLink <NiParticleModifier>(objects, link_stack, missing_link_stack, info);
     unknownLink2  = FixLink <NiObject>(objects, link_stack, missing_link_stack, info);
     if (info.version <= 0x03010000)
     {
         colorData = FixLink <NiColorData>(objects, link_stack, missing_link_stack, info);
     }
 }
Exemple #12
0
/*! NIFLIB_HIDDEN function.  For internal use only. */
        internal override void FixLinks(Dictionary <uint, NiObject> objects, List <uint> link_stack, List <NiObject> missing_link_stack, NifInfo info)
        {
            base.FixLinks(objects, link_stack, missing_link_stack, info);
            if ((info.userVersion2 >= 100))
            {
                if (IsDerivedType(NiParticleSystem.TYPE))
                {
                    skin = FixLink <NiObject>(objects, link_stack, missing_link_stack, info);
                }
            }
            if ((info.userVersion2 < 100))
            {
                data = FixLink <NiGeometryData>(objects, link_stack, missing_link_stack, info);
            }
            if ((info.userVersion2 >= 100))
            {
                if ((!IsDerivedType(NiParticleSystem.TYPE)))
                {
                    data = FixLink <NiGeometryData>(objects, link_stack, missing_link_stack, info);
                }
            }
            if ((info.version >= 0x0303000D) && ((info.userVersion2 < 100)))
            {
                skinInstance = FixLink <NiSkinInstance>(objects, link_stack, missing_link_stack, info);
            }
            if ((info.userVersion2 >= 100))
            {
                if ((!IsDerivedType(NiParticleSystem.TYPE)))
                {
                    skinInstance = FixLink <NiSkinInstance>(objects, link_stack, missing_link_stack, info);
                }
            }
            if ((info.version >= 0x14020007) && (info.userVersion == 12))
            {
                shaderProperty = FixLink <BSShaderProperty>(objects, link_stack, missing_link_stack, info);
                alphaProperty  = FixLink <NiAlphaProperty>(objects, link_stack, missing_link_stack, info);
            }
        }
Exemple #13
0
 public NiParticleSystemController()
 {
     oldSpeed            = (uint)0;
     speed               = 0.0f;
     speedRandom         = 0.0f;
     verticalDirection   = 0.0f;
     verticalAngle       = 0.0f;
     horizontalDirection = 0.0f;
     horizontalAngle     = 0.0f;
     size                 = 0.0f;
     emitStartTime        = 0.0f;
     emitStopTime         = 0.0f;
     unknownByte          = (byte)0;
     oldEmitRate          = (uint)0;
     emitRate             = 0.0f;
     lifetime             = 0.0f;
     lifetimeRandom       = 0.0f;
     emitFlags            = (ushort)0;
     emitter              = null;
     unknownShort2_       = (ushort)0;
     unknownFloat13_      = 0.0f;
     unknownInt1_         = (uint)0;
     unknownInt2_         = (uint)0;
     unknownShort3_       = (ushort)0;
     particleLifetime     = 0.0f;
     particleLink         = null;
     particleTimestamp    = (uint)0;
     particleUnknownShort = (ushort)0;
     particleVertexId     = (ushort)0;
     numParticles         = (ushort)0;
     numValid             = (ushort)0;
     unknownLink          = null;
     particleExtra        = null;
     unknownLink2         = null;
     trailer              = (byte)0;
     colorData            = null;
     unknownFloat1        = 0.0f;
 }
Exemple #14
0
        /// <summary>
        /// Reads the ni objects.
        /// </summary>
        /// <param name="reader">The reader.</param>
        /// <exception cref="Exception">
        /// Check value is not zero! Invalid file?
        /// or
        /// Invalid object type string length!
        /// </exception>
        /// <exception cref="NotImplementedException"></exception>
        private void ReadNiObjects(BinaryReader reader)
        {
            this.ObjectsByRef = new Dictionary <uint, NiObject>();
            int    num = 0;
            string text;

            while (true)
            {
                if (this.Version >= eNifVersion.VER_5_0_0_1)
                {
                    if (this.Version <= eNifVersion.VER_10_1_0_106 && reader.ReadUInt32() != 0u)
                    {
                        break;
                    }
                    text = this.Header.BlockTypes[(int)this.Header.BlockTypeIndex[num]].Value;
                }
                else
                {
                    uint num2 = reader.ReadUInt32();
                    if (num2 > 30u || num2 < 6u)
                    {
                        goto IL_74;
                    }
                    text = new string(reader.ReadChars((int)num2));
                    if (this.Header.Version < eNifVersion.VER_3_3_0_13)
                    {
                        if (text == "Top Level Object")
                        {
                            continue;
                        }
                        if (text == "End Of File")
                        {
                            return;
                        }
                    }
                }
                uint key;
                if (this.Version < eNifVersion.VER_3_3_0_13)
                {
                    key = reader.ReadUInt32();
                }
                else
                {
                    key = (uint)num;
                }
                Type expr_E7 = Type.GetType("Niflib." + text);
                if (expr_E7 == null)
                {
                    goto Block_8;
                }
                NiObject value = (NiObject)Activator.CreateInstance(expr_E7, new object[]
                {
                    this,
                    reader
                });
                this.ObjectsByRef.Add(key, value);
                if (this.Version >= eNifVersion.VER_3_3_0_13)
                {
                    num++;
                    if ((long)num >= (long)((ulong)this.Header.NumBlocks))
                    {
                        return;
                    }
                }
            }
            throw new Exception("Check value is not zero! Invalid file?");
IL_74:
            throw new Exception("Invalid object type string length!");
Block_8:
            throw new NotImplementedException(text);
        }
Exemple #15
0
 public Ni3dsAlphaAnimator()
 {
     parent = null;
     num1   = (uint)0;
     num2   = (uint)0;
 }