private static void ExtractAllSubtitles() { var path = @"E:\Games\Metal Gear Solid\TS\DISC1\shared\vox.dat"; MovieSubtitle.Unpack(path, @"E:\Games\Metal Gear Solid\TS\DISC1\shared\vox"); path = @"E:\Games\Metal Gear Solid\TS\DISC1\demo.dat"; MovieSubtitle.Unpack(path, @"E:\Games\Metal Gear Solid\TS\DISC1\shared\demo"); path = @"E:\Games\Metal Gear Solid\TS\DISC1\shared\movie.dat"; MovieSubtitle.Unpack(path, @"E:\Games\Metal Gear Solid\TS\DISC1\shared\movie"); path = @"E:\Games\Metal Gear Solid\TS\DISC2\shared\vox.dat"; MovieSubtitle.Unpack(path, @"E:\Games\Metal Gear Solid\TS\DISC2\shared\vox"); path = @"E:\Games\Metal Gear Solid\TS\DISC2\demo.dat"; MovieSubtitle.Unpack(path, @"E:\Games\Metal Gear Solid\TS\DISC2\shared\demo"); path = @"E:\Games\Metal Gear Solid\TS\DISC2\shared\movie.dat"; MovieSubtitle.Unpack(path, @"E:\Games\Metal Gear Solid\TS\DISC2\shared\movie"); // path = @"E:\Games\Metal Gear Solid\TS\DISC1\shared\codec.dat"; // Codec.Unpack(path); // path = @"E:\Games\Metal Gear Solid\TS\DISC2\shared\codec.dat"; // Codec.Unpack(path); }
static void Main(string[] args) { var dest = @"D:\Desktop\TC2\root"; var src = @"E:\Games\Metal Gear Solid\TS\DISC1"; MovieSubtitle.ApplyTranslation(Path.Combine(src, @"shared\vox.dat"), Path.Combine(dest, @"shared\vox.dat")); MovieSubtitle.ApplyTranslation(Path.Combine(src, @"shared\movie.dat"), Path.Combine(dest, @"shared\movie.dat")); MovieSubtitle.ApplyTranslation(Path.Combine(src, @"demo.dat"), Path.Combine(dest, @"demo.dat")); MovieSubtitle.Unpack(Path.Combine(dest, @"shared\vox.dat"), Path.Combine(dest, @"shared\vox")); MovieSubtitle.Unpack(Path.Combine(dest, @"shared\movie.dat"), Path.Combine(dest, @"shared\movie")); MovieSubtitle.Unpack(Path.Combine(dest, @"demo.dat"), Path.Combine(dest, @"demo")); Repack(); //MovieSubtitle.Unpack(Path.Combine(src, @"shared\vox.dat"), Path.Combine(src, @"shared\vox")); //MovieSubtitle.Unpack(Path.Combine(src, @"shared\movie.dat"), Path.Combine(src, @"shared\movie")); //MovieSubtitle.Unpack(Path.Combine(src, @"demo.dat"), Path.Combine(src, @"demo")); //TestFont(); //DumpFileList(); //return; //ExtractAllGCX(); //return; //ExtractAllSubtitles(); return; //return; //foreach (var file in Directory.GetFiles(output)) //{ // GCX.Unpack(file, TextTable.ToTable(string.Empty)); //} //return; //var location = @"E:\Games\Metal Gear Solid\TS\DISC1\stage.dat.original"; //UnpackStageData(location); //var path = @"E:\Games\Metal Gear Solid\TS\DISC1\stage"; //foreach (var file in Directory.GetFiles(path, "*.gcx", SearchOption.AllDirectories)) //{ // GCX.Unpack(file, TextTable.Empty); // //if (file.Contains("title")) // //{ // // GCX.Unpack(file, TextTable.ToTable(_table_title)); // //} // //else // //{ // // GCX.Unpack(file, TextTable.ToTable(_table_comm)); // //} //} //return; //var korean = File.ReadAllText(@"E:\TranslateMGS\TwinSnakes\Korean.txt", Encoding.Default); //var result = korean.GroupBy(x => x).ToDictionary(x => x.Key, x => x.Count()).Where(x => x.Key >= '가').OrderBy(x => x.Value).Reverse().Take(150).OrderBy(x => x.Key).ToArray(); //var sum = 0; //using (var fs = File.OpenWrite("All2")) //{ // foreach (var file in Directory.GetFiles(@"E:\Games\Metal Gear Solid\TS\DISC1\state.dat", "*.*", SearchOption.AllDirectories)) // { // var data = File.ReadAllBytes(file); // Debug.WriteLine(file); // if (sum > 0x18E2DDC0) // { // } // sum += data.Length; // //fs.Write(data, 0, data.Length); // } // //18E2DDC0 // //18F43AA0 // //1911A778 //} //var path = @"E:\Games\Metal Gear Solid\TS\DISC1\shared\codec.dat"; //using (var reader = new BigEndianBinaryReader(File.OpenRead(path))) //{ // reader.BaseStream.Position = 0x0002B67E; // var text = ReadJapaneseString(reader.BaseStream); //} }