예제 #1
0
        private static void BuildGTModeFile()
        {
            var languageDirectories = Directory.GetDirectories("Strings");

            foreach (string languageDirectory in languageDirectories)
            {
                LanguagePrefix = languageDirectory.Split('\\')[1];
                Console.WriteLine($"Building language '{LanguagePrefix}'...");

                UnicodeStringTable.Import();
                CarNameStringTable.Import();

                string overridePath = Path.Combine("_Overrides", LanguagePrefix);
                DataFile.OverridePath = Directory.Exists(overridePath) ? overridePath : null;

                var carData = new GTModeData();
                carData.ImportData();
                Directory.CreateDirectory("Output");
                carData.WriteData(Path.Combine("Output", $"{GetDataFilePrefix()}gtmode_data.dat"));

                GTModeRace raceData = new GTModeRace();
                raceData.ImportData();
                raceData.WriteData(Path.Combine("Output", $"{GetDataFilePrefix()}gtmode_race.dat"));

                UnicodeStringTable.Write(Path.Combine("Output", $"{LanguagePrefix}_unistrdb.dat"));

                UnicodeStringTable.Reset();
                CarNameStringTable.Reset();
            }
        }
예제 #2
0
        static void BuildFile()
        {
            var languageDirectories = Directory.GetDirectories("Strings");

            foreach (string languageDirectory in languageDirectories)
            {
                LanguagePrefix = languageDirectory.Split('\\')[1];
                Console.WriteLine($"Building language '{LanguagePrefix}'...");

                StringTable.Import();
                CarNameStringTable.Import();

                GTModeData CarData = new GTModeData();
                CarData.ImportData();
                Directory.CreateDirectory("Output");
                CarData.WriteData(Path.Combine("Output", $"{GetDataFilePrefix()}gtmode_data.dat"));

                GTModeRace RaceData = new GTModeRace();
                RaceData.ImportData();
                RaceData.WriteData(Path.Combine("Output", $"{GetDataFilePrefix()}gtmode_race.dat"));

                StringTable.Write(Path.Combine("Output", $"{LanguagePrefix}_unistrdb.dat"));

                StringTable.Reset();
                CarNameStringTable.Reset();
            }
        }