From 8a9c5746b554e61664ff478097757f86bdc7e899 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 26 Apr 2017 16:09:58 -0400 Subject: [PATCH] v0.6.0: improved visuals for wooden walls in some cases --- .../shatteredpixeldungeon/tiles/DungeonTileSheet.java | 4 ++-- .../shatteredpixeldungeon/tiles/DungeonWallsTilemap.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonTileSheet.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonTileSheet.java index 32b0930b5..a28a3b95f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonTileSheet.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonTileSheet.java @@ -271,10 +271,10 @@ public class DungeonTileSheet { private static final int WALL_INTERNAL = WALLS_INTERNAL+0; private static final int WALL_INTERNAL_WOODEN = WALLS_INTERNAL+16; - public static int stitchInternalWallTile(int tile, int right, int rightBelow, int leftBelow, int left){ + public static int stitchInternalWallTile(int tile, int right, int rightBelow, int below, int leftBelow, int left){ int result; - if (tile == Terrain.BOOKSHELF) result = WALL_INTERNAL_WOODEN; + if (tile == Terrain.BOOKSHELF || below == Terrain.BOOKSHELF) result = WALL_INTERNAL_WOODEN; else result = WALL_INTERNAL; if (!wallStitcheable(right)) result += 1; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonWallsTilemap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonWallsTilemap.java index 445a0c636..12fe1b938 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonWallsTilemap.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonWallsTilemap.java @@ -52,6 +52,7 @@ public class DungeonWallsTilemap extends DungeonTilemap { tile, (pos+1) % mapWidth != 0 ? map[pos + 1] : -1, (pos+1) % mapWidth != 0 && pos + mapWidth < size ? map[pos + 1 + mapWidth] : -1, + pos + mapWidth < size ? map[pos + mapWidth] : -1, pos % mapWidth != 0 && pos + mapWidth < size ? map[pos - 1 + mapWidth] : -1, pos % mapWidth != 0 ? map[pos - 1] : -1 );