Misc cleanup

This commit is contained in:
Kurt 2018-07-22 17:26:19 -07:00
parent b97e967304
commit 3c4ba0d52b
4 changed files with 6 additions and 7 deletions

View File

@ -1258,9 +1258,9 @@ internal static bool CanInhabitGen1(this PKM pkm)
if (pkm is PK2 pk2 && pk2.CaughtData != 0)
return false;
int species = pkm.Species;
if (species > MaxSpeciesID_1 && !FutureEvolutionsGen1.Contains(species))
return false;
return true;
if (species <= MaxSpeciesID_1)
return true;
return !FutureEvolutionsGen1.Contains(species);
}
public static LanguageID GetSafeLanguage(int generation, LanguageID prefer, GameVersion game = GameVersion.Any)

View File

@ -213,7 +213,6 @@ private void ResetDaycare()
if (!SAV.HasDaycare)
return;
for (int i = 0; i < 2; i++)
{
var pb = SlotPictureBoxes[i + (int)SlotIndex.Daycare];

View File

@ -520,11 +520,11 @@ public void SwapBoxes(int index, int other)
public void Dispose()
{
Sounds.Dispose();
SE?.Dispose();
OriginalBackground?.Dispose();
CurrentBackground?.Dispose();
ColorizedColor?.Dispose();
Sounds?.Dispose();
}
}
}

View File

@ -21,9 +21,9 @@ public Bitmap GetGraphic(int pixelsPerModule, Color darkColor, Color lightColor,
var bmp = new Bitmap(size, size);
var gfx = Graphics.FromImage(bmp);
for (var x = 0; x < size + offset; x = x + pixelsPerModule)
for (var x = 0; x < size + offset; x += pixelsPerModule)
{
for (var y = 0; y < size + offset; y = y + pixelsPerModule)
for (var y = 0; y < size + offset; y += pixelsPerModule)
{
var module = this.QrCodeData.ModuleMatrix[(y + pixelsPerModule)/pixelsPerModule - 1][(x + pixelsPerModule)/pixelsPerModule - 1];
if (module)