Exemple #1
0
        public TexLayer(BinaryReader br)
        {
            Size = br.ReadUInt32();

            BlendMode          = (MDLTexOp)br.ReadInt32();
            Flags              = (MDLGeo)br.ReadUInt32();
            TextureId          = br.ReadInt32();
            TextureAnimationId = br.ReadInt32();
            CoordId            = br.ReadInt32();
            Alpha              = br.ReadSingle();

            while (true)
            {
                string token = br.ReadString(4);
                br.BaseStream.Position -= 4;
                switch (token)
                {
                case "KMTA": AlphaKeys = new MDXTrack <float>(br); break;

                case "KMTF": FlipKeys = new MDXSimpleTrack(br); break;

                default: return;
                }
            }
        }
        public EVTS(BinaryReader br)
        {
            Size = br.ReadUInt32();
            Load(br);

            while (true)
            {
                string token = br.ReadString(4);
                br.BaseStream.Position -= 4;
                switch (token)
                {
                case "KEVT": EventKeys = new MDXSimpleTrack(br); break;

                default: return;
                }
            }
        }
Exemple #3
0
        public RIBB(BinaryReader br)
        {
            Size = br.ReadUInt32();
            Load(br);

            EmitterSize    = br.ReadUInt32();
            HeightAbove    = br.ReadSingle();
            HeightBelow    = br.ReadSingle();
            Alpha          = br.ReadSingle();
            Color          = br.ReadStruct <CBGR>();
            EdgeLifetime   = br.ReadSingle();
            TextureSlot    = br.ReadUInt32();
            EdgesPerSecond = br.ReadUInt32();
            TextureRows    = br.ReadUInt32();
            TextureColumns = br.ReadUInt32();
            MaterialId     = br.ReadUInt32();
            Gravity        = br.ReadSingle();

            while (true)
            {
                string token = br.ReadString(4);
                br.BaseStream.Position -= 4;
                switch (token)
                {
                case "KRHA": HeightAboveKeys = new MDXTrack <float>(br); break;

                case "KRHB": HeightBelowKeys = new MDXTrack <float>(br); break;

                case "KRAL": AlphaKeys = new MDXTrack <float>(br); break;

                case "KVIS": VisibilityKeys = new MDXTrack <float>(br); break;

                case "KRCO": ColorKeys = new MDXTrack <CBGR>(br); break;

                case "KRTX": TextureSlotKeys = new MDXSimpleTrack(br); break;

                default: return;
                }
            }
        }