Add indication for party/starter slots
|
@ -6,18 +6,22 @@ namespace PKHeX.Core
|
|||
public enum StorageSlotFlag
|
||||
{
|
||||
None,
|
||||
Party1 = 1 << 0,
|
||||
Party2 = 1 << 1,
|
||||
Party3 = 1 << 2,
|
||||
Party4 = 1 << 3,
|
||||
Party5 = 1 << 4,
|
||||
Party6 = 1 << 5,
|
||||
BattleTeam1 = 1 << 6,
|
||||
BattleTeam2 = 1 << 7,
|
||||
BattleTeam3 = 1 << 8,
|
||||
BattleTeam4 = 1 << 9,
|
||||
BattleTeam5 = 1 << 10,
|
||||
BattleTeam6 = 1 << 11,
|
||||
|
||||
Party = 1 << 0,
|
||||
Party1 = Party << 0,
|
||||
Party2 = Party << 1,
|
||||
Party3 = Party << 2,
|
||||
Party4 = Party << 3,
|
||||
Party5 = Party << 4,
|
||||
Party6 = Party << 5,
|
||||
|
||||
BattleTeam = 1 << 6,
|
||||
BattleTeam1 = BattleTeam << 0,
|
||||
BattleTeam2 = BattleTeam << 1,
|
||||
BattleTeam3 = BattleTeam << 2,
|
||||
BattleTeam4 = BattleTeam << 3,
|
||||
BattleTeam5 = BattleTeam << 4,
|
||||
BattleTeam6 = BattleTeam << 5,
|
||||
|
||||
Starter = 1 << 29,
|
||||
Locked = 1 << 30,
|
||||
|
@ -35,25 +39,43 @@ namespace PKHeX.Core
|
|||
if (value.HasFlagFast(StorageSlotFlag.Starter))
|
||||
return true;
|
||||
|
||||
return value.IsBattleTeam();
|
||||
return value.IsBattleTeam() >= 0;
|
||||
}
|
||||
|
||||
public static bool IsBattleTeam(this StorageSlotFlag value)
|
||||
public static int IsBattleTeam(this StorageSlotFlag value)
|
||||
{
|
||||
if (value.HasFlagFast(StorageSlotFlag.BattleTeam1))
|
||||
return true;
|
||||
return 0;
|
||||
if (value.HasFlagFast(StorageSlotFlag.BattleTeam2))
|
||||
return true;
|
||||
return 1;
|
||||
if (value.HasFlagFast(StorageSlotFlag.BattleTeam3))
|
||||
return true;
|
||||
return 2;
|
||||
if (value.HasFlagFast(StorageSlotFlag.BattleTeam4))
|
||||
return true;
|
||||
return 3;
|
||||
if (value.HasFlagFast(StorageSlotFlag.BattleTeam5))
|
||||
return true;
|
||||
return 4;
|
||||
if (value.HasFlagFast(StorageSlotFlag.BattleTeam6))
|
||||
return true;
|
||||
return 5;
|
||||
|
||||
return false;
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static int IsParty(this StorageSlotFlag value)
|
||||
{
|
||||
if (value.HasFlagFast(StorageSlotFlag.Party1))
|
||||
return 0;
|
||||
if (value.HasFlagFast(StorageSlotFlag.Party2))
|
||||
return 1;
|
||||
if (value.HasFlagFast(StorageSlotFlag.Party3))
|
||||
return 2;
|
||||
if (value.HasFlagFast(StorageSlotFlag.Party4))
|
||||
return 3;
|
||||
if (value.HasFlagFast(StorageSlotFlag.Party5))
|
||||
return 4;
|
||||
if (value.HasFlagFast(StorageSlotFlag.Party6))
|
||||
return 5;
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1972,6 +1972,13 @@
|
|||
<None Include="Resources\img\Pokemon Sprites\133-1p.png" />
|
||||
<None Include="Resources\img\Pokemon Sprites\25-8p.png" />
|
||||
<None Include="Resources\img\misc\icon_favo.png" />
|
||||
<None Include="Resources\img\misc\party1.png" />
|
||||
<None Include="Resources\img\misc\party2.png" />
|
||||
<None Include="Resources\img\misc\party3.png" />
|
||||
<None Include="Resources\img\misc\party4.png" />
|
||||
<None Include="Resources\img\misc\party5.png" />
|
||||
<None Include="Resources\img\misc\party6.png" />
|
||||
<None Include="Resources\img\misc\starter.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" />
|
||||
|
|
70
PKHeX.WinForms/Properties/Resources.Designer.cs
generated
|
@ -28218,6 +28218,66 @@ namespace PKHeX.WinForms.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap party1 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("party1", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap party2 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("party2", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap party3 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("party3", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap party4 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("party4", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap party5 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("party5", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap party6 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("party6", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Byte[].
|
||||
/// </summary>
|
||||
|
@ -29416,6 +29476,16 @@ namespace PKHeX.WinForms.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap starter {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("starter", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
|
|
@ -9235,4 +9235,25 @@
|
|||
<data name="icon_favo" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\misc\icon_favo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="party1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\misc\party1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="party2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\misc\party2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="party3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\misc\party3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="party4" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\misc\party4.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="party5" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\misc\party5.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="party6" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\misc\party6.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="starter" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\img\misc\starter.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
BIN
PKHeX.WinForms/Resources/img/misc/party1.png
Normal file
After Width: | Height: | Size: 772 B |
BIN
PKHeX.WinForms/Resources/img/misc/party2.png
Normal file
After Width: | Height: | Size: 848 B |
BIN
PKHeX.WinForms/Resources/img/misc/party3.png
Normal file
After Width: | Height: | Size: 845 B |
BIN
PKHeX.WinForms/Resources/img/misc/party4.png
Normal file
After Width: | Height: | Size: 831 B |
BIN
PKHeX.WinForms/Resources/img/misc/party5.png
Normal file
After Width: | Height: | Size: 874 B |
BIN
PKHeX.WinForms/Resources/img/misc/party6.png
Normal file
After Width: | Height: | Size: 874 B |
BIN
PKHeX.WinForms/Resources/img/misc/starter.png
Normal file
After Width: | Height: | Size: 790 B |
|
@ -130,13 +130,24 @@ namespace PKHeX.WinForms
|
|||
var flags = SAV.GetSlotFlags(box, slot);
|
||||
if (flags.HasFlagFast(StorageSlotFlag.Locked))
|
||||
sprite = ImageUtil.LayerImage(sprite, Resources.locked, 26, 0);
|
||||
else if (flags != 0)
|
||||
int team = flags.IsBattleTeam();
|
||||
if (team >= 0)
|
||||
sprite = ImageUtil.LayerImage(sprite, Resources.team, 21, 0);
|
||||
int party = flags.IsParty();
|
||||
if (party >= 0)
|
||||
sprite = ImageUtil.LayerImage(sprite, PartyMarks[party], 24, 0);
|
||||
if (flags.HasFlagFast(StorageSlotFlag.Starter))
|
||||
sprite = ImageUtil.LayerImage(sprite, Resources.starter, 0, 0);
|
||||
}
|
||||
|
||||
return sprite;
|
||||
}
|
||||
|
||||
private static readonly Image[] PartyMarks =
|
||||
{
|
||||
Resources.party1, Resources.party2, Resources.party3, Resources.party4, Resources.party5, Resources.party6,
|
||||
};
|
||||
|
||||
public static void GetSpriteGlow(PKM pk, byte[] bgr, out byte[] pixels, out Image baseSprite, bool forceHollow = false)
|
||||
{
|
||||
bool egg = pk.IsEgg;
|
||||
|
|