예제 #1
0
        private void LoadArcFiles(ARCNode arc, ref Dictionary <int, Dictionary <ARCFileType, List <ARCEntryNode> > > files)
        {
            if (arc == null)
            {
                return;
            }

            files = new Dictionary <int, Dictionary <ARCFileType, List <ARCEntryNode> > >();
            foreach (ARCEntryNode e in arc.Children)
            {
                int grp = e.GroupID;

                if (!files.ContainsKey(grp))
                {
                    files[grp] = new Dictionary <ARCFileType, List <ARCEntryNode> >();
                }

                ARCFileType type = e.FileType;

                if (!files[grp].ContainsKey(type))
                {
                    files[grp].Add(type, new List <ARCEntryNode>());
                }

                files[grp][type].Add(e);
            }
        }
예제 #2
0
        public override void Initialize(ResourceNode parent, DataSource origSource, DataSource uncompSource)
        {
            base.Initialize(parent, origSource, uncompSource);

            if (parent != null && (parent is MRGNode || RootNode is U8Node))
            {
                _fileType  = 0;
                _fileIndex = (short)Parent._children.IndexOf(this);
                _group     = 0;
                //_unk = 0;
                _redirectIndex = 0;
                if (_name == null)
                {
                    _name = GetName();
                }
            }
            else if (parent != null && !(parent is FileScanNode))
            {
                ARCFileHeader *header = (ARCFileHeader *)(origSource.Address - 0x20);
                _fileType  = header->FileType;
                _fileIndex = header->_index;
                _group     = header->_groupIndex;
                //_unk = header->_padding;
                _redirectIndex = header->_redirectIndex;
                if (_name == null)
                {
                    _name = GetName();
                }
            }
            else if (_name == null)
            {
                _name = Path.GetFileName(_origPath);
            }
        }
예제 #3
0
        internal override void Initialize(ResourceNode parent, DataSource origSource, DataSource uncompSource)
        {
            base.Initialize(parent, origSource, uncompSource);

            if (parent != null && (parent is MRGNode || RootNode is U8Node))
            {
                _fileType  = 0;
                _fileIndex = (short)_parent._children.IndexOf(this);
                _group     = 0;
                _unk       = 0;
                _fileId    = 0;
                if (_name == null)
                {
                    _name = String.Format("{0}[{1}]", _fileType, _fileIndex);
                }
            }
            else if (parent != null)
            {
                ARCFileHeader *header = (ARCFileHeader *)(origSource.Address - 0x20);
                _fileType  = header->FileType;
                _fileIndex = header->_index;
                _group     = header->_groupIndex;
                _unk       = header->_unk1;
                _fileId    = header->_id;
                if (_name == null)
                {
                    _name = String.Format("{0}[{1}]", _fileType, _fileIndex);
                }
            }
            else if (_name == null)
            {
                _name = Path.GetFileName(_origPath);
            }
        }
예제 #4
0
 public ARCFileHeader(ARCFileType type, int index, int size, short flags, short id)
 {
     _type  = (short)type;
     _index = (short)index;
     _size  = size;
     _flags = flags;
     _id    = id;
     _pad1  = _pad2 = _pad3 = _pad4 = _pad5 = 0;
 }
예제 #5
0
 public ARCFileHeader(ARCFileType type, int index, int size, byte groupIndex, short id)
 {
     _type          = (short)type;
     _index         = (short)index;
     _size          = size;
     _groupIndex    = groupIndex;
     _padding       = 0;
     _redirectIndex = id;
     _pad1          = _pad2 = _pad3 = _pad4 = _pad5 = 0;
 }
예제 #6
0
 public ARCFileHeader(ARCFileType type, int index, int size, byte groupIndex, short id)
 {
     _type = (short)type;
     _index = (short)index;
     _size = size;
     _groupIndex = groupIndex;
     _padding = 0;
     _redirectIndex = id;
     _pad1 = _pad2 = _pad3 = _pad4 = _pad5 = 0;
 }
예제 #7
0
 public ARCFileHeader(ARCFileType type, int index, int size, byte groupIndex, byte unk1, short id)
 {
     _type       = (short)type;
     _index      = (short)index;
     _size       = size;
     _groupIndex = groupIndex;
     _unk1       = unk1;
     _id         = id;
     _pad1       = _pad2 = _pad3 = _pad4 = _pad5 = 0;
 }
예제 #8
0
        internal override void Initialize(ResourceNode parent, DataSource origSource, DataSource uncompSource)
        {
            base.Initialize(parent, origSource, uncompSource);

            if (parent != null)
            {
                ARCFileHeader *header = (ARCFileHeader *)(origSource.Address - 0x20);
                _fileType  = header->FileType;
                _fileIndex = header->_index;
                _fileFlags = header->_flags;
                _fileId    = header->_id;
                if (_name == null)
                {
                    _name = String.Format("{0}[{1}]", _fileType, _fileIndex);
                }
            }
            else if (_name == null)
            {
                _name = Path.GetFileName(_origPath);
            }
        }
예제 #9
0
        private void LoadEtcFiles(ARCNode etc, ref Dictionary <int, Dictionary <ARCFileType, List <ARCEntryNode> > > files)
        {
            etc.Populate();
            files = new Dictionary <int, Dictionary <ARCFileType, List <ARCEntryNode> > >();
            foreach (ARCEntryNode e in etc.Children)
            {
                int grp = e.GroupID;

                if (!files.ContainsKey(grp))
                {
                    files[grp] = new Dictionary <ARCFileType, List <ARCEntryNode> >();
                }

                ARCFileType type = e.FileType;

                if (!files[grp].ContainsKey(type))
                {
                    files[grp].Add(type, new List <ARCEntryNode>());
                }

                files[grp][type].Add(e);
            }
        }
예제 #10
0
        public override void Initialize(ResourceNode parent, DataSource origSource, DataSource uncompSource)
        {
            base.Initialize(parent, origSource, uncompSource);

            if (parent != null && (parent is MRGNode || RootNode is U8Node))
            {
                _fileType = 0;
                _fileIndex = (short)Parent._children.IndexOf(this);
                _group = 0;
                //_unk = 0;
                _redirectIndex = 0;
                if (_name == null)
                    _name = GetName();
            }
            else if (parent != null && !(parent is FileScanNode))
            {
                ARCFileHeader* header = (ARCFileHeader*)(origSource.Address - 0x20);
                _fileType = header->FileType;
                _fileIndex = header->_index;
                _group = header->_groupIndex;
                //_unk = header->_padding;
                _redirectIndex = header->_redirectIndex;
                if (_name == null)
                    _name = GetName();
            }
            else if (_name == null)
                _name = Path.GetFileName(_origPath);
        }