From 66f082e4a075ed73099daeac555ff8870ff930b2 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 20 Oct 2018 23:05:15 -0500 Subject: [PATCH] Add shadow lugia sprite Closes #2145 --- PKHeX.Core/Editing/ISpriteBuilder.cs | 6 ++++- .../Controls/PKM Editor/PKMEditor.cs | 2 ++ PKHeX.WinForms/PKHeX.WinForms.csproj | 1 + .../Properties/Resources.Designer.cs | 21 +++++++++++++----- PKHeX.WinForms/Properties/Resources.resx | 3 +++ .../Resources/img/Pokemon Sprites/249x.png | Bin 0 -> 767 bytes PKHeX.WinForms/Util/SpriteBuilder.cs | 5 +++++ PKHeX.WinForms/Util/SpriteUtil.cs | 2 ++ 8 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 PKHeX.WinForms/Resources/img/Pokemon Sprites/249x.png diff --git a/PKHeX.Core/Editing/ISpriteBuilder.cs b/PKHeX.Core/Editing/ISpriteBuilder.cs index 66387260f..055b87b4b 100644 --- a/PKHeX.Core/Editing/ISpriteBuilder.cs +++ b/PKHeX.Core/Editing/ISpriteBuilder.cs @@ -1,11 +1,15 @@ namespace PKHeX.Core { - public interface ISpriteBuilder + public interface ISpriteBuilder { 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); } } diff --git a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs index fab240696..75ba3c752 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs @@ -1478,6 +1478,8 @@ private void UpdateShadowCHK(object sender, EventArgs e) 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; } diff --git a/PKHeX.WinForms/PKHeX.WinForms.csproj b/PKHeX.WinForms/PKHeX.WinForms.csproj index cab16c873..6e294a344 100644 --- a/PKHeX.WinForms/PKHeX.WinForms.csproj +++ b/PKHeX.WinForms/PKHeX.WinForms.csproj @@ -1915,6 +1915,7 @@ + diff --git a/PKHeX.WinForms/Properties/Resources.Designer.cs b/PKHeX.WinForms/Properties/Resources.Designer.cs index 7403acb2f..8e81af517 100644 --- a/PKHeX.WinForms/Properties/Resources.Designer.cs +++ b/PKHeX.WinForms/Properties/Resources.Designer.cs @@ -4330,6 +4330,16 @@ internal class Resources { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap _249x { + get { + object obj = ResourceManager.GetObject("_249x", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -22934,12 +22944,11 @@ internal class Resources { /// 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]";. + /// - - 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 "Ball" label now brings up a list of all balls, with background color i [rest of string was truncated]";. /// internal static string changelog { get { @@ -28128,7 +28137,7 @@ internal class Resources { } /// - /// Looks up a localized string similar to 20180803. + /// Looks up a localized string similar to 20180911. /// internal static string ProgramVersion { get { diff --git a/PKHeX.WinForms/Properties/Resources.resx b/PKHeX.WinForms/Properties/Resources.resx index 6189e51a7..4fc749f15 100644 --- a/PKHeX.WinForms/Properties/Resources.resx +++ b/PKHeX.WinForms/Properties/Resources.resx @@ -9205,4 +9205,7 @@ ..\Resources\img\Bag\Bag_Key.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\img\Pokemon Sprites\249x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/PKHeX.WinForms/Resources/img/Pokemon Sprites/249x.png b/PKHeX.WinForms/Resources/img/Pokemon Sprites/249x.png new file mode 100644 index 0000000000000000000000000000000000000000..7ce8f4a4661b3bfd72a4a27413da72ad824d5419 GIT binary patch literal 767 zcmVX00004XF*Lt006O% z3;baP00009a7bBm000XT000XT0n*)m`~Uy|2XskIMF-vi7zrB(bgtxy0000ObVXQn zQ*UN;cVTj60B~VxZgehgWpp4kE-@}KV=A0W0007NNklS?RMJ> zBB$f|e6brgyysY^v`-O0(8bOrNA9uqDFO&aoU*(wNVTH;gA-8`Je3?}%_~%!V{ihI zTKmFECm_tHj; z$%!I>U|tI35aeOu-0w$P$DYGc*~bDueAqDw@YlK0N zK&_c|O_Tik{U-_OS3R1GBGb0*!Ez!DPJxn1N^%JDAmySex8iUSK_nl72Srla#Y5yo z7@Ue;NzpFqU8y*7Ue;R6)ChxzK%Yv?K@zz`cMihfG4RmnJ;;{=5IjaQ3?2hLDf0Il x*Dfk3D0dX6AE$oeAPk;^n*2V(;QvE+^#)%TTph{54 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);