public virtual void Write(EndianBinaryWriter er, CGFXWriterContext c)
 {
     er.Write(Type);
     er.Write(Signature, Encoding.ASCII, false);
     er.Write(Revision);
     c.WriteStringReference(Name, er);
     er.Write(Unknown2);
     er.Write(Unknown3);
 }
 public override void Write(EndianBinaryWriter er, CGFXWriterContext c)
 {
     base.Write(er, c);
     c.WriteStringReference(LinkedTextureName, er);
     if (LinkedTextureOffset == 0)
     {
         er.Write((uint)0);
     }
     else
     {
         er.Write((uint)0);             //TODO!
     }
 }
Beispiel #3
0
 public void Write(EndianBinaryWriter er, CGFXWriterContext c)
 {
     er.Write(RefBit);
     er.Write(LeftIndex);
     er.Write(RightIndex);
     if (Name != null)
     {
         c.WriteStringReference(Name, er);
     }
     else
     {
         er.Write((uint)0);
     }
     er.Write((uint)0);
 }
Beispiel #4
0
 public virtual void Write(EndianBinaryWriter er, CGFXWriterContext c)
 {
     er.Write(Type);
     er.Write(Signature, Encoding.ASCII, false);
     er.Write(Revision);
     c.WriteStringReference(Name, er);
     er.Write(Unknown2);
     er.Write(Unknown3);
 }
Beispiel #5
0
 public override void Write(EndianBinaryWriter er, CGFXWriterContext c)
 {
     base.Write(er, c);
     c.WriteStringReference(LinkedTextureName, er);
     if (LinkedTextureOffset == 0) er.Write((uint)0);
     else er.Write((uint)0);//TODO!
 }
Beispiel #6
0
 public override void Write(EndianBinaryWriter er, CGFXWriterContext c)
 {
     base.Write(er, c);
     c.WriteStringReference(BoneName, er);
     er.Write(ObjectType);
 }
Beispiel #7
0
 public void Write(EndianBinaryWriter er, CGFXWriterContext c)
 {
     er.Write(RefBit);
     er.Write(LeftIndex);
     er.Write(RightIndex);
     if (Name != null) c.WriteStringReference(Name, er);
     else er.Write((uint)0);
     er.Write((uint)0);
 }
Beispiel #8
0
            public void Write(EndianBinaryWriter er, CGFXWriterContext c)
            {
                er.Write(Type);
                er.Write((uint)Flags);
                c.WriteStringReference(Name, er);
                er.Write((uint)MemberType);

                er.Write(NrMembers);
                long mbrinfdictoffs = er.BaseStream.Position;
                er.Write((uint)0);

                er.Write(NrBlendOperations);
                long blndopoffs = er.BaseStream.Position;
                er.Write((uint)0);

                er.Write((uint)EvaluationTiming);

                long curpos = er.BaseStream.Position;
                er.BaseStream.Position = blndopoffs;
                er.Write((uint)(curpos - blndopoffs));
                er.BaseStream.Position = curpos;
                er.Write(BlendOperations, 0, BlendOperations.Length);

                long mbrinfodict = curpos = er.BaseStream.Position;
                er.BaseStream.Position = mbrinfdictoffs;
                er.Write((uint)(curpos - mbrinfdictoffs));
                er.BaseStream.Position = curpos;
                MemberInfoDICT.Write(er, c);

                for (int i = 0; i < AnimationGroupMembers.Length; i++)
                {
                    curpos = er.BaseStream.Position;
                    long bpos = er.BaseStream.Position = mbrinfodict + 0x1C + i * 0x10 + 0xC;
                    er.Write((uint)(curpos - bpos));
                    er.BaseStream.Position = curpos;
                    AnimationGroupMembers[i].Write(er, c);
                }
            }
Beispiel #9
0
 public virtual void Write(EndianBinaryWriter er, CGFXWriterContext c)
 {
     er.Write((uint)Type);
     c.WriteStringReference(Path, er);
     er.Write(MemberOffset);
     er.Write(BlendOperationIndex);
     er.Write(ObjectType);
     er.Write(MemberType);
     er.Write(ResMaterialPtr);
 }
Beispiel #10
0
            public void Write(EndianBinaryWriter er, CGFXWriterContext c)
            {
                er.Write(Type);
                er.Write(Signature, Encoding.ASCII, false);
                er.Write(Revision);
                c.WriteStringReference(Name, er);
                er.Write(Unknown2);
                er.Write(Unknown3);
                er.Write((uint)Flags);
                long bboffs = er.BaseStream.Position;
                er.Write((uint)0);
                er.WriteVector3(PositionOffset);
                er.Write(NrPrimitiveSets);
                long primsetoffsarrayoffs = er.BaseStream.Position;
                er.Write((uint)0);
                er.Write(BaseAddress);
                er.Write(NrVertexAttributes);
                long vtxattroffsarrayoffs = er.BaseStream.Position;
                er.Write((uint)0);
                long blendshapeoffs = er.BaseStream.Position;
                er.Write((uint)0);

                long primsetoffsarray = er.BaseStream.Position;
                er.BaseStream.Position = primsetoffsarrayoffs;
                er.Write((uint)(primsetoffsarray - primsetoffsarrayoffs));
                er.BaseStream.Position = primsetoffsarray;
                er.Write(new uint[NrPrimitiveSets], 0, (int)NrPrimitiveSets);

                long vtxattroffsarray = er.BaseStream.Position;
                er.BaseStream.Position = vtxattroffsarrayoffs;
                er.Write((uint)(vtxattroffsarray - vtxattroffsarrayoffs));
                er.BaseStream.Position = vtxattroffsarray;
                er.Write(new uint[NrVertexAttributes], 0, (int)NrVertexAttributes);

                long curpos = er.BaseStream.Position;
                er.BaseStream.Position = bboffs;
                er.Write((uint)(curpos - bboffs));
                er.BaseStream.Position = curpos;
                BoundingBox.Write(er);

                for (int i = 0; i < NrPrimitiveSets; i++)
                {
                    curpos = er.BaseStream.Position;
                    er.BaseStream.Position = primsetoffsarray + 4 * i;
                    er.Write((uint)(curpos - (primsetoffsarray + 4 * i)));
                    er.BaseStream.Position = curpos;
                    PrimitiveSets[i].Write(er, c);
                }

                for (int i = 0; i < NrVertexAttributes; i++)
                {
                    curpos = er.BaseStream.Position;
                    er.BaseStream.Position = vtxattroffsarray + 4 * i;
                    er.Write((uint)(curpos - (vtxattroffsarray + 4 * i)));
                    er.BaseStream.Position = curpos;
                    VertexAttributes[i].Write(er, c);
                }

                if (BlendShape != null)
                {
                    curpos = er.BaseStream.Position;
                    er.BaseStream.Position = blendshapeoffs;
                    er.Write((uint)(curpos - blendshapeoffs));
                    er.BaseStream.Position = curpos;
                    BlendShape.Write(er);
                }
            }
Beispiel #11
0
        public void Write(EndianBinaryWriter er, CGFXWriterContext c)
        {
            long basepos = er.BaseStream.Position;
            er.Write(Type);
            er.Write(Signature, Encoding.ASCII, false);
            er.Write(Revision);
            c.WriteStringReference(Name, er);
            er.Write(Unknown2);
            er.Write(Unknown3);
            er.Write(Flags);
            er.Write((uint)(IsBranchVisible ? 1 : 0));
            er.Write(NrChildren);
            er.Write(Unknown7);
            er.Write(NrAnimationGroupDescriptions);
            long anmgrpdescdictoffs = er.BaseStream.Position;
            er.Write((uint)0);
            er.WriteVector3(Scale);
            er.WriteVector3(Rotation);
            er.WriteVector3(Translation);
            er.Write(LocalMatrix, 0, 4 * 3);
            er.Write(WorldMatrix, 0, 4 * 3);

            er.Write(NrMeshes);
            long mshoffsoffs = er.BaseStream.Position;
            er.Write((uint)0);

            er.Write(NrMaterials);
            long matdictoffs = er.BaseStream.Position;
            er.Write((uint)0);

            er.Write(NrShapes);
            long shpoffsoffs = er.BaseStream.Position;
            er.Write((uint)0);

            er.Write(NrMeshNodes);
            long mshnodedictoffs = er.BaseStream.Position;
            er.Write((uint)0);

            er.Write(Unknown23);
            er.Write(Unknown24);
            er.Write(Unknown25);

            long skeletonoffs = er.BaseStream.Position;
            if (Skeleton != null) er.Write((uint)0);

            //seems to be padded to 8 bytes
            while ((er.BaseStream.Position % 8) != 0) er.Write((byte)0);

            long meshoffs = er.BaseStream.Position;
            er.BaseStream.Position = mshoffsoffs;
            er.Write((uint)(meshoffs - mshoffsoffs));
            er.BaseStream.Position = meshoffs;
            er.Write(new uint[NrMeshes], 0, (int)NrMeshes);

            long shpoffs = er.BaseStream.Position;
            er.BaseStream.Position = shpoffsoffs;
            er.Write((uint)(shpoffs - shpoffsoffs));
            er.BaseStream.Position = shpoffs;
            er.Write(new uint[NrShapes], 0, (int)NrShapes);

            long anmgrpdict = er.BaseStream.Position;
            if (NrAnimationGroupDescriptions != 0 && AnimationInfoDict != null)
            {
                er.BaseStream.Position = anmgrpdescdictoffs;
                er.Write((uint)(anmgrpdict - anmgrpdescdictoffs));
                er.BaseStream.Position = anmgrpdict;
                AnimationInfoDict.Write(er, c);
            }

            long matdict = er.BaseStream.Position;
            if (NrMaterials != 0 && MaterialsDict != null)
            {
                er.BaseStream.Position = matdictoffs;
                er.Write((uint)(matdict - matdictoffs));
                er.BaseStream.Position = matdict;
                MaterialsDict.Write(er, c);
            }

            long mshnoddict = er.BaseStream.Position;
            if (NrMeshNodes != 0 && MeshNodeVisibilitiesDict != null)
            {
                er.BaseStream.Position = mshnodedictoffs;
                er.Write((uint)(mshnoddict - mshnodedictoffs));
                er.BaseStream.Position = mshnoddict;
                MeshNodeVisibilitiesDict.Write(er, c);
            }

            for (int i = 0; i < NrAnimationGroupDescriptions; i++)
            {
                long curpos = er.BaseStream.Position;
                long bpos = er.BaseStream.Position = anmgrpdict + 0x1C + i * 0x10 + 0xC;
                er.Write((uint)(curpos - bpos));
                er.BaseStream.Position = curpos;
                AnimationGroupDescriptions[i].Write(er, c);
            }

            for (int i = 0; i < NrMeshes; i++)
            {
                while ((er.BaseStream.Position % 8) != 0) er.Write((byte)0);
                long curpos = er.BaseStream.Position;
                long bpos = er.BaseStream.Position = meshoffs + i * 4;
                er.Write((uint)(curpos - bpos));
                er.BaseStream.Position = curpos;
                Meshes[i].Write(er, c, basepos);
            }

            for (int i = 0; i < NrMaterials; i++)
            {
                long curpos = er.BaseStream.Position;
                long bpos = er.BaseStream.Position = matdict + 0x1C + i * 0x10 + 0xC;
                er.Write((uint)(curpos - bpos));
                er.BaseStream.Position = curpos;
                Materials[i].Write(er, c);
            }

            for (int i = 0; i < NrShapes; i++)
            {
                long curpos = er.BaseStream.Position;
                long bpos = er.BaseStream.Position = shpoffs + i * 4;
                er.Write((uint)(curpos - bpos));
                er.BaseStream.Position = curpos;
                Shapes[i].Write(er, c);
            }

            for (int i = 0; i < NrMeshNodes; i++)
            {
                long curpos = er.BaseStream.Position;
                long bpos = er.BaseStream.Position = mshnoddict + 0x1C + i * 0x10 + 0xC;
                er.Write((uint)(curpos - bpos));
                er.BaseStream.Position = curpos;
                MeshNodeVisibilities[i].Write(er, c);
            }

            if (Skeleton != null)
            {
                throw new NotImplementedException();
                long curpos = er.BaseStream.Position;
                er.BaseStream.Position = skeletonoffs;
                er.Write((uint)(curpos - skeletonoffs));
                er.BaseStream.Position = curpos;
                //Skeleton.Write(er, c);
            }

            //Mesh
            //Shape
            //animgroupdesc dict
            //materials dict
            //MeshNodeVisibilities Dict

            //animgroupdesc dict entries
            //mesh entries
            //material dict entries
            //shape entries
            //MeshNodeVisibilities Dict entries

            //skeleton
        }
Beispiel #12
0
 public void Write(EndianBinaryWriter er, CGFXWriterContext c)
 {
     er.Write(Type);
     c.WriteStringReference(BinaryPath, er);
     c.WriteStringReference(TableName, er);
     er.Write((uint)0);//TargetLUTOffset
 }
Beispiel #13
0
            public void Write(EndianBinaryWriter er, CGFXWriterContext c)
            {
                er.Write(Type);
                er.Write(Signature, Encoding.ASCII, false);
                er.Write(Revision);
                c.WriteStringReference(Name, er);
                er.Write(Unknown2);
                er.Write(Unknown3);
                er.Write((uint)Flags);
                er.Write(TexCoordConfig);
                er.Write(TranslucencyKind);
                MaterialColor.Write(er);
                Rasterization.Write(er);
                FragmentOperation.Write(er);
                er.Write(NrActiveTextureCoordiators);
                for (int i = 0; i < 3; i++)
                {
                    TextureCoordiators[i].Write(er);
                }
                long offs = er.BaseStream.Position;
                er.Write((uint)0);//tex0
                er.Write((uint)0);//tex1
                er.Write((uint)0);//tex2
                er.Write((uint)0);//proctex
                er.Write((uint)0);//shader
                er.Write((uint)0);//fragshader
                er.Write(ShaderProgramDescriptionIndex);
                er.Write(NrShaderParameters);
                er.Write((uint)0);//ShaderParametersOffsetArrayOffset
                er.Write(LightSetIndex);
                er.Write(FogIndex);
                er.Write(CGFXWriterContext.CalcHash(BitConverter.GetBytes((uint)((uint)Flags | 0x20))));//ShadingParameterHash
                byte[] result = new byte[NrShaderParameters * 4];
                //TODO: Read the shaderparameters, and put in array for hash
                er.Write(CGFXWriterContext.CalcHash(result));//ShaderParametersHash;

                List<byte> lresult;/* = new List<byte>();
                lresult.AddRange(BitConverter.GetBytes(TexCoordConfig));
                for (int i = 0; i < /*3/NrActiveTextureCoordiators; i++)
                {
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].SourceCoordinate));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].MappingMethod));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].ReferenceCamera));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].MatrixMode));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].Scale.X));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].Scale.Y));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].Rotate));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].Translate.X));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].Translate.Y));
                    lresult.AddRange(BitConverter.GetBytes(false));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].Matrix[0]));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].Matrix[1]));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].Matrix[2]));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].Matrix[3]));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].Matrix[4]));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].Matrix[5]));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].Matrix[6]));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].Matrix[7]));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].Matrix[8]));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].Matrix[9]));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].Matrix[10]));
                    lresult.AddRange(BitConverter.GetBytes(TextureCoordiators[i].Matrix[11]));
                    lresult.AddRange(BitConverter.GetBytes(TexCoordConfig));
                }*/
                er.Write((uint)0);//TextureCoordinatorsHash;

                lresult = new List<byte>();
                lresult.AddRange(BitConverter.GetBytes(TexCoordConfig));
                if (Tex0 != null && Tex0.Sampler is TexInfo.StandardTextureSamplerCtr)
                {
                    var v = Tex0.Sampler as TexInfo.StandardTextureSamplerCtr;
                    lresult.AddRange(BitConverter.GetBytes(v.BorderColor.X));
                    lresult.AddRange(BitConverter.GetBytes(v.BorderColor.Y));
                    lresult.AddRange(BitConverter.GetBytes(v.BorderColor.Z));
                    lresult.AddRange(BitConverter.GetBytes(v.BorderColor.W));
                    lresult.AddRange(BitConverter.GetBytes(WrapMapper[(Tex0.Unknown12 >> 12) & 0xF]));
                    lresult.AddRange(BitConverter.GetBytes(WrapMapper[(Tex0.Unknown12 >> 8) & 0xF]));
                    lresult.AddRange(BitConverter.GetBytes(0f));
                    lresult.AddRange(BitConverter.GetBytes(v.LodBias));
                    lresult.AddRange(BitConverter.GetBytes(v.MinFilter));
                    lresult.AddRange(BitConverter.GetBytes((uint)1));
                }
                if (Tex1 != null && Tex1.Sampler is TexInfo.StandardTextureSamplerCtr)
                {
                    var v = Tex1.Sampler as TexInfo.StandardTextureSamplerCtr;
                    lresult.AddRange(BitConverter.GetBytes(v.BorderColor.X));
                    lresult.AddRange(BitConverter.GetBytes(v.BorderColor.Y));
                    lresult.AddRange(BitConverter.GetBytes(v.BorderColor.Z));
                    lresult.AddRange(BitConverter.GetBytes(v.BorderColor.W));
                    lresult.AddRange(BitConverter.GetBytes(WrapMapper[(Tex1.Unknown12 >> 12) & 0xF]));
                    lresult.AddRange(BitConverter.GetBytes(WrapMapper[(Tex1.Unknown12 >> 8) & 0xF]));
                    lresult.AddRange(BitConverter.GetBytes(0f));
                    lresult.AddRange(BitConverter.GetBytes(v.LodBias));
                    lresult.AddRange(BitConverter.GetBytes(v.MinFilter));
                    lresult.AddRange(BitConverter.GetBytes((uint)1));
                }
                if (Tex2 != null && Tex2.Sampler is TexInfo.StandardTextureSamplerCtr)
                {
                    var v = Tex2.Sampler as TexInfo.StandardTextureSamplerCtr;
                    lresult.AddRange(BitConverter.GetBytes(v.BorderColor.X));
                    lresult.AddRange(BitConverter.GetBytes(v.BorderColor.Y));
                    lresult.AddRange(BitConverter.GetBytes(v.BorderColor.Z));
                    lresult.AddRange(BitConverter.GetBytes(v.BorderColor.W));
                    lresult.AddRange(BitConverter.GetBytes(WrapMapper[(Tex2.Unknown12 >> 12) & 0xF]));
                    lresult.AddRange(BitConverter.GetBytes(WrapMapper[(Tex2.Unknown12 >> 8) & 0xF]));
                    lresult.AddRange(BitConverter.GetBytes(0f));
                    lresult.AddRange(BitConverter.GetBytes(v.LodBias));
                    lresult.AddRange(BitConverter.GetBytes(v.MinFilter));
                    lresult.AddRange(BitConverter.GetBytes((uint)1));
                }
                er.Write(CGFXWriterContext.CalcHash(lresult.ToArray()));//TextureSamplersHash;
                er.Write((uint)0);
                er.Write(MaterialColor.GetHash());
                er.Write(Rasterization.GetHash());
                lresult = new List<byte>();
                lresult.AddRange(BitConverter.GetBytes((uint)FragShader.FragmentLighting.Flags));
                lresult.AddRange(BitConverter.GetBytes(FragShader.FragmentLighting.LayerConfig));
                lresult.AddRange(BitConverter.GetBytes(FragShader.FragmentLighting.FresnelConfig));
                lresult.AddRange(BitConverter.GetBytes(FragShader.FragmentLighting.BumpTextureIndex));
                lresult.AddRange(BitConverter.GetBytes(FragShader.FragmentLighting.BumpMode));
                lresult.AddRange(BitConverter.GetBytes(FragShader.FragmentLighting.IsBumpRenormalize));
                //lresult.AddRange(BitConverter.GetBytes((Flags & MaterialFlags.FragmentLightEnabled) != 0));
                er.Write(CGFXWriterContext.CalcHash(lresult.ToArray()));//FragmentLightingHash;
                er.Write((uint)0);
                er.Write(FragShader.FragmentLightingTable.GetHash());//FragmentLightingTableParametersHash;
                /*lresult = new List<byte>();
                lresult.AddRange(BitConverter.GetBytes(FragShader.BufferColor.X));
                lresult.AddRange(BitConverter.GetBytes(FragShader.BufferColor.Y));
                lresult.AddRange(BitConverter.GetBytes(FragShader.BufferColor.Z));
                lresult.AddRange(BitConverter.GetBytes(FragShader.BufferColor.W));
                for (int i = 0; i < 6; i++)
                {
                    lresult.AddRange(BitConverter.GetBytes(FragShader.TextureCombiners[i].Constant));
                    lresult.AddRange(BitConverter.GetBytes(TexCombSrcMapper[FragShader.TextureCombiners[i].ScaleRgb & 0xF]));
                    lresult.AddRange(BitConverter.GetBytes(TexCombSrcMapper[(FragShader.TextureCombiners[i].ScaleRgb >> 4) & 0xF]));
                    lresult.AddRange(BitConverter.GetBytes(TexCombSrcMapper[(FragShader.TextureCombiners[i].ScaleRgb >> 8) & 0xF]));
                }*/
                er.Write((uint)0);//TextureCombinersHash;
                er.Write(FragShader.AlphaTest.GetHash());//AlphaTestHash;
                er.Write(FragmentOperation.GetHash());//FragmentOperationHash;
                er.Write(MaterialId);
                if (Tex0 != null)
                {
                    long curpos = er.BaseStream.Position;
                    er.BaseStream.Position = offs + 0;
                    er.Write((uint)(curpos - (offs + 0)));
                    er.BaseStream.Position = curpos;
                    Tex0.Write(er, c);
                }
                if (Tex1 != null)
                {
                    long curpos = er.BaseStream.Position;
                    er.BaseStream.Position = offs + 4;
                    er.Write((uint)(curpos - (offs + 4)));
                    er.BaseStream.Position = curpos;
                    Tex1.Write(er, c);
                }
                if (Tex2 != null)
                {
                    long curpos = er.BaseStream.Position;
                    er.BaseStream.Position = offs + 8;
                    er.Write((uint)(curpos - (offs + 8)));
                    er.BaseStream.Position = curpos;
                    Tex2.Write(er, c);
                }
                if (ProcTex != null)
                {
                    long curpos = er.BaseStream.Position;
                    er.BaseStream.Position = offs + 12;
                    er.Write((uint)(curpos - (offs + 12)));
                    er.BaseStream.Position = curpos;
                    //currently unsupported!
                    //ProcTex.Write(er, c);
                }
                if (Shader != null)
                {
                    long curpos = er.BaseStream.Position;
                    er.BaseStream.Position = offs + 16;
                    er.Write((uint)(curpos - (offs + 16)));
                    er.BaseStream.Position = curpos;
                    Shader.Write(er, c);
                }
                if (FragShader != null)
                {
                    long curpos = er.BaseStream.Position;
                    er.BaseStream.Position = offs + 20;
                    er.Write((uint)(curpos - (offs + 20)));
                    er.BaseStream.Position = curpos;
                    FragShader.Write(er, c);
                }
            }
Beispiel #14
0
 public void Write(EndianBinaryWriter er, CGFXWriterContext c)
 {
     c.WriteStringReference(Name, er);
     er.Write((uint)(Visible ? 1 : 0));
 }
Beispiel #15
0
 public void Write(EndianBinaryWriter er, CGFXWriterContext c, long OwnerOffset)
 {
     er.Write(Type);
     er.Write(Signature, Encoding.ASCII, false);
     er.Write(Revision);
     c.WriteStringReference(Name, er);
     er.Write(Unknown2);
     er.Write(Unknown3);
     er.Write(ShapeIndex);
     er.Write(MaterialIndex);
     er.Write((int)(OwnerOffset - er.BaseStream.Position));
     er.Write((byte)(IsVisible ? 1 : 0));
     er.Write(RenderPriority);
     er.Write(MeshNodeVisibilityIndex);
     er.Write(Unknown8);
     er.Write(Unknown9);
     er.Write(Unknown10);
     er.Write(Unknown11);
     er.Write(Unknown12);
     er.Write(Unknown13);
     er.Write(Unknown14);
     er.Write(Unknown15);
     er.Write(Unknown16);
     er.Write(Unknown17);
     er.Write(Unknown18);
     er.Write(Unknown19);
     er.Write(Unknown20);
     er.Write(Unknown21);
     er.Write(Unknown22);
     er.Write(Unknown23);
     er.Write(Unknown24);
     er.Write(Unknown25);
     if (MeshNodeName != null) c.WriteStringReference(MeshNodeName, er);
     else er.Write((uint)0);
     er.Write(Unknown27);
     er.Write(Unknown28);
     er.Write(Unknown29);
     er.Write(Unknown30);
 }
Beispiel #16
0
 public override void Write(EndianBinaryWriter er, CGFXWriterContext c)
 {
     base.Write(er, c);
     c.WriteStringReference(MaterialName, er);
     er.Write(TextureMapperIndex);
 }