Ejemplo n.º 1
0
        public CEStringNode CreateCEStringNode()
        {
            CEStringNode n = new CEStringNode();

            this.Children[1].AddChild(n);
            return(n);
        }
Ejemplo n.º 2
0
        public override void OnPopulate()
        {
            Type t = null; //switch by name

            if (_name == "Events")
            {
                t = typeof(CEEntryNode);
            }
            else if (_name == "Strings")
            {
                t = typeof(CEStringNode);
            }
            else
            {
                return;
            }

            if (t == typeof(CEEntryNode)) //is this CEEntryNode?
            {
                for (int i = 0; i < Header->_numEntries; i++)
                {
                    VoidPtr     entry = (VoidPtr)Header + Header->entryOffsets[i];
                    CEEntryNode node  = new CEEntryNode
                    {
                        NextAddress = (VoidPtr)Header + Header->entryOffsets[i + 1]
                    };
                    node.Initialize(this, new DataSource(entry, node.NextAddress - entry));
                }
            }
            else //this is CEStringNode
            {
                bint *offset = &Header->entryOffsets[Header->_numEntries];
                for (; offset < (VoidPtr)Header + Header->entryOffsets[0]; offset++)
                {
                    if (*offset != 0x0)
                    {
                        CEStringNode node = new CEStringNode();
                        node.Initialize(this, new DataSource((VoidPtr)Header + *offset, 0x0));
                    }
                }
            }
        }
Ejemplo n.º 3
0
 public CEStringNode CreateCEStringNode()
 {
     CEStringNode n = new CEStringNode();
     this.Children[1].AddChild(n);
     return n;
 }
Ejemplo n.º 4
0
        public override void OnPopulate()
        {
            Type t = null;//switch by name
            if (_name == "Events")
                t = typeof(CEEntryNode);
            else if (_name == "Strings")
                t = typeof(CEStringNode);
            else
                return;

            if (t == typeof(CEEntryNode))//is this CEEntryNode?
                for (int i = 0; i < Header->_numEntries; i++)
                {
                    VoidPtr entry = (VoidPtr)Header + Header->entryOffsets[i];
                    CEEntryNode node = new CEEntryNode();
                    node.NextAddress = (VoidPtr)Header + Header->entryOffsets[i + 1];
                    node.Initialize(this, new DataSource(entry, node.NextAddress - entry));
                }
            else//this is CEStringNode
            {
                bint* offset = &Header->entryOffsets[Header->_numEntries];
                for (; (VoidPtr)offset < (VoidPtr)Header + Header->entryOffsets[0]; offset++)
                {
                    if (*offset != 0x0)
                    {
                        CEStringNode node = new CEStringNode();
                        node.Initialize(this, new DataSource((VoidPtr)Header + *offset, 0x0));
                    }
                }
            }
        }