Exemplo n.º 1
0
        public void Read(BinaryReader br)
        {
            VTable           = br.ReadUInt32();
            NodeType         = (HtmlNodeType)br.ReadInt32();
            ParentNodeOffset = ResourceUtil.ReadOffset(br);

            ChildNodes = new PtrCollection <HtmlNode>(br);
            foreach (var node in ChildNodes)
            {
                node.ParentNode = this;
            }

            RenderState = new HtmlRenderState(br);

            if (NodeType != HtmlNodeType.HtmlDataNode)
            {
                Tag          = (HtmlTag)br.ReadInt32();
                _fDC         = br.ReadUInt32();
                _linkAddress = new SimpleCollection <byte>(br, reader => reader.ReadByte());
                if (NodeType == HtmlNodeType.HtmlTableElementNode)
                {
                    _fE8 = br.ReadInt32();
                    _fEC = br.ReadInt32();
                }
            }
            else
            {
                Data = new PtrString(br);
            }
        }
Exemplo n.º 2
0
Arquivo: Bone.cs Projeto: q4a/SparkIV
        public void Read(BinaryReader br)
        {
            Offset = br.BaseStream.Position;

            Name = new PtrString(br).Value;

            Unknown1 = br.ReadInt16();
            Unknown2 = br.ReadInt16();

            NextSiblingOffset = ResourceUtil.ReadOffset(br);
            FirstChildOffset  = ResourceUtil.ReadOffset(br);
            ParentOffset      = ResourceUtil.ReadOffset(br);

            BoneIndex  = br.ReadInt16();
            BoneID     = br.ReadInt16();
            BoneIndex2 = br.ReadInt16();
            Unknown3   = br.ReadInt16();

            //Debug.Assert(BoneIndex == BoneIndex2);

            Unknown4 = br.ReadInt32();

            Position           = new Vector4(br);
            RotationEuler      = new Vector4(br);
            RotationQuaternion = new Vector4(br);

            UnknownZeroVector1 = new Vector4(br);

            AbsolutePosition      = new Vector4(br);
            AbsoluteRotationEuler = new Vector4(br);

            UnknownZeroVector2 = new Vector4(br);
            UnknownZeroVector3 = new Vector4(br);
            UnknownZeroVector4 = new Vector4(br);

            MinPI = new Vector4(br); // Minimum euler rotation maybe?
            MaxPI = new Vector4(br); // Maximum euler rotation maybe?

            UnknownAllZeros = new Vector4(br);
        }