PKHeX/Saves/BoxWallpaper.cs

38 lines
1.1 KiB
C#
Raw Normal View History

using System.Drawing;
namespace PKHeX
{
public static class BoxWallpaper
{
public static Bitmap getWallpaper(SaveFile SAV, int index)
{
index++;
string s = "box_wp" + index.ToString("00");
switch (SAV.Generation)
{
case 6: s += SAV.ORAS && index > 16 ? "ao" : "xy";
break;
2016-07-26 06:11:17 +00:00
case 5: s += SAV.B2W2 && index > 16 ? "b2w2" : "bw";
break;
case 4:
2016-07-26 06:11:17 +00:00
if (SAV.Pt && index > 16)
s += "pt";
2016-07-26 06:11:17 +00:00
else if (SAV.HGSS && index > 16)
s += "hgss";
else
s += "dp";
break;
case 3:
2016-07-26 06:11:17 +00:00
if (SAV.E)
s += "e";
2016-07-26 06:11:17 +00:00
else if (SAV.FRLG && index > 12)
s += "frlg";
else
s += "rs";
break;
}
return (Bitmap)(Properties.Resources.ResourceManager.GetObject(s) ?? Properties.Resources.box_wp16xy);
}
}
}