N64: Glide settings now save

This commit is contained in:
pjgat09 2013-05-27 01:59:45 +00:00
parent f183654b5a
commit 19fc24aeb5
3 changed files with 185 additions and 92 deletions

View File

@ -106,6 +106,8 @@ namespace BizHawk
{ {
if (OptionPresent(parameter) && OptionValue(parameter) == "true") if (OptionPresent(parameter) && OptionValue(parameter) == "true")
return true; return true;
else if (OptionPresent(parameter) && OptionValue(parameter) == "false")
return false;
else else
return defaultVal; return defaultVal;
} }

View File

@ -135,6 +135,15 @@
this.Glide64TabPage = new System.Windows.Forms.TabPage(); this.Glide64TabPage = new System.Windows.Forms.TabPage();
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.Glide64General = new System.Windows.Forms.TabPage(); this.Glide64General = new System.Windows.Forms.TabPage();
this.label39 = new System.Windows.Forms.Label();
this.Glide_scale_y = new System.Windows.Forms.TextBox();
this.label40 = new System.Windows.Forms.Label();
this.Glide_scale_x = new System.Windows.Forms.TextBox();
this.label38 = new System.Windows.Forms.Label();
this.Glide_offset_y = new System.Windows.Forms.TextBox();
this.label37 = new System.Windows.Forms.Label();
this.Glide_offset_x = new System.Windows.Forms.TextBox();
this.Glide_fb_get_info = new System.Windows.Forms.CheckBox();
this.Glide_disable_auxbuf = new System.Windows.Forms.CheckBox(); this.Glide_disable_auxbuf = new System.Windows.Forms.CheckBox();
this.Glide_fbo = new System.Windows.Forms.CheckBox(); this.Glide_fbo = new System.Windows.Forms.CheckBox();
this.Glide_noglsl = new System.Windows.Forms.CheckBox(); this.Glide_noglsl = new System.Windows.Forms.CheckBox();
@ -202,15 +211,6 @@
this.button1 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.CancelBT = new System.Windows.Forms.Button(); this.CancelBT = new System.Windows.Forms.Button();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.Glide_fb_get_info = new System.Windows.Forms.CheckBox();
this.label39 = new System.Windows.Forms.Label();
this.Glide_scale_y = new System.Windows.Forms.TextBox();
this.label40 = new System.Windows.Forms.Label();
this.Glide_scale_x = new System.Windows.Forms.TextBox();
this.label38 = new System.Windows.Forms.Label();
this.Glide_offset_y = new System.Windows.Forms.TextBox();
this.label37 = new System.Windows.Forms.Label();
this.Glide_offset_x = new System.Windows.Forms.TextBox();
this.N64plugintabcontrol.SuspendLayout(); this.N64plugintabcontrol.SuspendLayout();
this.N64vpluginglobaltab.SuspendLayout(); this.N64vpluginglobaltab.SuspendLayout();
this.RiceTabPage.SuspendLayout(); this.RiceTabPage.SuspendLayout();
@ -1622,6 +1622,81 @@
this.Glide64General.Text = "General"; this.Glide64General.Text = "General";
this.Glide64General.UseVisualStyleBackColor = true; this.Glide64General.UseVisualStyleBackColor = true;
// //
// label39
//
this.label39.AutoSize = true;
this.label39.Location = new System.Drawing.Point(386, 265);
this.label39.Name = "label39";
this.label39.Size = new System.Drawing.Size(47, 13);
this.label39.TabIndex = 42;
this.label39.Text = "Scale Y:";
//
// Glide_scale_y
//
this.Glide_scale_y.Location = new System.Drawing.Point(455, 262);
this.Glide_scale_y.Name = "Glide_scale_y";
this.Glide_scale_y.Size = new System.Drawing.Size(56, 20);
this.Glide_scale_y.TabIndex = 41;
//
// label40
//
this.label40.AutoSize = true;
this.label40.ForeColor = System.Drawing.SystemColors.ControlText;
this.label40.Location = new System.Drawing.Point(386, 239);
this.label40.Name = "label40";
this.label40.Size = new System.Drawing.Size(47, 13);
this.label40.TabIndex = 40;
this.label40.Text = "Scale X:";
//
// Glide_scale_x
//
this.Glide_scale_x.Location = new System.Drawing.Point(455, 236);
this.Glide_scale_x.Name = "Glide_scale_x";
this.Glide_scale_x.Size = new System.Drawing.Size(56, 20);
this.Glide_scale_x.TabIndex = 39;
//
// label38
//
this.label38.AutoSize = true;
this.label38.Location = new System.Drawing.Point(386, 213);
this.label38.Name = "label38";
this.label38.Size = new System.Drawing.Size(48, 13);
this.label38.TabIndex = 38;
this.label38.Text = "Offset Y:";
//
// Glide_offset_y
//
this.Glide_offset_y.Location = new System.Drawing.Point(455, 210);
this.Glide_offset_y.Name = "Glide_offset_y";
this.Glide_offset_y.Size = new System.Drawing.Size(56, 20);
this.Glide_offset_y.TabIndex = 37;
//
// label37
//
this.label37.AutoSize = true;
this.label37.Location = new System.Drawing.Point(386, 187);
this.label37.Name = "label37";
this.label37.Size = new System.Drawing.Size(48, 13);
this.label37.TabIndex = 36;
this.label37.Text = "Offset X:";
//
// Glide_offset_x
//
this.Glide_offset_x.Location = new System.Drawing.Point(455, 184);
this.Glide_offset_x.Name = "Glide_offset_x";
this.Glide_offset_x.Size = new System.Drawing.Size(56, 20);
this.Glide_offset_x.TabIndex = 35;
//
// Glide_fb_get_info
//
this.Glide_fb_get_info.AutoSize = true;
this.Glide_fb_get_info.Location = new System.Drawing.Point(9, 278);
this.Glide_fb_get_info.Name = "Glide_fb_get_info";
this.Glide_fb_get_info.Size = new System.Drawing.Size(119, 17);
this.Glide_fb_get_info.TabIndex = 23;
this.Glide_fb_get_info.Text = "Get framebuffer info";
this.Glide_fb_get_info.UseVisualStyleBackColor = true;
//
// Glide_disable_auxbuf // Glide_disable_auxbuf
// //
this.Glide_disable_auxbuf.AutoSize = true; this.Glide_disable_auxbuf.AutoSize = true;
@ -1683,7 +1758,7 @@
"Hq4x"}); "Hq4x"});
this.Glide_tex_filter.Location = new System.Drawing.Point(297, 86); this.Glide_tex_filter.Location = new System.Drawing.Point(297, 86);
this.Glide_tex_filter.Name = "Glide_tex_filter"; this.Glide_tex_filter.Name = "Glide_tex_filter";
this.Glide_tex_filter.Size = new System.Drawing.Size(78, 21); this.Glide_tex_filter.Size = new System.Drawing.Size(95, 21);
this.Glide_tex_filter.TabIndex = 17; this.Glide_tex_filter.TabIndex = 17;
// //
// Glide_fb_render // Glide_fb_render
@ -2154,7 +2229,7 @@
// label44 // label44
// //
this.label44.AutoSize = true; this.label44.AutoSize = true;
this.label44.Location = new System.Drawing.Point(199, 65); this.label44.Location = new System.Drawing.Point(271, 62);
this.label44.Name = "label44"; this.label44.Name = "label44";
this.label44.Size = new System.Drawing.Size(119, 13); this.label44.Size = new System.Drawing.Size(119, 13);
this.label44.TabIndex = 54; this.label44.TabIndex = 54;
@ -2185,15 +2260,15 @@
"Top Gear Rally 2", "Top Gear Rally 2",
"Killer Instinct", "Killer Instinct",
"LEGO Racers"}); "LEGO Racers"});
this.Glide_enable_hacks_for_game.Location = new System.Drawing.Point(324, 62); this.Glide_enable_hacks_for_game.Location = new System.Drawing.Point(396, 59);
this.Glide_enable_hacks_for_game.Name = "Glide_enable_hacks_for_game"; this.Glide_enable_hacks_for_game.Name = "Glide_enable_hacks_for_game";
this.Glide_enable_hacks_for_game.Size = new System.Drawing.Size(226, 21); this.Glide_enable_hacks_for_game.Size = new System.Drawing.Size(155, 21);
this.Glide_enable_hacks_for_game.TabIndex = 53; this.Glide_enable_hacks_for_game.TabIndex = 53;
// //
// label43 // label43
// //
this.label43.AutoSize = true; this.label43.AutoSize = true;
this.label43.Location = new System.Drawing.Point(194, 39); this.label43.Location = new System.Drawing.Point(266, 36);
this.label43.Name = "label43"; this.label43.Name = "label43";
this.label43.Size = new System.Drawing.Size(124, 13); this.label43.Size = new System.Drawing.Size(124, 13);
this.label43.TabIndex = 40; this.label43.TabIndex = 40;
@ -2207,7 +2282,7 @@
"Old", "Old",
"New", "New",
"Hybrid"}); "Hybrid"});
this.Glide_swapmode.Location = new System.Drawing.Point(324, 35); this.Glide_swapmode.Location = new System.Drawing.Point(396, 32);
this.Glide_swapmode.Name = "Glide_swapmode"; this.Glide_swapmode.Name = "Glide_swapmode";
this.Glide_swapmode.Size = new System.Drawing.Size(78, 21); this.Glide_swapmode.Size = new System.Drawing.Size(78, 21);
this.Glide_swapmode.TabIndex = 39; this.Glide_swapmode.TabIndex = 39;
@ -2225,7 +2300,7 @@
// //
this.Glide_stipple_pattern.Location = new System.Drawing.Point(92, 272); this.Glide_stipple_pattern.Location = new System.Drawing.Point(92, 272);
this.Glide_stipple_pattern.Name = "Glide_stipple_pattern"; this.Glide_stipple_pattern.Name = "Glide_stipple_pattern";
this.Glide_stipple_pattern.Size = new System.Drawing.Size(36, 20); this.Glide_stipple_pattern.Size = new System.Drawing.Size(78, 20);
this.Glide_stipple_pattern.TabIndex = 37; this.Glide_stipple_pattern.TabIndex = 37;
// //
// label41 // label41
@ -2301,7 +2376,7 @@
"Force point-sampled"}); "Force point-sampled"});
this.Glide_filtering.Location = new System.Drawing.Point(92, 62); this.Glide_filtering.Location = new System.Drawing.Point(92, 62);
this.Glide_filtering.Name = "Glide_filtering"; this.Glide_filtering.Name = "Glide_filtering";
this.Glide_filtering.Size = new System.Drawing.Size(78, 21); this.Glide_filtering.Size = new System.Drawing.Size(138, 21);
this.Glide_filtering.TabIndex = 21; this.Glide_filtering.TabIndex = 21;
// //
// label33 // label33
@ -2359,81 +2434,6 @@
this.toolTip1.ReshowDelay = 100; this.toolTip1.ReshowDelay = 100;
this.toolTip1.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info; this.toolTip1.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;
// //
// Glide_fb_get_info
//
this.Glide_fb_get_info.AutoSize = true;
this.Glide_fb_get_info.Location = new System.Drawing.Point(9, 278);
this.Glide_fb_get_info.Name = "Glide_fb_get_info";
this.Glide_fb_get_info.Size = new System.Drawing.Size(119, 17);
this.Glide_fb_get_info.TabIndex = 23;
this.Glide_fb_get_info.Text = "Get framebuffer info";
this.Glide_fb_get_info.UseVisualStyleBackColor = true;
//
// label39
//
this.label39.AutoSize = true;
this.label39.Location = new System.Drawing.Point(386, 265);
this.label39.Name = "label39";
this.label39.Size = new System.Drawing.Size(47, 13);
this.label39.TabIndex = 42;
this.label39.Text = "Scale Y:";
//
// Glide_scale_y
//
this.Glide_scale_y.Location = new System.Drawing.Point(475, 262);
this.Glide_scale_y.Name = "Glide_scale_y";
this.Glide_scale_y.Size = new System.Drawing.Size(36, 20);
this.Glide_scale_y.TabIndex = 41;
//
// label40
//
this.label40.AutoSize = true;
this.label40.ForeColor = System.Drawing.SystemColors.ControlText;
this.label40.Location = new System.Drawing.Point(386, 239);
this.label40.Name = "label40";
this.label40.Size = new System.Drawing.Size(47, 13);
this.label40.TabIndex = 40;
this.label40.Text = "Scale X:";
//
// Glide_scale_x
//
this.Glide_scale_x.Location = new System.Drawing.Point(475, 236);
this.Glide_scale_x.Name = "Glide_scale_x";
this.Glide_scale_x.Size = new System.Drawing.Size(36, 20);
this.Glide_scale_x.TabIndex = 39;
//
// label38
//
this.label38.AutoSize = true;
this.label38.Location = new System.Drawing.Point(386, 213);
this.label38.Name = "label38";
this.label38.Size = new System.Drawing.Size(48, 13);
this.label38.TabIndex = 38;
this.label38.Text = "Offset Y:";
//
// Glide_offset_y
//
this.Glide_offset_y.Location = new System.Drawing.Point(475, 210);
this.Glide_offset_y.Name = "Glide_offset_y";
this.Glide_offset_y.Size = new System.Drawing.Size(36, 20);
this.Glide_offset_y.TabIndex = 37;
//
// label37
//
this.label37.AutoSize = true;
this.label37.Location = new System.Drawing.Point(386, 187);
this.label37.Name = "label37";
this.label37.Size = new System.Drawing.Size(48, 13);
this.label37.TabIndex = 36;
this.label37.Text = "Offset X:";
//
// Glide_offset_x
//
this.Glide_offset_x.Location = new System.Drawing.Point(475, 184);
this.Glide_offset_x.Name = "Glide_offset_x";
this.Glide_offset_x.Size = new System.Drawing.Size(36, 20);
this.Glide_offset_x.TabIndex = 35;
//
// N64VideoPluginconfig // N64VideoPluginconfig
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

View File

@ -120,6 +120,97 @@ namespace BizHawk.MultiClient
Global.Config.RicePlugin.RenderToTextureOption = RiceRenderToTextureOption_Combo.SelectedIndex; Global.Config.RicePlugin.RenderToTextureOption = RiceRenderToTextureOption_Combo.SelectedIndex;
Global.Config.RicePlugin.ScreenUpdateSettingHack = RiceScreenUpdateSettingHack_Combo.SelectedIndex; Global.Config.RicePlugin.ScreenUpdateSettingHack = RiceScreenUpdateSettingHack_Combo.SelectedIndex;
Global.Config.RicePlugin.EnableHacksForGame = RiceEnableHacksForGame_Combo.SelectedIndex; Global.Config.RicePlugin.EnableHacksForGame = RiceEnableHacksForGame_Combo.SelectedIndex;
Global.Config.GlidePlugin.autodetect_ucode = Glide_autodetect_ucode.Checked;
Global.Config.GlidePlugin.ucode = Glide_ucode.SelectedIndex;
Global.Config.GlidePlugin.flame_corona = Glide_flame_corona.Checked;
Global.Config.GlidePlugin.card_id = Glide_card_id.SelectedIndex;
Global.Config.GlidePlugin.tex_filter = Glide_tex_filter.SelectedIndex;
Global.Config.GlidePlugin.wireframe = Glide_wireframe.Checked;
Global.Config.GlidePlugin.wfmode = Glide_wfmode.SelectedIndex;
Global.Config.GlidePlugin.fast_crc = Glide_fast_crc.Checked;
Global.Config.GlidePlugin.filter_cache = Glide_filter_cache.Checked;
Global.Config.GlidePlugin.unk_as_red = Glide_unk_as_red.Checked;
Global.Config.GlidePlugin.fb_read_always = Glide_fb_read_always.Checked;
Global.Config.GlidePlugin.motionblur = Glide_motionblur.Checked;
Global.Config.GlidePlugin.fb_render = Glide_fb_render.Checked;
Global.Config.GlidePlugin.noditheredalpha = Glide_noditheredalpha.Checked;
Global.Config.GlidePlugin.noglsl = Glide_noglsl.Checked;
Global.Config.GlidePlugin.fbo = Glide_fbo.Checked;
Global.Config.GlidePlugin.disable_auxbuf = Glide_disable_auxbuf.Checked;
Global.Config.GlidePlugin.fb_get_info = Glide_fb_get_info.Checked;
if (InputValidate.IsValidSignedNumber(Glide_offset_x.Text))
Global.Config.GlidePlugin.offset_x = int.Parse(Glide_offset_x.Text);
else
Global.Config.GlidePlugin.offset_x = 0;
if (InputValidate.IsValidSignedNumber(Glide_offset_y.Text))
Global.Config.GlidePlugin.offset_y = int.Parse(Glide_offset_y.Text);
else
Global.Config.GlidePlugin.offset_y = 0;
if (InputValidate.IsValidSignedNumber(Glide_scale_x.Text))
Global.Config.GlidePlugin.scale_x = int.Parse(Glide_scale_x.Text);
else
Global.Config.GlidePlugin.scale_x = 100000;
if (InputValidate.IsValidSignedNumber(Glide_scale_y.Text))
Global.Config.GlidePlugin.scale_y = int.Parse(Glide_scale_y.Text);
else
Global.Config.GlidePlugin.scale_y = 100000;
Global.Config.GlidePlugin.UseDefaultHacks = GlideUseDefaultHacks1.Checked || GlideUseDefaultHacks2.Checked;
Global.Config.GlidePlugin.alt_tex_size = Glide_alt_tex_size.Checked;
Global.Config.GlidePlugin.buff_clear = Glide_buff_clear.Checked;
Global.Config.GlidePlugin.decrease_fillrect_edge = Glide_decrease_fillrect_edge.Checked;
Global.Config.GlidePlugin.detect_cpu_write = Glide_detect_cpu_write.Checked;
Global.Config.GlidePlugin.fb_clear = Glide_fb_clear.Checked;
Global.Config.GlidePlugin.fb_hires = Glide_fb_hires.Checked;
Global.Config.GlidePlugin.fb_read_alpha = Glide_fb_read_alpha.Checked;
Global.Config.GlidePlugin.fb_smart = Glide_fb_smart.Checked;
Global.Config.GlidePlugin.fillcolor_fix = Glide_fillcolor_fix.Checked;
Global.Config.GlidePlugin.fog = Glide_fog.Checked;
Global.Config.GlidePlugin.force_depth_compare = Glide_force_depth_compare.Checked;
Global.Config.GlidePlugin.force_microcheck = Glide_force_microcheck.Checked;
Global.Config.GlidePlugin.fb_hires_buf_clear = Glide_fb_hires_buf_clear.Checked;
Global.Config.GlidePlugin.fb_ignore_aux_copy = Glide_fb_ignore_aux_copy.Checked;
Global.Config.GlidePlugin.fb_ignore_previous = Glide_fb_ignore_previous.Checked;
Global.Config.GlidePlugin.increase_primdepth = Glide_increase_primdepth.Checked;
Global.Config.GlidePlugin.increase_texrect_edge = Glide_increase_texrect_edge.Checked;
Global.Config.GlidePlugin.fb_optimize_texrect = Glide_fb_optimize_texrect.Checked;
Global.Config.GlidePlugin.fb_optimize_write = Glide_fb_optimize_write.Checked;
Global.Config.GlidePlugin.PPL = Glide_PPL.Checked;
Global.Config.GlidePlugin.soft_depth_compare = Glide_soft_depth_compare.Checked;
Global.Config.GlidePlugin.use_sts1_only = Glide_use_sts1_only.Checked;
Global.Config.GlidePlugin.wrap_big_tex = Glide_wrap_big_tex.Checked;
if (InputValidate.IsValidSignedNumber(Glide_depth_bias.Text))
Global.Config.GlidePlugin.depth_bias = int.Parse(Glide_depth_bias.Text);
else
Global.Config.GlidePlugin.depth_bias = 20;
Global.Config.GlidePlugin.filtering = Glide_filtering.SelectedIndex;
if (InputValidate.IsValidSignedNumber(Glide_fix_tex_coord.Text))
Global.Config.GlidePlugin.fix_tex_coord = int.Parse(Glide_fix_tex_coord.Text);
else
Global.Config.GlidePlugin.fix_tex_coord = 0;
Global.Config.GlidePlugin.lodmode = Glide_lodmode.SelectedIndex;
if (InputValidate.IsValidSignedNumber(Glide_stipple_mode.Text))
Global.Config.GlidePlugin.stipple_mode = int.Parse(Glide_stipple_mode.Text);
else
Global.Config.GlidePlugin.stipple_mode = 2;
if (InputValidate.IsValidSignedNumber(Glide_stipple_pattern.Text))
Global.Config.GlidePlugin.stipple_pattern = int.Parse(Glide_stipple_pattern.Text);
else
Global.Config.GlidePlugin.stipple_pattern = 1041204192;
Global.Config.GlidePlugin.swapmode = Glide_swapmode.SelectedIndex;
Global.Config.GlidePlugin.enable_hacks_for_game = Glide_enable_hacks_for_game.SelectedIndex;
} }
private void N64VideoPluginconfig_Load(object sender, EventArgs e) private void N64VideoPluginconfig_Load(object sender, EventArgs e)