Exemplo n.º 1
0
        private static void DoThings(ClassHelper source, ClassHelper current, Dictionary <string, int> FileAddressPair)
        {
            foreach (var TextureDirectory in source.Data.FileDirectory.Where(x => x.Name == "icon_item_static"))
            {
                int currentAddr;
                int sourceAddr;

                if (!FileAddressPair.TryGetValue(TextureDirectory.Name, out currentAddr))
                {
                    sb.AppendLine($"Folder {TextureDirectory} not found.");
                    continue;
                }
                sb.AppendLine($"Folder: {TextureDirectory.Name}");

                sourceAddr = TextureDirectory.Address;

                source.GetFile(sourceAddr);
                current.GetFile(currentAddr);


                TextureDirectory dir = new TextureDirectory(TextureDirectory.Name,
                                                            current.File.Record.VRom.Start,
                                                            current.File.Record.VRom.Size);

                current.Data.FileDirectory.Add(dir);

                //subdirs processed, find textures within the current dir
                SearchField searchField = new SearchField(0, current.File.Record.VRom.Size);

                Dictionary <int, int?> paletteDictionary = new Dictionary <int, int?>();

                ProcessSubdirectory
                    (source, TextureDirectory,
                    current, dir,
                    searchField, paletteDictionary, true);
            }
        }