Esempio n. 1
0
        TEX0Node FindSourceNode()
        {
            ResourceNode candidate = this;

            while (candidate is TEX0Node)
            {
                TEX0Node texNode = candidate as TEX0Node;
                if (!texNode.SharesData)
                {
                    return(texNode);
                }
                candidate = candidate.NextSibling();
            }
            return(NullTEX0Node());
        }
Esempio n. 2
0
        // The offset from the start of the header to the start of its data.
        // Equal to the length of its header if not shared, the length of all headers between it and its data if shared.
        int OffsetToData()
        {
            int          offset = 0;
            ResourceNode node   = this;

            while (node is TEX0Node)
            {
                TEX0Node texNode = node as TEX0Node;
                offset += texNode.HeaderSize();
                if (!texNode.SharesData)
                {
                    return(offset);
                }
                node = node.NextSibling();
            }
            return(0);
        }