From 3182d3342c88b14202a8034ecdbbdcd67c55d204 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 13 Jun 2020 23:49:01 -0400 Subject: [PATCH] v0.8.1: moved fog back to a POT texture (NPOT caused rare errors) --- .../shatteredpixeldungeon/tiles/FogOfWar.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/FogOfWar.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/FogOfWar.java index cf45db772..b1003ba33 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/FogOfWar.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/FogOfWar.java @@ -109,12 +109,13 @@ public class FogOfWar extends Image { } float size = DungeonTilemap.SIZE / PIX_PER_TILE; - width = pWidth * size; - height = pHeight * size; + width = width2 * size; + height = height2 * size; //TODO might be nice to compartmentalize the pixmap access and modification into texture/texturecache - Pixmap px = new Pixmap(pWidth, pHeight, Pixmap.Format.RGBA8888); + Pixmap px = new Pixmap(width2, height2, Pixmap.Format.RGBA8888); px.setBlending(Pixmap.Blending.None); + px.setColor(0x000000FF); px.fill(); SmartTexture tx = new SmartTexture(px, Texture.LINEAR, Texture.CLAMP, false); TextureCache.add(FogOfWar.class, tx);