Add (Mega) Evolution editors

2 mega evolution choices instead of 3 this time.
This commit is contained in:
Kurt
2016-11-19 22:46:29 -08:00
parent c3378b44b4
commit 061d8d9bfd
9 changed files with 998 additions and 686 deletions

19
pk3DS/Main.Designer.cs generated
View File

@@ -86,6 +86,7 @@ private void InitializeComponent()
this.B_Static = new System.Windows.Forms.Button();
this.Tab_Output = new System.Windows.Forms.TabPage();
this.L_Status = new System.Windows.Forms.Label();
this.B_OWSE = new System.Windows.Forms.Button();
this.menuStrip1.SuspendLayout();
this.TC_RomFS.SuspendLayout();
this.Tab_RomFS.SuspendLayout();
@@ -359,7 +360,7 @@ private void InitializeComponent()
this.Menu_Language.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.CB_Lang});
this.Menu_Language.Name = "Menu_Language";
this.Menu_Language.Size = new System.Drawing.Size(152, 22);
this.Menu_Language.Size = new System.Drawing.Size(146, 22);
this.Menu_Language.Text = "Language";
//
// CB_Lang
@@ -385,14 +386,14 @@ private void InitializeComponent()
this.Menu_About.Name = "Menu_About";
this.Menu_About.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.B)));
this.Menu_About.ShowShortcutKeys = false;
this.Menu_About.Size = new System.Drawing.Size(152, 22);
this.Menu_About.Size = new System.Drawing.Size(146, 22);
this.Menu_About.Text = "A&bout pk3DS";
this.Menu_About.Click += new System.EventHandler(this.L_About_Click);
//
// Menu_GARCs
//
this.Menu_GARCs.Name = "Menu_GARCs";
this.Menu_GARCs.Size = new System.Drawing.Size(152, 22);
this.Menu_GARCs.Size = new System.Drawing.Size(146, 22);
this.Menu_GARCs.Text = "About GARCs";
this.Menu_GARCs.Click += new System.EventHandler(this.L_GARCInfo_Click);
//
@@ -438,6 +439,7 @@ private void InitializeComponent()
this.FLP_RomFS.Controls.Add(this.B_Item);
this.FLP_RomFS.Controls.Add(this.B_Move);
this.FLP_RomFS.Controls.Add(this.B_TitleScreen);
this.FLP_RomFS.Controls.Add(this.B_OWSE);
this.FLP_RomFS.Dock = System.Windows.Forms.DockStyle.Fill;
this.FLP_RomFS.Location = new System.Drawing.Point(3, 3);
this.FLP_RomFS.Name = "FLP_RomFS";
@@ -680,6 +682,16 @@ private void InitializeComponent()
this.L_Status.TabIndex = 14;
this.L_Status.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// B_OWSE
//
this.B_OWSE.Location = new System.Drawing.Point(109, 119);
this.B_OWSE.Name = "B_OWSE";
this.B_OWSE.Size = new System.Drawing.Size(100, 23);
this.B_OWSE.TabIndex = 13;
this.B_OWSE.Text = "Title Screen";
this.B_OWSE.UseVisualStyleBackColor = true;
this.B_OWSE.Click += new System.EventHandler(this.B_OWSE_Click);
//
// Main
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -772,5 +784,6 @@ private void InitializeComponent()
private System.Windows.Forms.Button B_GameText;
private System.Windows.Forms.FlowLayoutPanel FLP_RomFS;
private System.Windows.Forms.Label L_Status;
private System.Windows.Forms.Button B_OWSE;
}
}

View File

@@ -291,7 +291,7 @@ private void toggleSubEditors()
switch (Config.Generation)
{
case 6:
romfs = new Control[] {B_GameText, B_StoryText, B_Personal, B_Evolution, B_LevelUp, B_Wild, B_MegaEvo, B_EggMove, B_Trainer, B_Item, B_Move, B_Maison, B_TitleScreen};
romfs = new Control[] {B_GameText, B_StoryText, B_Personal, B_Evolution, B_LevelUp, B_Wild, B_MegaEvo, B_EggMove, B_Trainer, B_Item, B_Move, B_Maison, B_TitleScreen, B_OWSE};
exefs = new Control[] {B_MoveTutor, B_TMHM, B_Mart, B_Pickup, B_OPower};
cro = new Control[] {B_TypeChart, B_Starter, B_Gift, B_Static};
B_MoveTutor.Visible = Config.ORAS; // Default false unless loaded
@@ -539,50 +539,51 @@ private void B_Trainer_Click(object sender, EventArgs e)
private void B_Wild_Click(object sender, EventArgs e)
{
if (threadActive()) return;
bool advanced = (ModifierKeys == Keys.Alt) || ModifierKeys == (Keys.Alt | Keys.Control);
bool reload = (ModifierKeys == Keys.Control) || ModifierKeys == (Keys.Alt | Keys.Control);
new Thread(() =>
{
if (Config.SM)
string[] files;
Action action;
switch (Config.Generation)
{
string[] files = {"encdata", "zonedata"};
fileGet(files, false);
Invoke((Action)(() => new SMWE().ShowDialog()));
fileSet(files);
}
else
{
if (advanced)
{
string[] files = { "encdata", "storytext", "mapGR", "mapMatrix" };
if (reload || files.Sum(t => Directory.Exists(t) ? 0 : 1) != 0) // Dev bypass if all exist already
fileGet(files, false);
// Only want to set back encdata.
case 6:
files = new[] { "encdata" };
Invoke((MethodInvoker)delegate { Enabled = false; });
{
Invoke((Action)(() => new TextEditor(Directory.GetFiles("storytext")).Show()));
Invoke((Action)(() => new OWSE().Show()));
while (Application.OpenForms.Count > 1)
Thread.Sleep(200);
}
Invoke((MethodInvoker)delegate { Enabled = true; });
fileSet(files);
}
else
{
string[] files = { "encdata" };
fileGet(files, false);
if (Config.ORAS)
{ Invoke((Action)(() => new RSWE().ShowDialog())); }
action = () => new RSWE().ShowDialog();
else if (Config.XY)
{ Invoke((Action)(() => new XYWE().ShowDialog())); }
fileSet(files);
}
action = () => new XYWE().ShowDialog();
else return;
break;
case 7:
files = new [] { "encdata", "zonedata" };
action = () => new SMWE().ShowDialog();
break;
default:
return;
}
fileGet(files, false);
Invoke(action);
fileSet(files);
}).Start();
}
private void B_OWSE_Click(object sender, EventArgs e)
{
bool reload = (ModifierKeys == Keys.Control) || ModifierKeys == (Keys.Alt | Keys.Control);
string[] files = { "encdata", "storytext", "mapGR", "mapMatrix" };
if (reload || files.Sum(t => Directory.Exists(t) ? 0 : 1) != 0) // Dev bypass if all exist already
fileGet(files, false);
// Only want to set back encdata.
files = new[] { "encdata" };
Invoke((MethodInvoker)delegate { Enabled = false; });
{
Invoke((Action)(() => new TextEditor(Directory.GetFiles("storytext")).Show()));
Invoke((Action)(() => new OWSE().Show()));
while (Application.OpenForms.Count > 1)
Thread.Sleep(200);
}
Invoke((MethodInvoker)delegate { Enabled = true; });
fileSet(files);
}
private void B_Evolution_Click(object sender, EventArgs e)
{
if (threadActive()) return;
@@ -590,7 +591,15 @@ private void B_Evolution_Click(object sender, EventArgs e)
{
string[] files = { "evolution" };
fileGet(files);
Invoke((Action)(() => new EvolutionEditor6().ShowDialog()));
switch (Config.Generation)
{
case 6:
Invoke((Action)(() => new EvolutionEditor6().ShowDialog()));
break;
case 7:
Invoke((Action)(() => new EvolutionEditor7().ShowDialog()));
break;
}
fileSet(files);
}).Start();
}
@@ -601,6 +610,15 @@ private void B_MegaEvo_Click(object sender, EventArgs e)
{
string[] files = { "megaevo" };
fileGet(files);
switch (Config.Generation)
{
case 6:
Invoke((Action)(() => new MegaEvoEditor6().ShowDialog()));
break;
case 7:
Invoke((Action)(() => new MegaEvoEditor7().ShowDialog()));
break;
}
Invoke((Action)(() => new MegaEvoEditor6().ShowDialog()));
fileSet(files);
}).Start();

View File

@@ -20,27 +20,28 @@ public abstract class EvolutionSet
}
public class EvolutionSet6 : EvolutionSet
{
private const int SIZE = 6;
private const int ENTRY_SIZE = 6;
private const int ENTRY_COUNT = 8;
public const int SIZE = ENTRY_COUNT * ENTRY_SIZE;
public EvolutionSet6(byte[] data)
{
if (data.Length < SIZE || data.Length % SIZE != 0) return;
int[] argEvos = { 6, 8, 16, 17, 18, 19, 20, 21, 22, 29, 30, 31, 32, 33, 34 };
PossibleEvolutions = new EvolutionMethod[data.Length / SIZE];
for (int i = 0; i < data.Length; i += SIZE)
if (data.Length != SIZE) return;
//int[] argEvos = { 6, 8, 16, 17, 18, 19, 20, 21, 22, 29, 30, 31, 32, 33, 34 };
PossibleEvolutions = new EvolutionMethod[ENTRY_COUNT];
for (int i = 0; i < data.Length; i += ENTRY_SIZE)
{
PossibleEvolutions[i / SIZE] = new EvolutionMethod
PossibleEvolutions[i / ENTRY_SIZE] = new EvolutionMethod
{
Method = BitConverter.ToUInt16(data, i + 0),
Argument = BitConverter.ToUInt16(data, i + 2),
Species = BitConverter.ToUInt16(data, i + 4),
// Copy
Level = BitConverter.ToUInt16(data, i + 2),
//Level = BitConverter.ToUInt16(data, i + 2),
};
// Argument is used by both Level argument and Item/Move/etc. Clear if appropriate.
if (argEvos.Contains(PossibleEvolutions[i / SIZE].Method))
PossibleEvolutions[i / SIZE].Level = 0;
//if (argEvos.Contains(PossibleEvolutions[i / SIZE].Method))
// PossibleEvolutions[i / SIZE].Level = 0;
}
}
public override byte[] Write()
@@ -60,14 +61,16 @@ public override byte[] Write()
}
public class EvolutionSet7 : EvolutionSet
{
private const int SIZE = 8;
private const int ENTRY_SIZE = 8;
private const int ENTRY_COUNT = 8;
public const int SIZE = ENTRY_COUNT * ENTRY_SIZE;
public EvolutionSet7(byte[] data)
{
if (data.Length < SIZE || data.Length % SIZE != 0) return;
PossibleEvolutions = new EvolutionMethod[data.Length / SIZE];
for (int i = 0; i < data.Length; i += SIZE)
if (data.Length != SIZE) return;
PossibleEvolutions = new EvolutionMethod[ENTRY_COUNT];
for (int i = 0; i < data.Length; i += ENTRY_SIZE)
{
PossibleEvolutions[i / SIZE] = new EvolutionMethod
PossibleEvolutions[i / ENTRY_SIZE] = new EvolutionMethod
{
Method = BitConverter.ToUInt16(data, i + 0),
Argument = BitConverter.ToUInt16(data, i + 2),

View File

@@ -86,12 +86,12 @@ public EvolutionEditor6()
private readonly string[] itemlist = Main.getText(TextName.ItemNames);
private readonly string[] typelist = Main.getText(TextName.Types);
private bool dumping;
private EvolutionSet evo = new EvolutionSet6(new byte[0x30]);
private EvolutionSet evo = new EvolutionSet6(new byte[EvolutionSet6.SIZE]);
private void getList()
{
entry = Array.IndexOf(specieslist, CB_Species.Text);
byte[] input = File.ReadAllBytes(files[entry]);
if (input.Length != 0x30) return; // error
if (input.Length != EvolutionSet6.SIZE) return; // error
evo = new EvolutionSet6(input);
for (int i = 0; i < evo.PossibleEvolutions.Length; i++)

File diff suppressed because it is too large Load Diff

View File

@@ -16,7 +16,9 @@ public EvolutionEditor7()
InitializeComponent();
specieslist[0] = movelist[0] = itemlist[0] = "";
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID);
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID + 1);
string[][] AltForms = Main.Config.Personal.getFormList(specieslist, Main.Config.MaxSpeciesID);
specieslist = Main.Config.Personal.getPersonalEntryList(AltForms, specieslist, Main.Config.MaxSpeciesID, out baseForms, out formVal);
string[] evolutionMethods =
{
@@ -65,10 +67,12 @@ public EvolutionEditor7()
mb = new[] { CB_M1, CB_M2, CB_M3, CB_M4, CB_M5, CB_M6, CB_M7, CB_M8 };
pb = new[] { CB_P1, CB_P2, CB_P3, CB_P4, CB_P5, CB_P6, CB_P7, CB_P8 };
rb = new[] { CB_I1, CB_I2, CB_I3, CB_I4, CB_I5, CB_I6, CB_I7, CB_I8 };
fb = new[] { NUD_F1, NUD_F2, NUD_F3, NUD_F4, NUD_F5, NUD_F6, NUD_F7, NUD_F8 };
lb = new[] { NUD_L1, NUD_L2, NUD_L3, NUD_L4, NUD_L5, NUD_L6, NUD_L7, NUD_L8 };
pic = new[] { PB_1, PB_2, PB_3, PB_4, PB_5, PB_6, PB_7, PB_8 };
foreach (ComboBox cb in mb) { foreach (string s in evolutionMethods) cb.Items.Add(s); }
foreach (ComboBox cb in rb) { foreach (string s in specieslist) cb.Items.Add(s); }
foreach (ComboBox cb in mb) { cb.Items.AddRange(evolutionMethods); }
foreach (ComboBox cb in rb) { cb.Items.AddRange(specieslist.Take(Main.Config.MaxSpeciesID+1).ToArray()); }
sortedspecies = (string[])specieslist.Clone();
Array.Sort(sortedspecies);
@@ -80,9 +84,8 @@ public EvolutionEditor7()
CB_Species.SelectedIndex = 0;
}
private readonly string[] files = Directory.GetFiles("evolution");
private readonly ComboBox[] pb;
private readonly ComboBox[] rb;
private readonly ComboBox[] mb;
private readonly ComboBox[] pb, mb, rb;
private readonly NumericUpDown[] fb, lb;
private readonly PictureBox[] pic;
private int entry = -1;
private readonly string[] sortedspecies;
@@ -90,22 +93,28 @@ public EvolutionEditor7()
private readonly string[] movelist = Main.getText(TextName.MoveNames);
private readonly string[] itemlist = Main.getText(TextName.ItemNames);
private readonly string[] typelist = Main.getText(TextName.Types);
private bool dumping;
private EvolutionSet evo = new EvolutionSet6(new byte[0x30]);
private bool dumping, loading;
private readonly int[] baseForms, formVal;
private EvolutionSet evo = new EvolutionSet7(new byte[EvolutionSet7.SIZE]);
private void getList()
{
entry = Array.IndexOf(specieslist, CB_Species.Text);
byte[] input = File.ReadAllBytes(files[entry]);
if (input.Length != 0x30) return; // error
evo = new EvolutionSet6(input);
if (input.Length != EvolutionSet7.SIZE) return; // error
evo = new EvolutionSet7(input);
for (int i = 0; i < evo.PossibleEvolutions.Length; i++)
{
if (evo.PossibleEvolutions[i].Method > 34) return; // Invalid!
if (evo.PossibleEvolutions[i].Method > 39) return; // Invalid!
loading = true;
fb[i].Value = evo.PossibleEvolutions[i].Form;
lb[i].Value = evo.PossibleEvolutions[i].Level;
mb[i].SelectedIndex = evo.PossibleEvolutions[i].Method; // Which will trigger the params cb to reload the valid params list
pb[i].SelectedIndex = evo.PossibleEvolutions[i].Argument;
rb[i].SelectedIndex = evo.PossibleEvolutions[i].Species;
rb[i].SelectedIndex = evo.PossibleEvolutions[i].Species; // Triggers sprite to reload
loading = false;
changeInto(rb[i], null); // refresh sprite
}
}
private void setList()
@@ -114,9 +123,11 @@ private void setList()
for (int i = 0; i < 8; i++)
{
evo.PossibleEvolutions[i].Species = rb[i].SelectedIndex;
evo.PossibleEvolutions[i].Method = mb[i].SelectedIndex;
evo.PossibleEvolutions[i].Argument = pb[i].SelectedIndex;
evo.PossibleEvolutions[i].Species = rb[i].SelectedIndex;
evo.PossibleEvolutions[i].Form = (sbyte)fb[i].Value;
evo.PossibleEvolutions[i].Level = (int)lb[i].Value;
}
File.WriteAllBytes(files[entry], evo.Write());
}
@@ -128,7 +139,6 @@ private void changeEntry(object sender, EventArgs e)
}
private static int[] sL; // Random Species List
private byte[][] personal;
private void B_RandAll_Click(object sender, EventArgs e)
{
if (DialogResult.Yes != Util.Prompt(MessageBoxButtons.YesNo, "Randomize all resulting species?", "Evolution methods and parameters will stay the same.")) return;
@@ -137,14 +147,6 @@ private void B_RandAll_Click(object sender, EventArgs e)
bool rBST = CHK_BST.Checked;
bool rEXP = CHK_Exp.Checked;
bool rType = CHK_Type.Checked;
if (rBST || rEXP || rType)
{
// initialize personal data
string[] personalList = Directory.GetFiles("personal");
personal = new byte[personalList.Length][];
for (int i = 0; i < personalList.Length; i++)
personal[i] = File.ReadAllBytes("personal" + Path.DirectorySeparatorChar + i.ToString("000") + ".bin");
}
int ctr = 0;
sL = Randomizer.RandomSpeciesList;
@@ -200,7 +202,7 @@ private void B_Dump_Click(object sender, EventArgs e)
string result = "";
for (int i = 0; i < CB_Species.Items.Count; i++)
{
CB_Species.SelectedIndex = i; // Get new Species
CB_Species.Text = specieslist[i]; // Get new Species
result += "======" + Environment.NewLine + entry + " " + CB_Species.Text + Environment.NewLine + "======" + Environment.NewLine;
for (int j = 0; j < 8; j++)
{
@@ -208,7 +210,18 @@ private void B_Dump_Click(object sender, EventArgs e)
// int param = pb[j].SelectedIndex;
int poke = rb[j].SelectedIndex;
if (poke > 0 && methodval > 0)
result += mb[j].Text + (pb[j].Visible ? " [" + pb[j].Text + "]" : "") + " into " + rb[j].Text + Environment.NewLine;
{
string species = rb[j].Text;
int bf = formVal[entry];
string param = pb[j].Visible ? " [" + pb[j].Text + "]" : "";
if (lb[j].Value > 0)
param += $"@ level {lb[j].Value}";
string method = mb[j].Text;
int f = fb[j].Value == -1 ? bf : (int)fb[j].Value;
string form = f == 0 ? "" : "-" + f;
result += $"{method} {param} into {species}{form}".Replace(" ", " ") + Environment.NewLine;
}
}
result += Environment.NewLine;
@@ -244,10 +257,11 @@ private void changeMethod(object sender, EventArgs e)
1, // 33 - Level @ Night
1, // 34 - Gender Branch
1, // 35 - UNUSED
1, 1, 1, // Version Specific
7, 7, 7, // Version Specific
1,
};
pb[op].Visible = pic[op].Visible = rb[op].Visible = mb[op].SelectedIndex > 0;
pb[op].Visible = pic[op].Visible = rb[op].Visible = fb[op].Visible = lb[op].Visible = mb[op].SelectedIndex > 0;
pb[op].Items.Clear();
int cv = methodCase[mb[op].SelectedIndex];
@@ -256,7 +270,7 @@ private void changeMethod(object sender, EventArgs e)
case 0: // No Parameter Required
{ pb[op].Visible = false; pb[op].Items.Add(""); break; }
case 1: // Level
{ for (int i = 0; i <= 100; i++) pb[op].Items.Add(i.ToString()); break; }
{ pb[op].Visible = false; pb[op].Items.Add(""); break; }
case 2: // Items
{ foreach (string t in itemlist) pb[op].Items.Add(t); break; }
case 3: // Moves
@@ -267,12 +281,22 @@ private void changeMethod(object sender, EventArgs e)
{ for (int i = 0; i <= 255; i++) pb[op].Items.Add(i.ToString()); break; }
case 6:
{ foreach (string t in typelist) pb[op].Items.Add(t); break; }
case 7: // Version
{ for (int i = 0; i <= 255; i++) pb[op].Items.Add(i.ToString()); break; }
}
pb[op].SelectedIndex = 0;
}
private void changeInto(object sender, EventArgs e)
{
pic[Array.IndexOf(rb, sender as ComboBox)].Image = (Bitmap)Resources.ResourceManager.GetObject("_" + Array.IndexOf(specieslist, (sender as ComboBox).Text));
if (loading || dumping)
return;
int index = sender is ComboBox ? Array.IndexOf(rb, sender) : Array.IndexOf(fb, sender);
int species = Array.IndexOf(specieslist, rb[index].Text);
int form = (int)fb[index].Value;
if (form == -1)
form = baseForms[species];
pic[index].Image = Util.getSprite(species, form, 0, 0);
}
}
}

View File

@@ -47,15 +47,6 @@ private void InitializeComponent()
this.CHK_MEvo1 = new System.Windows.Forms.CheckBox();
this.CHK_MEvo2 = new System.Windows.Forms.CheckBox();
this.CB_Species = new System.Windows.Forms.ComboBox();
this.GB_MEvo3 = new System.Windows.Forms.GroupBox();
this.LBL_Into3 = new System.Windows.Forms.Label();
this.PB_M3 = new System.Windows.Forms.PictureBox();
this.CB_Forme3 = new System.Windows.Forms.ComboBox();
this.PB_S3 = new System.Windows.Forms.PictureBox();
this.CB_Item3 = new System.Windows.Forms.ComboBox();
this.LBL_Forme3 = new System.Windows.Forms.Label();
this.LBL_Item3 = new System.Windows.Forms.Label();
this.CHK_MEvo3 = new System.Windows.Forms.CheckBox();
this.bpkx = new System.Windows.Forms.PictureBox();
this.B_Dump = new System.Windows.Forms.Button();
this.GB_MEvo1.SuspendLayout();
@@ -64,9 +55,6 @@ private void InitializeComponent()
this.GB_MEvo2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.PB_M2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PB_S2)).BeginInit();
this.GB_MEvo3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.PB_M3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PB_S3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx)).BeginInit();
this.SuspendLayout();
//
@@ -275,103 +263,6 @@ private void InitializeComponent()
this.CB_Species.TabIndex = 15;
this.CB_Species.SelectedIndexChanged += new System.EventHandler(this.changeIndex);
//
// GB_MEvo3
//
this.GB_MEvo3.Controls.Add(this.LBL_Into3);
this.GB_MEvo3.Controls.Add(this.PB_M3);
this.GB_MEvo3.Controls.Add(this.CB_Forme3);
this.GB_MEvo3.Controls.Add(this.PB_S3);
this.GB_MEvo3.Controls.Add(this.CB_Item3);
this.GB_MEvo3.Controls.Add(this.LBL_Forme3);
this.GB_MEvo3.Controls.Add(this.LBL_Item3);
this.GB_MEvo3.Enabled = false;
this.GB_MEvo3.Location = new System.Drawing.Point(276, 62);
this.GB_MEvo3.Name = "GB_MEvo3";
this.GB_MEvo3.Size = new System.Drawing.Size(126, 142);
this.GB_MEvo3.TabIndex = 13;
this.GB_MEvo3.TabStop = false;
this.GB_MEvo3.Text = "Evolution 3";
//
// LBL_Into3
//
this.LBL_Into3.AutoSize = true;
this.LBL_Into3.Location = new System.Drawing.Point(48, 117);
this.LBL_Into3.Name = "LBL_Into3";
this.LBL_Into3.Size = new System.Drawing.Size(28, 13);
this.LBL_Into3.TabIndex = 36;
this.LBL_Into3.Text = "Into:";
//
// PB_M3
//
this.PB_M3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.PB_M3.Location = new System.Drawing.Point(79, 106);
this.PB_M3.Name = "PB_M3";
this.PB_M3.Size = new System.Drawing.Size(42, 32);
this.PB_M3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.PB_M3.TabIndex = 35;
this.PB_M3.TabStop = false;
//
// CB_Forme3
//
this.CB_Forme3.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.CB_Forme3.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_Forme3.FormattingEnabled = true;
this.CB_Forme3.Location = new System.Drawing.Point(3, 82);
this.CB_Forme3.Name = "CB_Forme3";
this.CB_Forme3.Size = new System.Drawing.Size(121, 21);
this.CB_Forme3.TabIndex = 20;
this.CB_Forme3.SelectedIndexChanged += new System.EventHandler(this.Update_PBs);
//
// PB_S3
//
this.PB_S3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.PB_S3.Location = new System.Drawing.Point(3, 106);
this.PB_S3.Name = "PB_S3";
this.PB_S3.Size = new System.Drawing.Size(42, 32);
this.PB_S3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.PB_S3.TabIndex = 34;
this.PB_S3.TabStop = false;
//
// CB_Item3
//
this.CB_Item3.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.CB_Item3.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_Item3.FormattingEnabled = true;
this.CB_Item3.Location = new System.Drawing.Point(3, 36);
this.CB_Item3.Name = "CB_Item3";
this.CB_Item3.Size = new System.Drawing.Size(121, 21);
this.CB_Item3.TabIndex = 18;
this.CB_Item3.SelectedValueChanged += new System.EventHandler(this.Update_PBs);
//
// LBL_Forme3
//
this.LBL_Forme3.AutoSize = true;
this.LBL_Forme3.Location = new System.Drawing.Point(6, 65);
this.LBL_Forme3.Name = "LBL_Forme3";
this.LBL_Forme3.Size = new System.Drawing.Size(85, 13);
this.LBL_Forme3.TabIndex = 10;
this.LBL_Forme3.Text = "Alt Forme (if any)";
//
// LBL_Item3
//
this.LBL_Item3.AutoSize = true;
this.LBL_Item3.Location = new System.Drawing.Point(6, 20);
this.LBL_Item3.Name = "LBL_Item3";
this.LBL_Item3.Size = new System.Drawing.Size(27, 13);
this.LBL_Item3.TabIndex = 9;
this.LBL_Item3.Text = "Item";
//
// CHK_MEvo3
//
this.CHK_MEvo3.AutoSize = true;
this.CHK_MEvo3.Location = new System.Drawing.Point(285, 39);
this.CHK_MEvo3.Name = "CHK_MEvo3";
this.CHK_MEvo3.Size = new System.Drawing.Size(65, 17);
this.CHK_MEvo3.TabIndex = 16;
this.CHK_MEvo3.Text = "Enabled";
this.CHK_MEvo3.UseVisualStyleBackColor = true;
this.CHK_MEvo3.CheckedChanged += new System.EventHandler(this.CHK_Changed);
//
// bpkx
//
this.bpkx.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
@@ -384,7 +275,7 @@ private void InitializeComponent()
//
// B_Dump
//
this.B_Dump.Location = new System.Drawing.Point(327, 5);
this.B_Dump.Location = new System.Drawing.Point(199, 10);
this.B_Dump.Name = "B_Dump";
this.B_Dump.Size = new System.Drawing.Size(75, 23);
this.B_Dump.TabIndex = 18;
@@ -392,24 +283,22 @@ private void InitializeComponent()
this.B_Dump.UseVisualStyleBackColor = true;
this.B_Dump.Click += new System.EventHandler(this.B_Dump_Click);
//
// MEE
// MegaEvoEditor7
//
this.AllowDrop = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(414, 212);
this.ClientSize = new System.Drawing.Size(284, 211);
this.Controls.Add(this.B_Dump);
this.Controls.Add(this.CHK_MEvo3);
this.Controls.Add(this.GB_MEvo3);
this.Controls.Add(this.CB_Species);
this.Controls.Add(this.CHK_MEvo2);
this.Controls.Add(this.CHK_MEvo1);
this.Controls.Add(this.GB_MEvo2);
this.Controls.Add(this.GB_MEvo1);
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(430, 250);
this.MinimumSize = new System.Drawing.Size(430, 250);
this.Name = "MegaEvoEditor6";
this.MaximumSize = new System.Drawing.Size(300, 250);
this.MinimumSize = new System.Drawing.Size(300, 250);
this.Name = "MegaEvoEditor7";
this.Text = "Mega Evo Editor";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.formClosing);
this.GB_MEvo1.ResumeLayout(false);
@@ -420,10 +309,6 @@ private void InitializeComponent()
this.GB_MEvo2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.PB_M2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.PB_S2)).EndInit();
this.GB_MEvo3.ResumeLayout(false);
this.GB_MEvo3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.PB_M3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.PB_S3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bpkx)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -441,26 +326,17 @@ private void InitializeComponent()
private System.Windows.Forms.CheckBox CHK_MEvo1;
private System.Windows.Forms.CheckBox CHK_MEvo2;
private System.Windows.Forms.ComboBox CB_Species;
private System.Windows.Forms.GroupBox GB_MEvo3;
private System.Windows.Forms.Label LBL_Forme3;
private System.Windows.Forms.Label LBL_Item3;
private System.Windows.Forms.CheckBox CHK_MEvo3;
private System.Windows.Forms.ComboBox CB_Item1;
private System.Windows.Forms.ComboBox CB_Item2;
private System.Windows.Forms.ComboBox CB_Item3;
private System.Windows.Forms.ComboBox CB_Forme1;
private System.Windows.Forms.ComboBox CB_Forme2;
private System.Windows.Forms.ComboBox CB_Forme3;
private System.Windows.Forms.PictureBox PB_M1;
private System.Windows.Forms.PictureBox PB_S1;
private System.Windows.Forms.PictureBox PB_M2;
private System.Windows.Forms.PictureBox PB_S2;
private System.Windows.Forms.PictureBox PB_M3;
private System.Windows.Forms.PictureBox PB_S3;
private System.Windows.Forms.PictureBox bpkx;
private System.Windows.Forms.Label LBL_Into1;
private System.Windows.Forms.Label LBL_Into2;
private System.Windows.Forms.Label LBL_Into3;
private System.Windows.Forms.Button B_Dump;
}
}

View File

@@ -34,16 +34,16 @@ public partial class MegaEvoEditor7 : Form
CB_Species.ValueMember = "Value";
#region Intializations
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID);
Array.Resize(ref specieslist, Main.Config.MaxSpeciesID + 1);
specieslist[0] = itemlist[0] = "";
specieslist[32] += "♂"; specieslist[29] += "♀";
AltForms = Main.Config.Personal.getFormList(specieslist, Main.Config.MaxSpeciesID);
groupbox_spec = new[] { GB_MEvo1, GB_MEvo2, GB_MEvo3 };
item_spec = new[] { CB_Item1, CB_Item2, CB_Item3 };
forme_spec = new[] { CB_Forme1, CB_Forme2, CB_Forme3 };
checkbox_spec = new[] { CHK_MEvo1, CHK_MEvo2, CHK_MEvo3 };
picturebox_spec = new[] { new[] { PB_S1, PB_S2, PB_S3 }, new[] { PB_M1, PB_M2, PB_M3 } };
groupbox_spec = new[] { GB_MEvo1, GB_MEvo2 };
item_spec = new[] { CB_Item1, CB_Item2 };
forme_spec = new[] { CB_Forme1, CB_Forme2 };
checkbox_spec = new[] { CHK_MEvo1, CHK_MEvo2 };
picturebox_spec = new[] { new[] { PB_S1, PB_S2 }, new[] { PB_M1, PB_M2 } };
#endregion
Setup();
CB_Species.SelectedIndex = 0;
@@ -112,7 +112,7 @@ private void getEntry()
PersonalEditor6.setForms(entry, CB, AltForms);
me = new MegaEvolutions(data);
for (int i = 0; i < 3; i++)
for (int i = 0; i < 2; i++)
{
checkbox_spec[i].Checked = me.Method[i] == 1;
item_spec[i].SelectedValue = (int)me.Argument[i];
@@ -122,7 +122,7 @@ private void getEntry()
private void setEntry()
{
if (entry < 1 || entry == 384) return; // Don't edit invalid / Rayquaza.
for (int i = 0; i < 3; i++)
for (int i = 0; i < 2; i++)
{
if (me.Method[i] > 1)
return; // Shouldn't hit this.
@@ -194,7 +194,7 @@ private void B_Dump_Click(object sender, EventArgs e)
CB_Species.SelectedValue = i; // Get new Species
string header = "======" + Environment.NewLine + entry + " " + CB_Species.Text + Environment.NewLine + "======" + Environment.NewLine;
bool headered = false;
for (int j = 0; j < 3; j++)
for (int j = 0; j < 2; j++)
{
if (!checkbox_spec[j].Checked) continue;
if (!headered) { result += header; headered = true; }

View File

@@ -99,6 +99,12 @@
<Compile Include="Subforms\Gen7\EggMoveEditor7.Designer.cs">
<DependentUpon>EggMoveEditor7.cs</DependentUpon>
</Compile>
<Compile Include="Subforms\Gen7\EvolutionEditor7.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Subforms\Gen7\EvolutionEditor7.Designer.cs">
<DependentUpon>EvolutionEditor7.cs</DependentUpon>
</Compile>
<Compile Include="Subforms\Gen7\ItemEditor7.cs">
<SubType>Form</SubType>
</Compile>
@@ -111,6 +117,12 @@
<Compile Include="Subforms\Gen7\LevelUpEditor7.Designer.cs">
<DependentUpon>LevelUpEditor7.cs</DependentUpon>
</Compile>
<Compile Include="Subforms\Gen7\MegaEvoEditor7.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Subforms\Gen7\MegaEvoEditor7.Designer.cs">
<DependentUpon>MegaEvoEditor7.cs</DependentUpon>
</Compile>
<Compile Include="Subforms\Gen7\MoveEditor7.cs">
<SubType>Form</SubType>
</Compile>
@@ -343,12 +355,18 @@
<EmbeddedResource Include="Subforms\Gen7\EggMoveEditor7.resx">
<DependentUpon>EggMoveEditor7.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Subforms\Gen7\EvolutionEditor7.resx">
<DependentUpon>EvolutionEditor7.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Subforms\Gen7\ItemEditor7.resx">
<DependentUpon>ItemEditor7.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Subforms\Gen7\LevelUpEditor7.resx">
<DependentUpon>LevelUpEditor7.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Subforms\Gen7\MegaEvoEditor7.resx">
<DependentUpon>MegaEvoEditor7.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Subforms\Gen7\MoveEditor7.resx">
<DependentUpon>MoveEditor7.cs</DependentUpon>
</EmbeddedResource>