Esempio n. 1
0
        public override void Write(ArchiveWriter writer)
        {
            writer.Write((byte)0);
            if (_objects.Count > 0)
            {
                writer.Write((byte)1);
                base.Write(writer);
            }
            else
            {
                writer.Write((byte)0);
            }

            writer.WriteCompressedInt(Width);
            writer.WriteCompressedInt(Height);
            writer.WriteCompressedInt((int)PixFormat);
            writer.WriteCompressedInt(MagLevel);

            for (var i = 0; i < 4; i++)
            {
                writer.WriteCompressedInt((int)0);
            }

            int dataSize = 0;

            // Data Size
            writer.Write(dataSize);
            if (dataSize > 0)
            {
                // CWzCanvas::SerializeData
                writer.Write((byte)0);

                for (int y = 0; y < Height; y += TileHeight)
                {
                    RCINFO[] rcs = new RCINFO[WidthCount];
                    int      i   = 0;
                    for (int x = 0; x < Width; x += TileWidth)
                    {
                        var canvas = GetCanvas(x, y);
                        var rcinfo = new RCINFO
                        {
                            currentOffset = 0,
                            rc            = canvas,
                        };

                        canvas.LockAddress(out rcinfo.pitch, out rcinfo.data);
                    }
                }
            }
        }
Esempio n. 2
0
        public override void Write(ArchiveWriter writer)
        {
            writer.WriteCompressedInt(ChildCount);
            var data = (PcomObject[])_obj;

            for (var i = 0; i < ChildCount; i++)
            {
                WriteToBlob(writer, data[i]);
            }
        }
Esempio n. 3
0
        public override void Write(ArchiveWriter writer)
        {
            writer.Write((byte)0);
            writer.Write((byte)(IsArray ? 1 : 0));
            writer.WriteCompressedInt(ChildCount);

            foreach (var o in this)
            {
                WriteToBlob(writer, o);
            }
        }
Esempio n. 4
0
        public override void Write(ArchiveWriter writer)
        {
            writer.Write((byte)0);
            if (_objects.Count > 0)
            {
                writer.Write((byte)1);
                base.Write(writer);
            }
            else
            {
                writer.Write((byte)0);
            }

            writer.WriteCompressedInt(Width);
            writer.WriteCompressedInt(Height);
            writer.WriteCompressedInt((int)PixFormat);
            writer.WriteCompressedInt(MagLevel);

            for (var i = 0; i < 4; i++)
            {
                writer.WriteCompressedInt((int)0);
            }
        }