From b22144f1e643b10495098f40ea4998e4a30e70aa Mon Sep 17 00:00:00 2001 From: Digus Date: Sat, 30 Nov 2019 02:14:51 -0300 Subject: [PATCH] Change to make the mod compatible with any other mod that increase the asset texture size in the game. --- HDSprites/AssetTexture.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/HDSprites/AssetTexture.cs b/HDSprites/AssetTexture.cs index 6e80e8e..9c4a2a1 100644 --- a/HDSprites/AssetTexture.cs +++ b/HDSprites/AssetTexture.cs @@ -51,6 +51,13 @@ public AssetTexture(string assetName, Texture2D originalTexture, Texture2D hdTex this.HDTexture = Upscaler.Upscale(lowerTexture, cursorsFlag); this.EXTexture = Upscaler.Upscale(upperTexture, cursorsFlag); } + else if (hdTexture != null && this.Height * this.Scale > hdTexture.Height) + { + Texture2D lowerTexture = new Texture2D(this.GraphicsDevice, this.Width, this.Height); + lowerTexture.SetData(0, lowerTexture.Bounds, data, 0, lowerTexture.Width * lowerTexture.Height); + + this.HDTexture = Upscaler.Upscale(lowerTexture, false); + } } public void SetOriginalTexture(Texture2D texture)