示例#1
0
 /// <summary>
 /// Reads the data-block from a stream.
 /// </summary>
 public override void Read(ResourceDataReader reader, params object[] parameters)
 {
     // read structure data
     this.Unknown_0h = reader.ReadUInt32();
     this.len1       = reader.ReadUInt32();
     this.len2       = reader.ReadUInt32();
     this.len3       = reader.ReadUInt16();
     this.Unknown_Eh = reader.ReadUInt16();
     this.Data1      = reader.ReadBytes((int)len1);
     this.Data2      = reader.ReadBytes((int)len2);
     this.Data3      = reader.ReadBytes((int)len3);
 }
 /// <summary>
 /// Reads the data-block from a stream.
 /// </summary>
 public override void Read(ResourceDataReader reader, params object[] parameters)
 {
     // read structure data
     this.Unknown_0h = reader.ReadUInt32();
     this.len1 = reader.ReadUInt32();
     this.len2 = reader.ReadUInt32();
     this.len3 = reader.ReadUInt16();
     this.Unknown_Eh = reader.ReadUInt16();
     this.Data1 = reader.ReadBytes((int)len1);
     this.Data2 = reader.ReadBytes((int)len2);
     this.Data3 = reader.ReadBytes((int)len3);
 }
示例#3
0
        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            uint format = Convert.ToUInt32(parameters[0]);
            int  Width  = Convert.ToInt32(parameters[1]);
            int  Height = Convert.ToInt32(parameters[2]);
            int  Levels = Convert.ToInt32(parameters[3]);
            int  Stride = Convert.ToInt32(parameters[4]);

            //Data = new List<byte[]>();
            //int length = Stride * Height;
            //for (int i = 0; i < Levels; i++)
            //{
            //    var buf = reader.ReadBytes(length);
            //    Data.Add(buf);
            //    length /= 4;
            //}

            int fullLength = 0;
            int length     = Stride * Height;

            for (int i = 0; i < Levels; i++)
            {
                fullLength += length;
                length     /= 4;
            }

            FullData = reader.ReadBytes(fullLength);
        }
示例#4
0
        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            int stride = Convert.ToInt32(parameters[0]);
            int count  = Convert.ToInt32(parameters[1]);

            Data = reader.ReadBytes(count * stride);
        }
示例#5
0
        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            // read structure data
            reader.Endianess = RageLib.Data.Endianess.BigEndian;
            this.DataLength = reader.ReadUInt32();
            reader.Endianess = RageLib.Data.Endianess.LittleEndian;

            this.Data = reader.ReadBytes((int)DataLength);
        }
        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            // read structure data
            reader.Endianess = RageLib.Data.Endianess.BigEndian;
            this.DataLength  = reader.ReadUInt32();
            reader.Endianess = RageLib.Data.Endianess.LittleEndian;

            this.Data = reader.ReadBytes((int)DataLength);
        }
示例#7
0
 /// <summary>
 /// Reads the data-block from a stream.
 /// </summary>
 public override void Read(ResourceDataReader reader, params object[] parameters)
 {
     // read structure data
     this.Unknown_0h = reader.ReadUInt32();
     this.DataLength = reader.ReadUInt32();
     this.Unknown_8h = reader.ReadUInt32();
     this.Unknown_Ch = reader.ReadUInt32();
     this.Unknown_10h = reader.ReadUInt32();
     this.Unknown_14h = reader.ReadUInt32();
     this.Unknown_18h = reader.ReadUInt32();
     this.Unknown_1Ch = reader.ReadUInt32();
     this.Data = reader.ReadBytes((int)DataLength);
 }
示例#8
0
 /// <summary>
 /// Reads the data-block from a stream.
 /// </summary>
 public override void Read(ResourceDataReader reader, params object[] parameters)
 {
     // read structure data
     this.Unknown_0h  = reader.ReadUInt32();
     this.DataLength  = reader.ReadUInt32();
     this.Unknown_8h  = reader.ReadUInt32();
     this.Unknown_Ch  = reader.ReadUInt32();
     this.Unknown_10h = reader.ReadUInt32();
     this.Unknown_14h = reader.ReadUInt32();
     this.Unknown_18h = reader.ReadUInt32();
     this.Unknown_1Ch = reader.ReadUInt32();
     this.Data        = reader.ReadBytes((int)DataLength);
 }
示例#9
0
        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            // read structure data
            this.Id         = reader.ReadUInt32();
            this.Unknown_4h = reader.ReadUInt16();
            this.Count      = reader.ReadUInt16();
            this.ChunkSize  = reader.ReadUInt32();
            this.Unknown_Ch = reader.ReadUInt32();
            this.Chunk      = reader.ReadBytes((int)ChunkSize - 16);

            // TODO:    rework this to avoid reading data twice
            //          Design a packed data class maybe?
            UnpackChunk(reader);
        }
示例#10
0
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            ProjectionMatrix = reader.ReadMatrix4x4();
            Id          = reader.ReadUInt32();
            GroupIndex  = reader.ReadUInt16();
            Unknown_46h = reader.ReadUInt16();
            Unknown_48h = reader.ReadUInt16();
            Unknown_4Ah = reader.ReadUInt16();
            ChunkSize   = reader.ReadUInt16();
            Unknown_4Eh = reader.ReadUInt16();
            Unknown_50h = reader.ReadUInt32();
            Unknown_54h = reader.ReadUInt32();
            Unknown_58h = reader.ReadSingle();
            Unknown_5Ch = reader.ReadSingle();
            Unknown_60h = reader.ReadUInt32();
            Unknown_64h = reader.ReadSingle();
            Unknown_68h = reader.ReadUInt32();
            Unknown_6Ch = reader.ReadUInt32();
            Chunk       = reader.ReadBytes(ChunkSize);

            // Skip padding
            reader.ReadBytes((16 - (ChunkSize % 16)) % 16);
        }
示例#11
0
        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            uint format = Convert.ToUInt32(parameters[0]);
            int  Width  = Convert.ToInt32(parameters[1]);
            int  Height = Convert.ToInt32(parameters[2]);
            int  Levels = Convert.ToInt32(parameters[3]);
            int  Stride = Convert.ToInt32(parameters[4]);

            int fullLength = 0;
            int length     = Stride * Height;

            for (int i = 0; i < Levels; i++)
            {
                fullLength += length;
                length     /= 4;
            }

            FullData = reader.ReadBytes(fullLength);
        }
示例#12
0
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            VertexStride = Convert.ToInt32(parameters[0]);
            VertexCount  = Convert.ToInt32(parameters[1]);
            info         = (VertexDeclaration)parameters[2];

            VertexType = (VertexType)info.Flags;

            VertexBytes = reader.ReadBytes(VertexCount * VertexStride);

            switch (info.Types)
            {
            case 8598872888530528662:     //YDR - 0x7755555555996996
                break;

            case 216172782140628998:      //YFT - 0x030000000199A006
                switch (info.Flags)
                {
                case 16473: VertexType = VertexType.PCCH2H4; break;          //  PCCH2H4

                default: break;
                }
                break;

            case 216172782140612614:      //YFT - 0x0300000001996006  PNCH2H4
                switch (info.Flags)
                {
                case 89: VertexType = VertexType.PNCH2; break;             //  PNCH2

                default: break;
                }
                break;

            default:
                break;
            }
        }
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {

            int cnt = Convert.ToInt32(parameters[0]);
            Data = reader.ReadBytes(16 * cnt);


        }
示例#14
0
 /// <summary>
 /// Reads the data-block from a stream.
 /// </summary>
 public override void Read(ResourceDataReader reader, params object[] parameters)
 {
     // read structure data
     this.data = reader.ReadBytes(0x10);
 }
示例#15
0
        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            uint format = Convert.ToUInt32(parameters[0]);
            int Width = Convert.ToInt32(parameters[1]);
            int Height = Convert.ToInt32(parameters[2]);
            int Levels = Convert.ToInt32(parameters[3]);
            int Stride = Convert.ToInt32(parameters[4]);

            //Data = new List<byte[]>();
            //int length = Stride * Height;
            //for (int i = 0; i < Levels; i++)
            //{
            //    var buf = reader.ReadBytes(length);
            //    Data.Add(buf);
            //    length /= 4;
            //}

            int fullLength = 0;
            int length = Stride * Height;
            for (int i = 0; i < Levels; i++)
            {
                fullLength += length;
                length /= 4;
            }

            FullData = reader.ReadBytes(fullLength);
        }
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            int cnt = Convert.ToInt32(parameters[0]);

            Data = reader.ReadBytes(16 * cnt);
        }