예제 #1
0
파일: WzCanvas.cs 프로젝트: stu98832/libwz
        internal override bool Read(WzFileStream stream)
        {
            this.Unknow1_Byte = stream.Read1u();
            bool hasProperty = stream.ReadBool();

            if (hasProperty)
            {
                this.CanvasProperty.Read(stream);
            }
            this.Width         = stream.Read4(true);
            this.Height        = stream.Read4(true);
            this.Format        = (WzCanvasFormat)stream.Read4(true);
            this.Scale         = stream.Read1u();
            this.Unknow2_Int   = stream.Read4();
            this.DataSize      = stream.Read4();
            this.mCanvasOffset = (uint)stream.Tell();

            if (stream.DynamicRead)
            {
                stream.Skip(this.DataSize);
                this.mStream = stream;
            }
            else
            {
                this.CanvasData = this.ResolveData(stream);
            }

            return(true);
        }