コード例 #1
0
ファイル: Sen1Form.cs プロジェクト: EliphasNUIT/SenPatcher
        private void buttonPatch_Click(object sender, EventArgs e)
        {
            try {
                bool removeTurboSkip         = checkBoxBattleAutoSkip.Checked;
                bool allowR2NotebookShortcut = checkBoxAllowR2InTurboMode.Checked;
                int  turboKey                = comboBoxTurboModeKey.SelectedIndex;
                bool fixTextureIds           = checkBoxFixHdTextureId.Checked;
                bool fixVoiceTables          = checkBoxFixVoiceFileLang.Checked;
                bool patchAssets             = checkBoxAssetPatches.Checked;
                bool disableMouseCapture     = checkBoxDisableMouseCam.Checked;
                bool disablePauseOnFocusLoss = false;

                var mods = new List <FileMod>();
                mods.AddRange(Sen1Mods.GetExecutableMods(
                                  removeTurboSkip: removeTurboSkip,
                                  allowR2NotebookShortcut: allowR2NotebookShortcut,
                                  turboKey: turboKey,
                                  fixTextureIds: fixTextureIds,
                                  correctLanguageVoiceTables: fixVoiceTables,
                                  disableMouseCapture: disableMouseCapture,
                                  disablePauseOnFocusLoss: disablePauseOnFocusLoss
                                  ));
                if (patchAssets)
                {
                    mods.AddRange(Sen1Mods.GetAssetMods());
                }

                GamePatchClass.RunPatch(new GamePatchClass(Path, Storage, mods));
            } catch (Exception ex) {
                MessageBox.Show("Unknown error occurred: " + ex.Message);
            }
        }
コード例 #2
0
        private void buttonPatch_Click(object sender, EventArgs e)
        {
            try {
                bool removeTurboSkip    = checkBoxBattleAutoSkip.Checked;
                bool patchAudioThread   = checkBoxPatchAudioThread.Checked;
                int  audioThreadDivisor = 1000;
                bool fixVoiceTables     = checkBoxFixVoiceFileLang.Checked;
                bool patchBgmQueueing   = checkBoxBgmEnqueueingLogic.Checked;
                bool patchAssets        = checkBoxAssetPatches.Checked;

                var mods = new List <FileMod>();
                mods.AddRange(Sen2Mods.GetExecutableMods(
                                  removeTurboSkip: removeTurboSkip,
                                  patchAudioThread: patchAudioThread,
                                  audioThreadDivisor: audioThreadDivisor,
                                  patchBgmQueueing: patchBgmQueueing,
                                  correctLanguageVoiceTables: fixVoiceTables
                                  ));
                if (patchAssets)
                {
                    mods.AddRange(Sen2Mods.GetAssetMods());
                }

                GamePatchClass.RunPatch(new GamePatchClass(Path, Storage, mods));
            } catch (Exception ex) {
                MessageBox.Show("Unknown error occurred: " + ex.Message);
            }
        }