Example #1
0
 public override void Read(BinaryReader file, uint size)
 {
     offset.Read(file, 16);
     count.Read(file, 4);
     nullbytes.Read(file, 4);
     groupIdx.Read(file, 4);
 }
        public override void Read(BinaryReader file, uint size)
        {
            CUInt16 count = new CUInt16(cr2w, null, "");

            count.Read(file, size);

            base.Read(file, size, (int)count.val);
        }
Example #3
0
 public override void Read(BinaryReader file, uint size)
 {
     id.Read(file, 2);
     guid.Read(file, 16);
     if (size - 18 > 0)
     {
         unk1.Read(file, size - 18);
     }
 }
Example #4
0
 public override void Read(BinaryReader file, uint size)
 {
     type.Read(file, 1);
     flags.Read(file, 1);
     radius.Read(file, 2);
     offset.Read(file, 8);
     positionX.Read(file, 4);
     positionY.Read(file, 4);
     positionZ.Read(file, 4);
 }
Example #5
0
        public override void Read(BinaryReader file, uint size)
        {
            rotationMatrix.Read(file, 36);
            position.Read(file, (uint)12);
            streamingRadius.Read(file, 2);
            flags.Read(file, 2);
            occlusionSystemID.Read(file, 4);
            resourceIndex.Read(file, 4);

            tail.Read(file, size - 60);
        }
Example #6
0
        public override void Read(BinaryReader file, uint size)
        {
            bytesize.Read(file, 2);

            if ((int)bytesize.val != fixedbuffersize)
            {
                throw new NotImplementedException();
            }

            unk1.Read(file, (uint)bytesize.val - 2);
        }
Example #7
0
            public override void Read(BinaryReader file, uint size)
            {
                valueCount.Read(file, size);

                if (valueCount.val > values.Length)
                {
                    Debug.Print("Read: curve piece value count " + valueCount.val + " exceeds limit " + values.Length);
                }

                for (int i = 0; i < Math.Min(valueCount.val, values.Length); i++)
                {
                    values[i].Read(file, size);
                }
            }
Example #8
0
        public override void Read(BinaryReader file, uint size)
        {
            base.Read(file, size);

            texturecachekey.Read(file, 4);
            residentmip.Read(file, 2);
            encodedformat.Read(file, 2);
            edge.Read(file, 2);
            mipmapscount.Read(file, 2);

            filesize.Read(file, 4);
            ffffffff.Read(file, 4);

            rawfile.Read(file, filesize.val);
        }
Example #9
0
 public override void Read(BinaryReader file, uint size)
 {
     id.Read(file, 2);
     guid.Read(file, 2);
 }
Example #10
0
        public override void Read(BinaryReader file, uint size)
        {
            base.Read(file, size);

            var cnt = file.ReadVLQInt32();

            for (int i = 0; i < cnt; i++)
            {
                //This is actually a byte-byte pair but no idea why or how anyone would edit this
                var mapping = new CUInt16(cr2w, Unicodemapping, "");
                mapping.Read(file, size);
                Unicodemapping.AddVariable(mapping);
            }
            Linedist.Read(file, size);
            Maxglyphheight.Read(file, size);
            Kerning.Read(file, size);

            var num = file.ReadVLQInt32();

            for (int i = 0; i < num; i++)
            {
                var glyph = new CArray <CFloat>(cr2w, Glyphs, "Glyph - " + i)
                {
                    Elementtype = "Float"
                };
                // UVs
                CFloat uv00 = new CFloat(cr2w, glyph, "UV[0][0]");
                uv00.Read(file, size);
                glyph.AddVariable(uv00);
                CFloat uv01 = new CFloat(cr2w, glyph, "UV[0][1]");
                uv01.Read(file, size);
                glyph.AddVariable(uv01);
                CFloat uv10 = new CFloat(cr2w, glyph, "UV[1][0]");
                uv10.Read(file, size);
                glyph.AddVariable(uv10);
                CFloat uv11 = new CFloat(cr2w, glyph, "UV[1][1]");
                uv11.Read(file, size);
                glyph.AddVariable(uv11);

                CInt32 textureindex = new CInt32(cr2w, glyph, "Texture index");
                textureindex.Read(file, size);
                glyph.AddVariable(textureindex);
                CInt32 width = new CInt32(cr2w, glyph, "Width");
                width.Read(file, size);
                glyph.AddVariable(width);
                CInt32 height = new CInt32(cr2w, glyph, "Height");
                height.Read(file, size);
                glyph.AddVariable(height);
                CInt32 advance_x = new CInt32(cr2w, glyph, "Advance X");
                advance_x.Read(file, size);
                glyph.AddVariable(advance_x);
                CInt32 bearing_x = new CInt32(cr2w, glyph, "Bearing X");
                bearing_x.Read(file, size);
                glyph.AddVariable(bearing_x);
                CInt32 bearing_y = new CInt32(cr2w, glyph, "Bearing Y");
                bearing_y.Read(file, size);
                glyph.AddVariable(bearing_y);

                Glyphs.AddVariable(glyph);
            }
        }
 public override void Read(BinaryReader file, uint size)
 {
     unk1.Read(file, 2);
     unk2.Read(file, 2);
     unk3.Read(file, 2);
 }