Add tm sprite for held item

No longer uses the generic 'unknown' item sprite
This commit is contained in:
Kaphotics 2016-08-06 10:01:40 -07:00
parent 8410ea4b9e
commit dab1bf44ae
5 changed files with 53 additions and 56 deletions

View file

@ -708,6 +708,7 @@
<None Include="Resources\img\box\xy\box_wp03xy.png" />
<None Include="Resources\img\box\xy\box_wp02xy.png" />
<None Include="Resources\img\box\xy\box_wp01xy.png" />
<None Include="Resources\img\item\item_tm.png" />
<Content Include="Resources\text\de\text_Pokeblock_de.txt" />
<None Include="Resources\text\de\text_tradeao_de.txt" />
<None Include="Resources\text\de\text_tradexy_de.txt" />

View file

@ -457,7 +457,7 @@ namespace PKHeX
}
// Data Requests
internal static Image getSprite(int species, int form, int gender, int item, bool isegg, bool shiny)
internal static Image getSprite(int species, int form, int gender, int item, bool isegg, bool shiny, int generation = -1)
{
if (species == 0)
return (Image)Resources.ResourceManager.GetObject("_0");
@ -499,6 +499,9 @@ namespace PKHeX
if (item > 0)
{
Image itemimg = (Image)Resources.ResourceManager.GetObject("item_" + item) ?? Resources.helditem;
if ((generation == 3 || generation == 4) && 328 <= item && item <= 419) // gen3/4 TM
itemimg = Resources.item_tm;
// Redraw
baseImage = Util.LayerImage(baseImage, itemimg, 22 + (15 - itemimg.Width) / 2, 15 + (15 - itemimg.Height), 1);
}
@ -506,7 +509,7 @@ namespace PKHeX
}
internal static Image getSprite(PKM pkm)
{
return getSprite(pkm.Species, pkm.AltForm, pkm.Gender, pkm.HeldItem, pkm.IsEgg, pkm.IsShiny);
return getSprite(pkm.Species, pkm.AltForm, pkm.Gender, pkm.HeldItem, pkm.IsEgg, pkm.IsShiny, pkm.Format);
}
// Font Related

View file

@ -15132,6 +15132,16 @@ namespace PKHeX.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap item_tm {
get {
object obj = ResourceManager.GetObject("item_tm", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized string similar to ! PKHeX Interface Customization File
///! Languages: Save this file accordingly and put it in the same folder as PKHeX&apos;s executable.
@ -15181,11 +15191,11 @@ namespace PKHeX.Properties {
/// <summary>
/// Looks up a localized string similar to ! PKHeX Interface Customization File
///! Languages: Save this file accordingly and put it in the same folder as PKHeX&apos;s executable.
///! lang_en.txt = English
///! lang_jp.txt = Japanese
///! lang_en.txt = Inglés
///! lang_jp.txt = Japonés
///! lang_fr.txt = French
///! lang_de.txt = German
///! lang_es.txt = Spanish
///! lang_de.txt = Alemán
///! lang_es.txt = Español
///! lang_it.txt = Italian
///! lang_ko.txt = Korean
///! lang_zh.txt = Chinese
@ -15193,7 +15203,7 @@ namespace PKHeX.Properties {
///! Make sure that each edit has a &apos; = &apos; between Control name and new Text!
///!
///! -----------------------------------------------------
///- DO NOT CHANGE THI [rest of string was truncated]&quot;;.
///- DO NOT CHANGE THIS [rest of string was truncated]&quot;;.
/// </summary>
internal static string lang_es {
get {
@ -20500,18 +20510,18 @@ namespace PKHeX.Properties {
/// <summary>
/// Looks up a localized string similar to None
///Rock Smash (HGSS)
///Tall Grass
///Golpe roca (HGSS)
///Hierba Alta
///
///Dialga/Palkia
///Cave/Hall of Origin
///Cueva/Sala del Origen
///
///Surfing/Fishing
///Surfeando/Pescando
///
///Building/Enigma Stone
///Marsh/Safari
///Edificio/Misticristal
///Pantano/Safari
///
///Starter/Fossil/Gift (DP)
///Inicial/Fosil/Regalo (DP)
///
///
///
@ -20522,8 +20532,8 @@ namespace PKHeX.Properties {
///
///
///
///Distortion World (Pt)
///Starter/Fossil/Gift (Pt/DP Trio).
///Mundo Distorsion (Pt)
///Inicial/Fosil/Regalo (Pt/DP Trio).
/// </summary>
internal static string text_encountertype_es {
get {
@ -20697,7 +20707,7 @@ namespace PKHeX.Properties {
}
/// <summary>
/// Looks up a localized string similar to
/// Looks up a localized string similar to Spiky
///
///
///
@ -20949,9 +20959,7 @@ namespace PKHeX.Properties {
///
///
///
///
///
/// /// [rest of string was truncated]&quot;;.
/// [rest of string was truncated]&quot;;.
/// </summary>
internal static string text_forms_de {
get {
@ -20960,7 +20968,7 @@ namespace PKHeX.Properties {
}
/// <summary>
/// Looks up a localized string similar to
/// Looks up a localized string similar to Spiky
///
///
///
@ -21212,9 +21220,7 @@ namespace PKHeX.Properties {
///
///
///
///
///
/// /// [rest of string was truncated]&quot;;.
/// [rest of string was truncated]&quot;;.
/// </summary>
internal static string text_forms_en {
get {
@ -21223,7 +21229,7 @@ namespace PKHeX.Properties {
}
/// <summary>
/// Looks up a localized string similar to
/// Looks up a localized string similar to Spiky
///
///
///
@ -21474,10 +21480,7 @@ namespace PKHeX.Properties {
///
///
///
///
///
///
/// [rest of string was truncated]&quot;;.
/// /// [rest of string was truncated]&quot;;.
/// </summary>
internal static string text_forms_es {
get {
@ -21486,7 +21489,7 @@ namespace PKHeX.Properties {
}
/// <summary>
/// Looks up a localized string similar to
/// Looks up a localized string similar to Spiky
///
///
///
@ -21736,10 +21739,7 @@ namespace PKHeX.Properties {
///
///
///
///
///
///
/// [rest of string was truncated]&quot;;.
/// /// [rest of string was truncated]&quot;;.
/// </summary>
internal static string text_forms_fr {
get {
@ -21748,7 +21748,7 @@ namespace PKHeX.Properties {
}
/// <summary>
/// Looks up a localized string similar to
/// Looks up a localized string similar to Spiky
///
///
///
@ -21999,10 +21999,7 @@ namespace PKHeX.Properties {
///
///
///
///
///
///
/// [rest of string was truncated]&quot;;.
/// /// [rest of string was truncated]&quot;;.
/// </summary>
internal static string text_forms_it {
get {
@ -22011,7 +22008,7 @@ namespace PKHeX.Properties {
}
/// <summary>
/// Looks up a localized string similar to
/// Looks up a localized string similar to Spiky
///
///
///
@ -22262,9 +22259,7 @@ namespace PKHeX.Properties {
///
///
///
///
///
/// /// [rest of string was truncated]&quot;;.
/// [rest of string was truncated]&quot;;.
/// </summary>
internal static string text_forms_ja {
get {
@ -22273,7 +22268,7 @@ namespace PKHeX.Properties {
}
/// <summary>
/// Looks up a localized string similar to
/// Looks up a localized string similar to Spiky
///
///
///
@ -22525,9 +22520,7 @@ namespace PKHeX.Properties {
///
///
///
///
///
/// /// [rest of string was truncated]&quot;;.
/// [rest of string was truncated]&quot;;.
/// </summary>
internal static string text_forms_ko {
get {
@ -22536,7 +22529,7 @@ namespace PKHeX.Properties {
}
/// <summary>
/// Looks up a localized string similar to
/// Looks up a localized string similar to Spiky
///
///
///
@ -22787,10 +22780,7 @@ namespace PKHeX.Properties {
///
///
///
///
///
///
/// [rest of string was truncated]&quot;;.
/// /// [rest of string was truncated]&quot;;.
/// </summary>
internal static string text_forms_zh {
get {
@ -22878,8 +22868,8 @@ namespace PKHeX.Properties {
///RojoFuego
///VerdeHoja
///
///HeartGold
///SoulSilver
///Oro HeartGold
///Plata SoulSilver
///
///Diamante
///Perla
@ -22897,8 +22887,8 @@ namespace PKHeX.Properties {
///Negra2
///X
///Y
///AS
///OR.
///Zafiro Alfa
///Rubí Omega.
/// </summary>
internal static string text_games_es {
get {

View file

@ -6382,4 +6382,7 @@
<data name="slotView1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\box\slotView.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="item_tm" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\item\item_tm.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: 777 B