mostly unused usings
This commit is contained in:
Kurt 2017-06-26 20:11:58 -07:00
parent f1f316cb2d
commit 6976607627
31 changed files with 52 additions and 91 deletions

View File

@ -448,7 +448,7 @@ public static byte[] getPixelData(Bitmap img, int format, bool rectangle = true)
int w = img.Width;
int h = img.Height;
bool perfect = w == h && (w != 0) && ((w & (w - 1)) == 0);
bool perfect = w == h && w != 0 && (w & (w - 1)) == 0;
if (!perfect) // Check if square power of two, else resize
{
// Square Format Checks

View File

@ -66,7 +66,7 @@ public BLZCoder(string[] args, ProgressBar pBar = null)
// Title();
if (args == null || (args.Length != 2))
if (args == null || args.Length != 2)
throw new Exception("No arguments supplied to BLZ");
if (args[0].Equals("-d"))
@ -386,7 +386,7 @@ private byte[] BLZ_Code(byte[] raw_buffer, int raw_len, int best)
raw_tmp = raw_len - raw;
}
while ((mask > 0) && (mask != 1))
while (mask > 0 && mask != 1)
{
mask = (int)((uint)mask >> BLZ_SHIFT);
pak_buffer[flg] = (byte)(pak_buffer[flg] << 1);
@ -397,7 +397,7 @@ private byte[] BLZ_Code(byte[] raw_buffer, int raw_len, int best)
BLZ_Invert(raw_buffer, 0, raw_len);
BLZ_Invert(pak_buffer, 0, pak_len);
if (pak_tmp == 0 || (raw_len + 4 < ((pak_tmp + raw_tmp + 3) & 0xFFFFFFFC) + 8))
if (pak_tmp == 0 || raw_len + 4 < ((pak_tmp + raw_tmp + 3) & 0xFFFFFFFC) + 8)
{
pak = 0;
raw = 0;

View File

@ -40,7 +40,7 @@ public string GetSerial()
{
char lc = RecognizedGames[titleid].ToArray()[0].ToCharArray()[3];
char lc2 = vars[1].ToCharArray()[3];
if (lc2 == 'A' || lc2 == 'E' || (lc2 == 'P' && lc == 'J')) //Prefer games in order US, PAL, JP
if (lc2 == 'A' || lc2 == 'E' || lc2 == 'P' && lc == 'J') //Prefer games in order US, PAL, JP
{
RecognizedGames[titleid] = vars.Skip(1).Take(2).ToArray();
}
@ -59,11 +59,11 @@ public bool isPokemon()
}
public bool isORAS()
{
return ((TitleID & 0xFFFFFFFF) >> 8 == 0x11C5) || ((TitleID & 0xFFFFFFFF) >> 8 == 0x11C4);
return (TitleID & 0xFFFFFFFF) >> 8 == 0x11C5 || (TitleID & 0xFFFFFFFF) >> 8 == 0x11C4;
}
public bool isXY()
{
return ((TitleID & 0xFFFFFFFF) >> 8 == 0x55D) || ((TitleID & 0xFFFFFFFF) >> 8 == 0x55E);
return (TitleID & 0xFFFFFFFF) >> 8 == 0x55D || (TitleID & 0xFFFFFFFF) >> 8 == 0x55E;
}
public string GetPokemonSerial()
{

View File

@ -1,9 +1,6 @@
using System;
using System.IO;
using System.Linq;
using System.Media;
using System.Windows.Forms;
using pk3DS;
namespace pk3DS.Core.CTR
{

View File

@ -7,9 +7,9 @@ public class GARCReference
{
public readonly int FileNumber;
public readonly string Name;
private int A => (FileNumber / 100) % 10;
private int B => (FileNumber / 10) % 10;
private int C => (FileNumber / 1) % 10;
private int A => FileNumber / 100 % 10;
private int B => FileNumber / 10 % 10;
private int C => FileNumber / 1 % 10;
public readonly bool LanguageVariant;
public string Reference => Path.Combine("a", A.ToString(), B.ToString(), C.ToString());

View File

@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following

View File

@ -1,6 +1,5 @@
using System;
using System.IO;
using System.Linq;
namespace pk3DS.Core.Structures.Gen6
{

View File

@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
namespace pk3DS.Core
{
@ -39,7 +36,7 @@ public static string TrimFromZero(string input)
public static Random rand = new Random();
public static uint rnd32()
{
return (uint)(rand.Next(1 << 30)) << 2 | (uint)(rand.Next(1 << 2));
return (uint)rand.Next(1 << 30) << 2 | (uint)rand.Next(1 << 2);
}
// Data Retrieval
@ -126,7 +123,7 @@ public static string GuessExtension(BinaryReader br, string defaultExt, bool byp
return defaultExt;
for (int i = 0; i < magic.Length && i < 4; i++)
{
if ((magic[i] >= 'a' && magic[i] <= 'z') || (magic[i] >= 'A' && magic[i] <= 'Z')
if (magic[i] >= 'a' && magic[i] <= 'z' || magic[i] >= 'A' && magic[i] <= 'Z'
|| char.IsDigit((char)magic[i]))
{
ext += (char)magic[i];
@ -158,7 +155,7 @@ public static uint Reverse(uint x)
for (int i = 0; i < 32; ++i)
{
y <<= 1;
y |= (x & 1);
y |= x & 1;
x >>= 1;
}
return y;

View File

@ -37,11 +37,6 @@
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CTR\AES.cs" />

View File

@ -1,5 +1,4 @@
using pk3DS.Core;
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

View File

@ -1,10 +1,7 @@
using pk3DS.Core.CTR;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Media;
using System.Text;
using System.Windows.Forms;
namespace pk3DS

View File

@ -153,14 +153,14 @@ private void openQuick(string path)
FileInfo fi = new FileInfo(path);
if (fi.Name.Contains("code.bin")) // Compress/Decompress .code.bin
{
if (fi.Length % 0x200 == 0 && (WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Detected Decompressed code.bin.", "Compress? File will be replaced.") == DialogResult.Yes))
if (fi.Length % 0x200 == 0 && WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Detected Decompressed code.bin.", "Compress? File will be replaced.") == DialogResult.Yes)
new Thread(() => { threads++; new BLZCoder(new[] { "-en", path }, pBar1); threads--; WinFormsUtil.Alert("Compressed!"); }).Start();
else if (WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Detected Compressed code.bin.", "Decompress? File will be replaced.") == DialogResult.Yes)
new Thread(() => { threads++; new BLZCoder(new[] { "-d", path }, pBar1); threads--; WinFormsUtil.Alert("Decompressed!"); }).Start();
}
else if (fi.Name.ToLower().Contains("exe")) // Unpack exefs
{
if (fi.Length % 0x200 == 0 && (WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Detected ExeFS.bin.", "Unpack?") == DialogResult.Yes))
if (fi.Length % 0x200 == 0 && WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Detected ExeFS.bin.", "Unpack?") == DialogResult.Yes)
new Thread(() => { threads++; ExeFS.get(path, Path.GetDirectoryName(path)); threads--; WinFormsUtil.Alert("Unpacked!"); }).Start();
}
else if (fi.Name.ToLower().Contains("rom"))
@ -369,7 +369,7 @@ private bool checkIfExeFS(string path)
else
return false;
}
if (fi.Length % 0x200 != 0 && (WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Detected Compressed code binary.", "Decompress? File will be replaced.") == DialogResult.Yes))
if (fi.Length % 0x200 != 0 && WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Detected Compressed code binary.", "Decompress? File will be replaced.") == DialogResult.Yes)
new Thread(() => { threads++; new BLZCoder(new[] { "-d", files[0] }, pBar1); threads--; WinFormsUtil.Alert("Decompressed!"); }).Start();
ExeFSPath = path;
@ -657,7 +657,7 @@ private void runOWSE6()
Enabled = false;
new Thread(() =>
{
bool reload = (ModifierKeys == Keys.Control) || ModifierKeys == (Keys.Alt | Keys.Control);
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);
@ -1105,7 +1105,7 @@ private void Menu_BLZ_Click(object sender, EventArgs e)
if (fi.Length > 15 * 1024 * 1024) // 15MB
{ WinFormsUtil.Error("File too big!", fi.Length + " bytes."); return; }
if (ModifierKeys != Keys.Control && fi.Length % 0x200 == 0 && (WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Detected Decompressed Binary.", "Compress? File will be replaced.") == DialogResult.Yes))
if (ModifierKeys != Keys.Control && fi.Length % 0x200 == 0 && WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Detected Decompressed Binary.", "Compress? File will be replaced.") == DialogResult.Yes)
new Thread(() => { threads++; new BLZCoder(new[] { "-en", path }, pBar1); threads--; WinFormsUtil.Alert("Compressed!"); }).Start();
else if (WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Detected Compressed Binary", "Decompress? File will be replaced.") == DialogResult.Yes)
new Thread(() => { threads++; new BLZCoder(new[] { "-d", path }, pBar1); threads--; WinFormsUtil.Alert("Decompressed!"); }).Start();
@ -1181,7 +1181,7 @@ private bool getGARC(string infile, string outfolder, bool PB, bool bypassExt =
}
private bool setGARC(string outfile, string infolder, int padBytes, bool PB)
{
if (skipBoth || (ModifierKeys == Keys.Control && WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Cancel writing data back to GARC?") == DialogResult.Yes))
if (skipBoth || ModifierKeys == Keys.Control && WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Cancel writing data back to GARC?") == DialogResult.Yes)
{ threads--; updateStatus("Aborted!", false); return false; }
try

View File

@ -1,10 +1,4 @@
using pk3DS.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System;
using System.Text;
using System.Windows.Forms;

View File

@ -1,5 +1,4 @@
using pk3DS.Core;
using System;
using System;
using System.Collections.Specialized;
using System.IO;
using System.Linq;
@ -133,7 +132,7 @@ private string[] getPaths(string[] sc)
bool languages = CHK_Lang.Checked;
StringCollection paths = new StringCollection();
foreach (string s in sc)
if (!languages || (s != "gametext" && s != "storytext"))
if (!languages || s != "gametext" && s != "storytext")
paths.Add(Main.getGARCFileName(s, Main.Language));
else
for (int l = 0; l < 8; l++)

View File

@ -142,9 +142,9 @@ private void B_RandAll_Click(object sender, EventArgs e)
bool forceSTAB = CHK_STAB.Checked && rnd.Next(0, 99) < NUD_STAB.Value;
int move = Randomizer.getRandomSpecies(ref randomMoves, ref ctr);
while ( // Move is invalid
(!CHK_HMs.Checked && banned.Contains(move)) // HM Moves Not Allowed
|| (forceSTAB && // STAB is required
!Main.Config.Personal[species].Types.Contains(moveTypes[move].Type))
!CHK_HMs.Checked && banned.Contains(move) // HM Moves Not Allowed
|| forceSTAB && // STAB is required
!Main.Config.Personal[species].Types.Contains(moveTypes[move].Type)
)
{
move = Randomizer.getRandomSpecies(ref randomMoves, ref ctr);

View File

@ -2,9 +2,7 @@
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using pk3DS.Properties;
using pk3DS.Core.CTR;
using pk3DS.Core;
namespace pk3DS.Subforms
{
@ -54,7 +52,7 @@ public Bitmap getMapImage(bool crop = false, bool entity = true, bool sliceArea
int area = 40*mapScale;
for (int x = 0; x < img.Width; x++)
for (int y = 0; y < img.Height; y++)
if ((x % area == 0) || (y % area == 0))
if (x % area == 0 || y % area == 0)
img.SetPixel(x,y,Color.FromArgb(0x10,0xFF,0,0));
}

View File

@ -171,9 +171,9 @@ private void B_RandAll_Click(object sender, EventArgs e)
bool forceSTAB = CHK_STAB.Checked && rnd.Next(0, 99) < NUD_STAB.Value;
int move = Randomizer.getRandomSpecies(ref randomMoves, ref ctr);
while ( // Move is invalid
(!CHK_HMs.Checked && banned.Contains(move)) // HM Moves Not Allowed
|| (forceSTAB && // STAB is required
!Main.Config.Personal[species].Types.Contains(moveTypes[move].Type)))
!CHK_HMs.Checked && banned.Contains(move) // HM Moves Not Allowed
|| forceSTAB && // STAB is required
!Main.Config.Personal[species].Types.Contains(moveTypes[move].Type))
{ move = Randomizer.getRandomSpecies(ref randomMoves, ref ctr); }
// Assign Move

View File

@ -1,6 +1,5 @@
using pk3DS.Core;
using System;
using System.IO;
using System.Windows.Forms;
namespace pk3DS

View File

@ -207,12 +207,12 @@ private void changeTrainerType(object sender, EventArgs e)
trpk_IV[i].Enabled =
trpk_lvl[i].Enabled = i < pkm;
trpk_item[i].Enabled = (i < pkm) && checkBox_Item.Checked;
trpk_item[i].Enabled = i < pkm && checkBox_Item.Checked;
trpk_m1[i].Enabled =
trpk_m2[i].Enabled =
trpk_m3[i].Enabled =
trpk_m4[i].Enabled = (i < pkm) && checkBox_Moves.Checked;
trpk_m4[i].Enabled = i < pkm && checkBox_Moves.Checked;
if (!trpk_pkm[i].Enabled)
{
@ -601,7 +601,7 @@ private void Randomize()
CB_TrainerID.SelectedIndex = i; // data is loaded
// Setup
checkBox_Moves.Checked = rMove || (!rNoMove && checkBox_Moves.Checked);
checkBox_Moves.Checked = rMove || !rNoMove && checkBox_Moves.Checked;
checkBox_Item.Checked = rItem || checkBox_Item.Checked;
if (r6PKM && rImportant[i] != null) // skip the first rival battles
@ -664,7 +664,7 @@ private void Randomize()
int type = GetRandomType(i);
bool mevo = rEnsureMEvo.Contains(i);
bool typerand = rTypeTheme && !rGymE4Only ||
(rTypeTheme && rImportant[i] != null && (rImportant[i].Contains("GYM") || rImportant[i].Contains("ELITE") || rImportant[i].Contains("CHAMPION")));
rTypeTheme && rImportant[i] != null && (rImportant[i].Contains("GYM") || rImportant[i].Contains("ELITE") || rImportant[i].Contains("CHAMPION"));
// Randomize Pokemon
for (int p = 0; p < CB_numPokemon.SelectedIndex; p++)
@ -679,13 +679,13 @@ private void Randomize()
if (typerand)
{
int tries = 0;
while (((pkm.Types[0] != type && pkm.Types[1] != type) || mevo && p == CB_numPokemon.SelectedIndex - 1 && !megaEvos.Contains(species)) && tries < 0x10000)
while ((pkm.Types[0] != type && pkm.Types[1] != type || mevo && p == CB_numPokemon.SelectedIndex - 1 && !megaEvos.Contains(species)) && tries < 0x10000)
if (p == CB_numPokemon.SelectedIndex - 1 && mevo)
pkm = Main.SpeciesStat[species = GetRandomMegaEvolvablePokemon(type)];
else if (rSmart) // Get a new Pokemon with a close BST
{
pkm = Main.SpeciesStat[species = Randomizer.getRandomSpecies(ref sL, ref ctr)];
while (!((pkm.BST * (5 - ++tries / Main.Config.MaxSpeciesID) / 6 < oldpkm.BST) && pkm.BST * (6 + ++tries / Main.Config.MaxSpeciesID) / 5 > oldpkm.BST))
while (!(pkm.BST * (5 - ++tries / Main.Config.MaxSpeciesID) / 6 < oldpkm.BST && pkm.BST * (6 + ++tries / Main.Config.MaxSpeciesID) / 5 > oldpkm.BST))
{
pkm = Main.SpeciesStat[species = Randomizer.getRandomSpecies(ref sL, ref ctr)];
}
@ -698,7 +698,7 @@ private void Randomize()
else if (rSmart) // Get a new Pokemon with a close BST
{
int tries = 0;
while (!((pkm.BST * (5 - ++tries / Main.Config.MaxSpeciesID) / 6 < oldpkm.BST) && pkm.BST * (6 + ++tries / Main.Config.MaxSpeciesID) / 5 > oldpkm.BST))
while (!(pkm.BST * (5 - ++tries / Main.Config.MaxSpeciesID) / 6 < oldpkm.BST && pkm.BST * (6 + ++tries / Main.Config.MaxSpeciesID) / 5 > oldpkm.BST))
{
pkm = Main.SpeciesStat[species = Randomizer.getRandomSpecies(ref sL, ref ctr)];
}

View File

@ -1,5 +1,4 @@
using pk3DS.Core;
using pk3DS.Core.CTR;
using pk3DS.Core.CTR;
using System;
using System.Drawing;
using System.Drawing.Imaging;

View File

@ -143,7 +143,7 @@ private void B_RandAll_Click(object sender, EventArgs e)
int move = Randomizer.getRandomSpecies(ref randomMoves, ref ctr);
while (banned.Contains(move) /* Invalid */
|| (forceSTAB && !Main.SpeciesStat[species].Types.Contains(moveTypes[move].Type))) // STAB is required
|| forceSTAB && !Main.SpeciesStat[species].Types.Contains(moveTypes[move].Type)) // STAB is required
move = Randomizer.getRandomSpecies(ref randomMoves, ref ctr);
// Assign Move

View File

@ -2,7 +2,6 @@
using System.Linq;
using System.Windows.Forms;
using pk3DS.Core;
using pk3DS.Core.Structures.Gen6;
using pk3DS.Core.CTR;
using pk3DS.Core.Structures.Gen7;

View File

@ -166,7 +166,7 @@ private void B_RandAll_Click(object sender, EventArgs e)
int move = Randomizer.getRandomSpecies(ref randomMoves, ref ctr);
while (banned.Contains(move) /* Invalid */
|| (forceSTAB && !Main.SpeciesStat[species].Types.Contains(moveTypes[move].Type))) // STAB is required
|| forceSTAB && !Main.SpeciesStat[species].Types.Contains(moveTypes[move].Type)) // STAB is required
move = Randomizer.getRandomSpecies(ref randomMoves, ref ctr);
// Assign Move

View File

@ -1,6 +1,5 @@
using pk3DS.Core;
using System;
using System.IO;
using System.Windows.Forms;
namespace pk3DS

View File

@ -1,5 +1,4 @@
using pk3DS.Core;
using pk3DS.Core.Structures.Gen6;
using pk3DS.Core.Structures.Gen7;
using System;
using System.Drawing;
@ -95,7 +94,7 @@ private void clickSet(object sender, EventArgs e)
{
tr.Pokemon.Add(pk);
slot = tr.Pokemon.Count - 1;
Trainers[index].NumPokemon = (int)(++NUD_NumPoke.Value);
Trainers[index].NumPokemon = (int)++NUD_NumPoke.Value;
}
getQuickFiller(pba[slot], pk);
@ -108,7 +107,7 @@ private void clickDelete(object sender, EventArgs e)
if (slot < Trainers[index].NumPokemon)
{
Trainers[index].Pokemon.RemoveAt(slot);
Trainers[index].NumPokemon = (int)(--NUD_NumPoke.Value);
Trainers[index].NumPokemon = (int)--NUD_NumPoke.Value;
}
populateTeam(Trainers[index]);
@ -457,7 +456,7 @@ private void updateNumPokemon(object sender, EventArgs e)
{
if (index < 0)
return;
Trainers[index].NumPokemon = (int) (NUD_NumPoke.Value);
Trainers[index].NumPokemon = (int) NUD_NumPoke.Value;
}
private void updateTrainerName(object sender, EventArgs e)
{
@ -537,7 +536,7 @@ private void updateStats(object sender, EventArgs e)
}
var ivs = tb_iv.Select(tb => WinFormsUtil.ToInt32(tb) & 1).ToArray();
updatingStats = true;
CB_HPType.SelectedIndex = 15 * ((ivs[0]) + 2 * ivs[1] + 4 * ivs[2] + 8 * ivs[3] + 16 * ivs[4] + 32 * ivs[5]) / 63;
CB_HPType.SelectedIndex = 15 * (ivs[0] + 2 * ivs[1] + 4 * ivs[2] + 8 * ivs[3] + 16 * ivs[4] + 32 * ivs[5]) / 63;
updatingStats = false;
}
@ -607,7 +606,7 @@ private void B_Randomize_Click(object sender, EventArgs e)
do
{
rv = (int) (Util.rnd32()%CB_Trainer_Class.Items.Count);
} while (/*trClass[rv].StartsWith("[~") || */(Legal.SpecialClasses_SM.Contains(rv) && !CHK_IgnoreSpecialClass.Checked));
} while (/*trClass[rv].StartsWith("[~") || */Legal.SpecialClasses_SM.Contains(rv) && !CHK_IgnoreSpecialClass.Checked);
// don't allow disallowed classes
tr.TrainerClass = (byte) rv;
}

View File

@ -8,7 +8,6 @@
using System.Windows.Forms;
using pk3DS.Core.CTR;
using pk3DS.Core.Structures.Gen6;
using pk3DS.Core;
using pk3DS.Core.Structures.Gen7;
@ -193,8 +192,8 @@ private void updateMap(object sender, EventArgs e)
{
for (int i = 0; i < Areas[CB_LocationID.SelectedIndex].Tables.Count; i += 2)
{
CB_TableID.Items.Add($"{(i / 2) + 1} (Day)");
CB_TableID.Items.Add($"{(i / 2) + 1} (Night)");
CB_TableID.Items.Add($"{i / 2 + 1} (Day)");
CB_TableID.Items.Add($"{i / 2 + 1} (Night)");
}
}
else
@ -419,7 +418,7 @@ public override string ToString()
{
var tn = "Encounters";
if (i != 0)
tn = "SOS Slot " + (i);
tn = "SOS Slot " + i;
sb.Append($"{tn} (Levels {MinLevel}-{MaxLevel}): ");
var specToRate = new Dictionary<uint, int>();
var distincts = new List<Encounter>();
@ -450,12 +449,12 @@ public Bitmap GetTableImg()
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit;
for (int i = 0; i < Encounters.Length - 1; i++)
for (int j = 0; j < Encounters[i].Length; j++)
g.DrawImage((Encounters[i][j].Species == 0 ? Properties.Resources.empty : WinFormsUtil.getSprite((int)Encounters[i][j].Species, (int)Encounters[i][j].Forme, 0, 0, Main.Config)), new Point(40 * j, 30 * (i+1)));
g.DrawImage(Encounters[i][j].Species == 0 ? Properties.Resources.empty : WinFormsUtil.getSprite((int)Encounters[i][j].Species, (int)Encounters[i][j].Forme, 0, 0, Main.Config), new Point(40 * j, 30 * (i+1)));
for (int i = 0; i < Rates.Length; i++)
g.DrawString($"{Rates[i]}%", font, Brushes.Black, new PointF(40 * i + 10, 10));
g.DrawString("Weather: ", font, Brushes.Black, new PointF(10, 280));
for (int i = 0; i < AdditionalSOS.Length; i++)
g.DrawImage((AdditionalSOS[i].Species == 0 ? Properties.Resources.empty : WinFormsUtil.getSprite((int)AdditionalSOS[i].Species, (int)AdditionalSOS[i].Forme, 0, 0, Main.Config)), new Point(40*i + 60, 270));
g.DrawImage(AdditionalSOS[i].Species == 0 ? Properties.Resources.empty : WinFormsUtil.getSprite((int)AdditionalSOS[i].Species, (int)AdditionalSOS[i].Forme, 0, 0, Main.Config), new Point(40*i + 60, 270));
}
return img;
}

View File

@ -1,8 +1,6 @@
using pk3DS.Core;
using pk3DS.Core.Structures;
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Windows.Forms;

View File

@ -1,5 +1,4 @@
using pk3DS.Core;
using pk3DS.Core.CTR;
using pk3DS.Core.CTR;
using System;
using System.Drawing;
using System.Drawing.Imaging;

View File

@ -1,5 +1,4 @@
using pk3DS.ARCUtil;
using pk3DS.Core;
using pk3DS.Core.CTR;
using System;
using System.Drawing;

View File

@ -7,7 +7,6 @@
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
namespace pk3DS
@ -185,7 +184,7 @@ public static string getOnlyHex(string str)
{
var c = t;
// filter for hex
if ((c < 0x0047 && c > 0x002F) || (c < 0x0067 && c > 0x0060))
if (c < 0x0047 && c > 0x002F || c < 0x0067 && c > 0x0060)
s += c;
else
System.Media.SystemSounds.Beep.Play();

View File

@ -62,10 +62,8 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ARCUtil.cs" />