Esempio n. 1
0
        private void Save(object sender, RoutedEventArgs e)
        {
            Console.Info("Saving kernel settings ...");

            _configuration.Kernel.EnableSpv3KernelMode = EnableSpv3KernelMode.IsChecked == true;
            _configuration.Kernel.EnableSpv3LegacyMode = EnableSpv3LegacyMode.IsChecked == true;
            _configuration.Kernel.SkipVerifyMainAssets = SkipVerifyMainAssets.IsChecked == true;
            _configuration.Kernel.SkipInvokeCoreTweaks = SkipInvokeCoreTweaks.IsChecked == true;
            _configuration.Kernel.SkipResumeCheckpoint = SkipResumeCheckpoint.IsChecked == true;
            _configuration.Kernel.SkipSetInitcContents = SkipSetShadersConfig.IsChecked == true;
            _configuration.Kernel.SkipInvokeExecutable = SkipInvokeExecutable.IsChecked == true;
            _configuration.Kernel.SkipPatchLargeAAware = SkipPatchLargeAAware.IsChecked == true;

            _configuration.Save();
            _configuration.Load();

            PrintConfiguration();

            Exit.WithCode(Exit.Code.Success);
        }
Esempio n. 2
0
        private void Save(object sender, RoutedEventArgs e)
        {
            Info("Saving weapon positions ...");

            var openSauce = (OpenSauce)_source;

            if (!openSauce.Exists())
            {
                MessageBox.Show("Source file does not exist.");
                return;
            }

            openSauce.Load();
            openSauce.Objects.Weapon.Save(_target);
            openSauce.Objects.Weapon.Load(_target);

            foreach (var position in openSauce.Objects.Weapon.Positions)
            {
                Debug($"Weapon: {position.Name} | I/J/K: {position.Position.I}/{position.Position.J}/{position.Position.K}");
            }

            Exit.WithCode(Exit.Code.Success);
        }
Esempio n. 3
0
        private void Save(object sender, RoutedEventArgs e)
        {
            Console.Info("Saving kernel settings");

            switch (Mode.SelectedIndex)
            {
            case 0:
                _configuration.Mode = Kernel.Configuration.ConfigurationMode.HCE;
                break;

            case 1:
                _configuration.Mode = Kernel.Configuration.ConfigurationMode.SPV31;
                break;

            case 2:
                _configuration.Mode = Kernel.Configuration.ConfigurationMode.SPV32;
                break;

            case 3:
                _configuration.Mode = Kernel.Configuration.ConfigurationMode.SPV33;
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            _configuration.Main.Reset          = MainReset.IsChecked == true;
            _configuration.Main.Patch          = MainPatch.IsChecked == true;
            _configuration.Main.Start          = MainStart.IsChecked == true;
            _configuration.Main.Resume         = MainResume.IsChecked == true;
            _configuration.Main.Elevated       = MainElevated.IsChecked == true;
            _configuration.Tweaks.CinemaBars   = TweaksCinemaBars.IsChecked == true;
            _configuration.Tweaks.Sensor       = TweaksSensor.IsChecked == true;
            _configuration.Tweaks.Magnetism    = TweaksMagnetism.IsChecked == true;
            _configuration.Tweaks.AutoAim      = TweaksAutoAim.IsChecked == true;
            _configuration.Tweaks.Acceleration = TweaksAcceleration.IsChecked == true;
            _configuration.Tweaks.Unload       = TweaksUnload.IsChecked == true;
            _configuration.Video.Resolution    = VideoResolution.IsChecked == true;
            _configuration.Video.Uncap         = VideoUncap.IsChecked == true;
            _configuration.Video.Quality       = VideoQuality.IsChecked == true;
            _configuration.Video.Bless         = VideoBless.IsChecked == true;
            _configuration.Video.UseGamma      = VideoUseGamma.IsChecked == true;
            _configuration.Audio.Quality       = AudioQuality.IsChecked == true;
            _configuration.Audio.Enhancements  = AudioEnhancements.IsChecked == true;
            _configuration.Input.Override      = InputOverride.IsChecked == true;

            try
            {
                _configuration.Video.Gamma = byte.Parse(VideoGamma.Text);
            }
            catch (Exception)
            {
                _configuration.Video.Gamma = 0;
            }

            _configuration.Save();
            _configuration.Load();

            PrintConfiguration();

            Exit.WithCode(Exit.Code.Success);
        }
Esempio n. 4
0
 private void Cancel(object sender, RoutedEventArgs e)
 {
     Exit.WithCode(Exit.Code.Success);
 }