mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-13 16:15:22 -05:00
Add setting to force large sprites for past gen
Causes the Other tab (daycare/gts/fused) to look wonky (not scaled), but I'm ok with that being a known flaw for now.
This commit is contained in:
@@ -9,7 +9,7 @@ public static class SpriteUtil
|
||||
{
|
||||
public static readonly SpriteBuilder3040 SB17 = new SpriteBuilder3040();
|
||||
public static readonly SpriteBuilder5668 SB8 = new SpriteBuilder5668();
|
||||
public static SpriteBuilder Spriter { get; set; } = SB17;
|
||||
public static SpriteBuilder Spriter { get; set; } = SB8;
|
||||
|
||||
public static Image GetBallSprite(int ball)
|
||||
{
|
||||
@@ -216,13 +216,25 @@ public static void GetSpriteGlow(Image baseSprite, byte blue, byte green, byte r
|
||||
public static Image Sprite(this PKM pk, SaveFile sav, int box, int slot, bool flagIllegal = false)
|
||||
=> GetSprite(pk, sav, box, slot, flagIllegal);
|
||||
|
||||
public static bool UseLargeAlways { get; set; } = true;
|
||||
|
||||
public static void Initialize(SaveFile sav)
|
||||
{
|
||||
var big = GameVersion.GG.Contains(sav.Version) || sav.Generation >= 8;
|
||||
Spriter = big ? (SpriteBuilder)SB8 : SB17;
|
||||
var s = GetSpriter(sav);
|
||||
|
||||
// gen3 specific sprites
|
||||
Spriter.Initialize(sav);
|
||||
s.Initialize(sav);
|
||||
|
||||
Spriter = s;
|
||||
}
|
||||
|
||||
private static SpriteBuilder GetSpriter(SaveFile sav)
|
||||
{
|
||||
if (UseLargeAlways)
|
||||
return SB8;
|
||||
|
||||
var big = GameVersion.GG.Contains(sav.Version) || sav.Generation >= 8;
|
||||
return big ? (SpriteBuilder) SB8 : SB17;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -436,6 +436,7 @@ private void ReloadProgramSettings(Settings settings)
|
||||
ParseSettings.AllowGen1Tradeback = settings.AllowGen1Tradeback;
|
||||
ParseSettings.Gen8TransferTrackerNotPresent = settings.FlagMissingTracker ? Severity.Invalid : Severity.Fishy;
|
||||
PKME_Tabs.HideSecretValues = C_SAV.HideSecretDetails = settings.HideSecretDetails;
|
||||
SpriteUtil.UseLargeAlways = settings.UseLargeSprites;
|
||||
}
|
||||
|
||||
private void MainMenuBoxLoad(object sender, EventArgs e)
|
||||
|
||||
12
PKHeX.WinForms/Properties/Settings.Designer.cs
generated
12
PKHeX.WinForms/Properties/Settings.Designer.cs
generated
@@ -346,5 +346,17 @@ internal sealed partial class Settings : global::System.Configuration.Applicatio
|
||||
this["ApplyNature"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool UseLargeSprites {
|
||||
get {
|
||||
return ((bool)(this["UseLargeSprites"]));
|
||||
}
|
||||
set {
|
||||
this["UseLargeSprites"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,5 +83,8 @@
|
||||
<Setting Name="ApplyNature" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="UseLargeSprites" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
Reference in New Issue
Block a user