Ejemplo n.º 1
0
        public override void StartModProcess()
        {
            string path_Bigfile = "BIGFILE.BIG";

            basePath = ConsolePipeline.ExtractedPath;

            bigtool.BIG big;

            switch (GameRegion.Region)
            {
            case RegionType.NTSC_U:
                big = new bigtool.BIG(basePath + path_Bigfile, false);
                big.Export();
                break;

            case RegionType.NTSC_J:
                big = new bigtool.BIG(basePath + path_Bigfile, false);
                big.Export();
                break;

            case RegionType.PAL:
                big = new bigtool.BIG(basePath + path_Bigfile, true);
                big.Export();
                break;
            }

            ModProcess();
        }
Ejemplo n.º 2
0
        void EndModProcess()
        {
            string path_Bigfile = "BIGFILE.TXT";

            File.Move(ModLoaderGlobals.BaseDirectory + path_Bigfile, basePath + path_Bigfile);

            bigtool.BIG big = new bigtool.BIG();
            big.Build(basePath, basePath + path_Bigfile);

            // Extraction cleanup
            if (Directory.Exists(basePath + @"BIGFILE\"))
            {
                DirectoryInfo di = new DirectoryInfo(basePath + @"BIGFILE\");

                foreach (FileInfo file in di.EnumerateFiles())
                {
                    file.Delete();
                }
                foreach (DirectoryInfo dir in di.EnumerateDirectories())
                {
                    dir.Delete(true);
                }

                Directory.Delete(basePath + @"BIGFILE\");
            }
            if (File.Exists(basePath + path_Bigfile))
            {
                File.Delete(basePath + path_Bigfile);
            }
        }