gb: implement new CGB color preset "GBA"
This commit is contained in:
parent
7114ecd914
commit
e69307276c
|
@ -103,13 +103,29 @@ namespace BizHawk.Emulation.Consoles.GB
|
|||
return c.Bit5to8Good();
|
||||
}
|
||||
|
||||
// possibly represents a GBA screen, more or less
|
||||
// but probably not (black point?)
|
||||
static int GBAGamma(int input)
|
||||
{
|
||||
return (int)Math.Round(Math.Pow(input / 31.0, 3.5 / 2.2) * 255.0);
|
||||
}
|
||||
public static Triple GBAColor(Triple c)
|
||||
{
|
||||
Triple ret;
|
||||
ret.r = GBAGamma(c.r);
|
||||
ret.g = GBAGamma(c.g);
|
||||
ret.b = GBAGamma(c.b);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public enum ColorType
|
||||
{
|
||||
gambatte,
|
||||
vivid,
|
||||
vbavivid,
|
||||
vbagbnew,
|
||||
vgabgbold
|
||||
vbabgbold,
|
||||
gba
|
||||
};
|
||||
|
||||
public static int[] GetLut(ColorType c)
|
||||
|
@ -121,7 +137,8 @@ namespace BizHawk.Emulation.Consoles.GB
|
|||
case ColorType.vivid: f = UltraVividColor; break;
|
||||
case ColorType.vbavivid: f = VividVBAColor; break;
|
||||
case ColorType.vbagbnew: f = NewVBAColor; break;
|
||||
case ColorType.vgabgbold: f = OldVBAColor; break;
|
||||
case ColorType.vbabgbold: f = OldVBAColor; break;
|
||||
case ColorType.gba: f = GBAColor; break;
|
||||
}
|
||||
int[] ret = new int[32768];
|
||||
int i = 0;
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
private void InitializeComponent()
|
||||
{
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.radioButton6 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton5 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton3 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton4 = new System.Windows.Forms.RadioButton();
|
||||
|
@ -44,6 +45,7 @@
|
|||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.radioButton6);
|
||||
this.groupBox1.Controls.Add(this.radioButton5);
|
||||
this.groupBox1.Controls.Add(this.radioButton3);
|
||||
this.groupBox1.Controls.Add(this.radioButton4);
|
||||
|
@ -51,11 +53,23 @@
|
|||
this.groupBox1.Controls.Add(this.radioButton1);
|
||||
this.groupBox1.Location = new System.Drawing.Point(12, 12);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(132, 132);
|
||||
this.groupBox1.Size = new System.Drawing.Size(132, 182);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Preset Select";
|
||||
//
|
||||
// radioButton6
|
||||
//
|
||||
this.radioButton6.AutoSize = true;
|
||||
this.radioButton6.Location = new System.Drawing.Point(6, 134);
|
||||
this.radioButton6.Name = "radioButton6";
|
||||
this.radioButton6.Size = new System.Drawing.Size(47, 17);
|
||||
this.radioButton6.TabIndex = 3;
|
||||
this.radioButton6.TabStop = true;
|
||||
this.radioButton6.Text = "GBA";
|
||||
this.radioButton6.UseVisualStyleBackColor = true;
|
||||
this.radioButton6.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
|
||||
//
|
||||
// radioButton5
|
||||
//
|
||||
this.radioButton5.AutoSize = true;
|
||||
|
@ -187,5 +201,6 @@
|
|||
private BmpView bmpView1;
|
||||
private System.Windows.Forms.Button buttonOK;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.RadioButton radioButton6;
|
||||
}
|
||||
}
|
|
@ -23,7 +23,8 @@ namespace BizHawk.MultiClient.GBtools
|
|||
case GBColors.ColorType.vivid: radioButton2.Checked = true; break;
|
||||
case GBColors.ColorType.vbavivid: radioButton3.Checked = true; break;
|
||||
case GBColors.ColorType.vbagbnew: radioButton4.Checked = true; break;
|
||||
case GBColors.ColorType.vgabgbold: radioButton5.Checked = true; break;
|
||||
case GBColors.ColorType.vbabgbold: radioButton5.Checked = true; break;
|
||||
case GBColors.ColorType.gba: radioButton6.Checked = true; break;
|
||||
}
|
||||
}
|
||||
GBColors.ColorType type;
|
||||
|
@ -65,7 +66,9 @@ namespace BizHawk.MultiClient.GBtools
|
|||
if (sender == radioButton4)
|
||||
type = GBColors.ColorType.vbagbnew;
|
||||
if (sender == radioButton5)
|
||||
type = GBColors.ColorType.vgabgbold;
|
||||
type = GBColors.ColorType.vbabgbold;
|
||||
if (sender == radioButton6)
|
||||
type = GBColors.ColorType.gba;
|
||||
if ((sender as RadioButton).Checked)
|
||||
RefreshType();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue