Add all circle Pokémon images; add setting for sprite preference (#3402)

* Add sprite builder toggling for forced-circle sprites

* Add assets for all LA Pokémon sprites

Co-authored-by: sora10pls <17801814+sora10pls@users.noreply.github.com>
This commit is contained in:
Kurt 2022-02-05 14:54:01 -08:00 committed by GitHub
parent 3ca8c4c69f
commit ea327a5c03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
643 changed files with 8351 additions and 824 deletions

View file

@ -31,6 +31,8 @@ public abstract class SpriteBuilder : ISpriteBuilder<Image>
protected abstract int EggItemShiftX { get; }
protected abstract int EggItemShiftY { get; }
public abstract bool HasFallbackMethod { get; }
public abstract Bitmap Hover { get; }
public abstract Bitmap View { get; }
public abstract Bitmap Set { get; }
@ -49,6 +51,7 @@ public abstract class SpriteBuilder : ISpriteBuilder<Image>
protected abstract string GetSpriteStringSpeciesOnly(int species);
protected abstract string GetSpriteAll(int species, int form, int gender, uint formarg, bool shiny, int generation);
protected abstract string GetSpriteAllSecondary(int species, int form, int gender, uint formarg, bool shiny, int generation);
protected abstract string GetItemResourceName(int item);
protected abstract Bitmap Unknown { get; }
protected abstract Bitmap GetEggSprite(int species);
@ -126,7 +129,13 @@ public abstract class SpriteBuilder : ISpriteBuilder<Image>
private Image? GetBaseImageDefault(int species, int form, int gender, uint formarg, bool shiny, int generation)
{
var file = GetSpriteAll(species, form, gender, formarg, shiny, generation);
return (Image?)Resources.ResourceManager.GetObject(file);
var resource = (Image?)Resources.ResourceManager.GetObject(file);
if (resource is null && HasFallbackMethod)
{
file = GetSpriteAllSecondary(species, form, gender, formarg, shiny, generation);
resource = (Image?)Resources.ResourceManager.GetObject(file);
}
return resource;
}
private Image GetBaseImageFallback(int species, int form, int gender, uint formarg, bool shiny, int generation)

View file

@ -7,7 +7,7 @@ namespace PKHeX.Drawing.PokeSprite;
/// <summary>
/// 56 high, 68 wide sprite builder
/// </summary>
public sealed class SpriteBuilder5668 : SpriteBuilder
public sealed class SpriteBuilder5668s : SpriteBuilder
{
public override int Height => 56;
public override int Width => 68;
@ -17,9 +17,11 @@ public sealed class SpriteBuilder5668 : SpriteBuilder
protected override int ItemMaxSize => 32;
protected override int EggItemShiftX => 18;
protected override int EggItemShiftY => 1;
public override bool HasFallbackMethod => true;
protected override string GetSpriteStringSpeciesOnly(int species) => 'b' + $"_{species}";
protected override string GetSpriteAll(int species, int form, int gender, uint formarg, bool shiny, int generation) => 'b' + SpriteName.GetResourceStringSprite(species, form, gender, formarg, generation, shiny);
protected override string GetSpriteAllSecondary(int species, int form, int gender, uint formarg, bool shiny, int generation) => 'c' + SpriteName.GetResourceStringSprite(species, form, gender, formarg, generation, shiny);
protected override string GetItemResourceName(int item) => 'b' + $"item_{item}";
protected override Bitmap Unknown => Resources.b_unknown;
protected override Bitmap GetEggSprite(int species) => species == (int)Species.Manaphy ? Resources.b_490_e : Resources.b_egg;

View file

@ -0,0 +1,40 @@
using System.Drawing;
using PKHeX.Core;
using PKHeX.Drawing.PokeSprite.Properties;
namespace PKHeX.Drawing.PokeSprite;
/// <summary>
/// 56 high, 68 wide sprite builder using Circular Sprites
/// </summary>
public sealed class SpriteBuilder5668c : SpriteBuilder
{
public override int Height => 56;
public override int Width => 68;
protected override int ItemShiftX => 2;
protected override int ItemShiftY => 2;
protected override int ItemMaxSize => 32;
protected override int EggItemShiftX => 18;
protected override int EggItemShiftY => 1;
public override bool HasFallbackMethod => true;
protected override string GetSpriteStringSpeciesOnly(int species) => 'c' + $"_{species}";
protected override string GetSpriteAll(int species, int form, int gender, uint formarg, bool shiny, int generation) => 'c' + SpriteName.GetResourceStringSprite(species, form, gender, formarg, generation, shiny);
protected override string GetSpriteAllSecondary(int species, int form, int gender, uint formarg, bool shiny, int generation) => 'b' + SpriteName.GetResourceStringSprite(species, form, gender, formarg, generation, shiny);
protected override string GetItemResourceName(int item) => 'b' + $"item_{item}";
protected override Bitmap Unknown => Resources.b_unknown;
protected override Bitmap GetEggSprite(int species) => species == (int)Species.Manaphy ? Resources.b_490_e : Resources.b_egg;
public override Bitmap Hover => Resources.slotHover68;
public override Bitmap View => Resources.slotView68;
public override Bitmap Set => Resources.slotSet68;
public override Bitmap Delete => Resources.slotDel68;
public override Bitmap Transparent => Resources.slotTrans68;
public override Bitmap Drag => Resources.slotDrag68;
public override Bitmap UnknownItem => Resources.bitem_unk;
public override Bitmap None => Resources.b_0;
public override Bitmap ItemTM => Resources.bitem_tm;
public override Bitmap ItemTR => Resources.bitem_tr;
public override Bitmap ShadowLugia => Resources.b_249x;
}

View file

@ -0,0 +1,37 @@
using PKHeX.Core;
using static PKHeX.Drawing.PokeSprite.SpriteBuilderMode;
using static PKHeX.Drawing.PokeSprite.SpriteBuilderPreference;
namespace PKHeX.Drawing.PokeSprite;
public enum SpriteBuilderMode
{
KeepCurrent,
SpritesClassic5668,
CircleMugshot5668,
}
public enum SpriteBuilderPreference
{
UseSuggested,
DoNotChange,
ForceSprites,
ForceMugshots,
}
public static class SpriteBuilderUtil
{
public static SpriteBuilderPreference SpriterPreference { get; set; } = UseSuggested;
public static SpriteBuilderMode GetSuggestedMode(SaveFile sav) => SpriterPreference switch
{
ForceMugshots => CircleMugshot5668,
ForceSprites => SpritesClassic5668,
DoNotChange => KeepCurrent,
_ => sav switch // Default, suggest.
{
SAV8LA => CircleMugshot5668,
_ => SpritesClassic5668,
},
};
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Some files were not shown because too many files have changed in this diff Show more