Skip to content

Commit

Permalink
Updated again
Browse files Browse the repository at this point in the history
  • Loading branch information
CatmanFan committed Mar 13, 2024
1 parent b079a6d commit 4579f3b
Show file tree
Hide file tree
Showing 35 changed files with 819 additions and 431 deletions.
11 changes: 11 additions & 0 deletions FriishProduce/FriishProduce.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,15 @@
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Subforms\Options_Flash.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Subforms\Options_Flash.Designer.cs">
<DependentUpon>Options_Flash.cs</DependentUpon>
</Compile>
<Compile Include="_classes\Injectors\Flash.cs" />
<Compile Include="_classes\Injectors\Forwarder.cs" />
<Compile Include="_classes\ROM\Disc.cs" />
<Compile Include="_classes\ROM\Flash.cs" />
<Compile Include="_classes\Injectors\WiiVC\MSX.cs" />
<Compile Include="_classes\Language.cs" />
Expand Down Expand Up @@ -277,6 +284,9 @@
<EmbeddedResource Include="Subforms\ContentOptions.resx">
<DependentUpon>ContentOptions.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Subforms\Options_Flash.resx">
<DependentUpon>Options_Flash.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Subforms\Options_VC_SEGA.resx">
<DependentUpon>Options_VC_SEGA.cs</DependentUpon>
</EmbeddedResource>
Expand Down Expand Up @@ -320,6 +330,7 @@
<ItemGroup>
<Content Include="Database.xml" />
<Content Include="icon.ico" />
<None Include="Resources\icons\consoles\sony playstation.ico" />
<None Include="Resources\icons\msx.png" />
<None Include="Resources\icons\globe-model.png" />
<EmbeddedResource Include="Strings\en.xml" />
Expand Down
66 changes: 33 additions & 33 deletions FriishProduce/InjectorForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 27 additions & 16 deletions FriishProduce/InjectorForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,23 +88,25 @@ public void RefreshForm()

// Injection methods list
InjectorsList.Items.Clear();
InjectorsList.Items.Add(Language.Get("VC"));

switch (Console)
{
case Console.NES:
InjectorsList.Items.Add(Language.Get("VC"));
InjectorsList.Items.Add(Forwarder.List[0]);
InjectorsList.Items.Add(Forwarder.List[1]);
InjectorsList.Items.Add(Forwarder.List[2]);
break;

case Console.SNES:
InjectorsList.Items.Add(Language.Get("VC"));
InjectorsList.Items.Add(Forwarder.List[3]);
InjectorsList.Items.Add(Forwarder.List[4]);
InjectorsList.Items.Add(Forwarder.List[5]);
break;

case Console.N64:
InjectorsList.Items.Add(Language.Get("VC"));
InjectorsList.Items.Add(Forwarder.List[8]);
InjectorsList.Items.Add(Forwarder.List[9]);
InjectorsList.Items.Add(Forwarder.List[10]);
Expand All @@ -113,25 +115,29 @@ public void RefreshForm()

case Console.SMS:
case Console.SMDGEN:
InjectorsList.Items.Add(Language.Get("VC"));
InjectorsList.Items.Add(Forwarder.List[7]);
break;

case Console.PCE:
case Console.NeoGeo:
case Console.MSX:
case Console.C64:
InjectorsList.Items.Add(Language.Get("VC"));
break;

case Console.Flash:
InjectorsList.Items.Clear();
InjectorsList.Items.Add(" ");
InjectorsList.Items.Add(Language.Get("ByDefault"));
break;

case Console.GBA:
InjectorsList.Items.Clear();
InjectorsList.Items.Add(Forwarder.List[6]);
break;

case Console.PSX:
InjectorsList.Items.Add(Forwarder.List[12]);
break;

default:
break;
}
Expand All @@ -158,6 +164,7 @@ private void Form_Shown(object sender, EventArgs e)
// Declare WAD metadata modifier
// ********
Creator = new Creator(Console);
TIDCode = null;

switch (Console)
{
Expand Down Expand Up @@ -200,11 +207,15 @@ private void Form_Shown(object sender, EventArgs e)
ROM = new ROM_MSX();
break;

default:
case Console.Flash:
TIDCode = null;
ROM = new SWF();
ImportPatch.Enabled = false;
groupBox5.Location = new Point(groupBox5.Location.X, COPanel_VC.Location.Y);
groupBox5.Show();
break;

default:
ROM = new Disc();
break;
}

Expand Down Expand Up @@ -552,7 +563,9 @@ public void LoadROM(string ROMpath, bool UseLibRetro = true)
case Console.SMS:
case Console.SMDGEN:
case Console.PCE:
if (!ROM.CheckValidity(File.ReadAllBytes(ROMpath)))
case Console.C64:
case Console.MSX:
if (!ROM.CheckValidity(ROMpath))
{
MessageBox.Show(Language.Get("Message.008"), 0, Ookii.Dialogs.WinForms.TaskDialogIcon.Warning);
return;
Expand All @@ -569,12 +582,6 @@ public void LoadROM(string ROMpath, bool UseLibRetro = true)
}
break;

case Console.MSX:
break;

case Console.C64:
break;

case Console.Flash:
break;
}
Expand Down Expand Up @@ -751,7 +758,7 @@ public void ForwarderCreator()

public void FlashInject()
{
OutWAD = Injectors.Flash.Inject(OutWAD, ROM.Path);
OutWAD = Injectors.Flash.Inject(OutWAD, ROM.Path, Creator.SaveDataTitle, Img);
}

public void WiiVCInject()
Expand Down Expand Up @@ -873,7 +880,7 @@ private void OpenInjectorOptions(object sender, EventArgs e)
#region Base WAD Management/Visual
private void AddBases()
{
Database = DatabaseHelper.Get(Console);
Database = DatabaseHelper.Get(Console) ?? DatabaseHelper.Get(Console.Flash);
string ID = null;

for (int x = 0; x < Database.Length; x++)
Expand Down Expand Up @@ -1263,11 +1270,13 @@ private void InjectorsList_SelectedIndexChanged(object sender, EventArgs e)
{
COPanel_VC.Hide();
COPanel_Forwarder.Hide();
groupBox5.Hide();

CO = null;
if (IsVCMode())
{
COPanel_VC.Show();
groupBox5.Show();

switch (Console)
{
Expand Down Expand Up @@ -1303,13 +1312,15 @@ private void InjectorsList_SelectedIndexChanged(object sender, EventArgs e)

else if (Console == Console.Flash)
{
groupBox5.Show();
CO = new Options_Flash();
}

else
COPanel_Forwarder.Show();

var selected = COPanel_Forwarder.Visible ? COPanel_Forwarder : COPanel_VC.Visible ? COPanel_VC : null;
int height = selected == null ? InjectorsList.Location.Y + InjectorsList.Height + 10 : selected.Location.Y + selected.Height + 10;
int height = selected == null ? (groupBox5.Visible ? groupBox5.Location.Y + groupBox5.Height : InjectorsList.Location.Y + InjectorsList.Height) + 10 : selected.Location.Y + selected.Height + 10;
groupBox4.Size = new Size(groupBox4.Width, height);
if (groupBox4.Enabled) CheckExport();
}
Expand Down
Loading

0 comments on commit 4579f3b

Please sign in to comment.