summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ContentManagers
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-11-18 21:08:48 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-11-18 21:08:48 -0500
commit5c1516aaab3a542a73e625e723d4e4425809946c (patch)
tree76ba68987d641f419430a27fcf5b8225dc9d7a17 /src/SMAPI/Framework/ContentManagers
parentf154c5774d6e6197d63ca284606ce965a920d212 (diff)
downloadSMAPI-5c1516aaab3a542a73e625e723d4e4425809946c.tar.gz
SMAPI-5c1516aaab3a542a73e625e723d4e4425809946c.tar.bz2
SMAPI-5c1516aaab3a542a73e625e723d4e4425809946c.zip
optimise map tilesheet fixing slightly
Diffstat (limited to 'src/SMAPI/Framework/ContentManagers')
-rw-r--r--src/SMAPI/Framework/ContentManagers/ModContentManager.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/ContentManagers/ModContentManager.cs b/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
index b88bd71e..90b86179 100644
--- a/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
+++ b/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
@@ -240,7 +240,13 @@ namespace StardewModdingAPI.Framework.ContentManagers
Color[] data = new Color[texture.Width * texture.Height];
texture.GetData(data);
for (int i = 0; i < data.Length; i++)
+ {
+ if (data[i].A == 0)
+ continue; // no need to change fully transparent pixels
+
data[i] = Color.FromNonPremultiplied(data[i].ToVector4());
+ }
+
texture.SetData(data);
return texture;
}