Add shadow lugia sprite

Closes #2145
This commit is contained in:
Kurt 2018-10-20 23:05:15 -05:00
parent c0aae6ab78
commit 66f082e4a0
8 changed files with 33 additions and 7 deletions

View file

@ -1,11 +1,15 @@
namespace PKHeX.Core
{
public interface ISpriteBuilder<out T>
public interface ISpriteBuilder<T>
{
T GetSprite(int species, int form, int gender, int heldItem, bool isEgg, bool isShiny,
int generation = -1,
bool isBoxBGRed = false);
T GetSprite(T baseSprite, int species, int heldItem, bool isEgg, bool isShiny,
int generation = -1,
bool isBoxBGRed = false);
void Initialize(SaveFile sav);
}
}

View file

@ -1478,6 +1478,8 @@ namespace PKHeX.WinForms.Controls
return;
FieldsLoaded = false;
NUD_Purification.Value = CHK_Shadow.Checked ? NUD_Purification.Maximum : 0;
((IShadowPKM)pkm).Purification = (int)NUD_Purification.Value;
UpdatePreviewSprite?.Invoke(this, null);
FieldsLoaded = true;
}

View file

@ -1915,6 +1915,7 @@
<None Include="Resources\img\item\item_925.png" />
<None Include="Resources\img\item\item_926.png" />
<None Include="Resources\img\item\item_921.png" />
<None Include="Resources\img\Pokemon Sprites\249x.png" />
<Content Include="Resources\img\Pokemon Sprites\803.png" />
<Content Include="Resources\img\Pokemon Sprites\804.png" />
<Content Include="Resources\img\Pokemon Sprites\805.png" />

View file

@ -4330,6 +4330,16 @@ namespace PKHeX.WinForms.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap _249x {
get {
object obj = ResourceManager.GetObject("_249x", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -22934,12 +22944,11 @@ namespace PKHeX.WinForms.Properties {
/// Looks up a localized string similar to PKHeX - By Kaphotics
///http://projectpokemon.org/pkhex/
///
///18/08/03 - New Update:
///18/09/11 - New Update:
/// - Legality:
/// - - Changed: Another round of legality check updates. Thanks @iiippppk, @WEERSOQUEER, @PrometheusG, @NinFanBoyFTW, paf, Cloud AC!
/// - - Added: Unavailable bred hidden abilities are now flagged for Gen5 origin entities (now covers all gens).
/// - - Added: WC6/7 mystery gift version compatibility checks based on wc*full data. Note: some gifts might still allow impossible future versions.
/// - Added: Hovering over a [rest of string was truncated]&quot;;.
/// - - Changed: Another round of legality check updates. Thanks HaxAras, @sora10pls, ICanSnake, Omnipotent Arceus, Raptor385, PF649, PrometheusG, @Narithegreat, Yami_Wheeler, crzyc, ThePunish3D, @Lusamine!
/// - - Added: Poké Pelago status legality checks have been enabled, which can detect improperly transferred files.
/// - Added: Clicking on the &quot;Ball&quot; label now brings up a list of all balls, with background color i [rest of string was truncated]&quot;;.
/// </summary>
internal static string changelog {
get {
@ -28128,7 +28137,7 @@ namespace PKHeX.WinForms.Properties {
}
/// <summary>
/// Looks up a localized string similar to 20180803.
/// Looks up a localized string similar to 20180911.
/// </summary>
internal static string ProgramVersion {
get {

View file

@ -9205,4 +9205,7 @@
<data name="Bag_Key" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\Bag\Bag_Key.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_249x" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\Pokemon Sprites\249x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

View file

@ -41,6 +41,11 @@ namespace PKHeX.WinForms
var baseImage = GetBaseImage(species, form, gender, isShiny, generation);
return GetSprite(baseImage, species, heldItem, isEgg, isShiny, generation, isBoxBGRed);
}
public Image GetSprite(Image baseImage, int species, int heldItem, bool isEgg, bool isShiny, int generation = -1, bool isBoxBGRed = false)
{
if (isEgg)
baseImage = LayerOverImageEgg(baseImage, species, heldItem != 0);
if (isShiny)

View file

@ -86,6 +86,8 @@ namespace PKHeX.WinForms
var img = GetSprite(pkm.Species, pkm.AltForm, pkm.Gender, pkm.SpriteItem, pkm.IsEgg, pkm.IsShiny, pkm.Format, isBoxBGRed);
if (pkm is IShadowPKM s && s.Purification > 0)
{
if (pkm.Species == 249) // Lugia
img = Spriter.GetSprite(Resources._249x, 249, pkm.HeldItem, pkm.IsEgg, pkm.IsShiny, pkm.Format, isBoxBGRed);
GetSpriteGlow(pkm, new byte[] { 75, 0, 130 }, out var pixels, out var baseSprite, true);
var glowImg = ImageUtil.GetBitmap(pixels, baseSprite.Width, baseSprite.Height, baseSprite.PixelFormat);
img = ImageUtil.LayerImage(glowImg, img, 0, 0);