Esempio n. 1
0
        private static void CopyFiles()
        {
            File.Copy(ExeGame, ExeGame + ".bak");
            File.Copy(ExeSetup, ExeSetup + ".bak");

            UnpackedFiles.Add(ExeGame);
            UnpackedFiles.Add(ExeSetup);
        }
Esempio n. 2
0
        private static void UnpackFiles()
        {
            ExtractFileFromResources("TTLauncher.Files.Data.bin", ExeGame, 16, 967168);
            ExtractFileFromResources("TTLauncher.Files.Data.bin", ExeSetup, 967200, 95744);

            UnpackedFiles.Add(ExeGame);
            UnpackedFiles.Add(ExeSetup);
        }
Esempio n. 3
0
        private static void CheckConfiguration()
        {
            InitialPatching();

            // Portable Mode.
            if (SettingsLoaded[1] == 0x01)
            {
                // Manage configuration file.
                if (!File.Exists("Ubi.ini"))
                {
                    using (StreamWriter Stream = File.CreateText("Ubi.ini"))
                    {
                        Stream.WriteLine("[TONICT]");

                        // Needed for the game and setup executables.
                        Stream.WriteLine("Directory=");

                        // Necessary to play the intro video and some sounds.
                        Stream.WriteLine("Language=" + CheckSum.VersionLanguage[SettingsLoaded[0]]);
                    }
                }

                PatchExecutables();
            }

            // Adjust the FOV to the desktop resolution aspect ratio.
            if (SettingsLoaded[2] == 0x01)
            {
                PatchWidescreen();
            }

            // Configure dgVoodoo 2(.63.1).
            if (SettingsLoaded[3] == 0x01)
            {
                ExtractFileFromResources("TTLauncher.Files.Video.bin", "D3DImm.dll", 16, 119808);
                ExtractFileFromResources("TTLauncher.Files.Video.bin", "DDraw.dll", 119840, 145408);

                UnpackedFiles.Add("D3DImm.dll");
                UnpackedFiles.Add("DDraw.dll");

                ConfigureVideo();
            }
        }