From 0dc27743a43739f14f7220b4ec7dcc3ada3c8b61 Mon Sep 17 00:00:00 2001 From: BoBIsHere86 <55356015+BoBIsHere86@users.noreply.github.com> Date: Tue, 3 Dec 2024 15:09:59 -0500 Subject: [PATCH] Support for Layer TintColor in TiledMap (#7076) * Added in Ability to load in the tintcolor attribute from a tiled tmx file. This will replicate the layer tinting found in tiled. Added Opacity on a Group Parent Layer to affect child layers as this was not implemented previously, it now replicates what tiled does, same goes for the new tint color working on group layers. There was a typo in one of the comments in the Color class. I cleaned it up and removed the typo. * Added Test TiledMapLayerTintOpacityTest for the new tintcolor layer. And modified a missed piece of code in OrthoCachedTiledMapRenderer * Apply formatter * Changed background color of map test to reflect default tiled background color. * Added tinting code to all the renderImageLayer() to specifically work as seen in the TiledMap Editor. Slight refactoring of tinting related code in MapLayer. Updated rendering code to use the combined Tint Color of the layer and it's parent to match what is seen in the TiledMap Editor. Modified all previous tinting test maps to include image layers. Added one new test map which includes a bunch of nested parent groups. * Apply formatter * Added method to check if image contained in TiledMapImageLayer supports transparency or not based on if it contains a png or gif (since they are supported by TiledMap Editor. Modified render logic based on transparency support of image format. Added small png badlogic logo to testmaps. * Apply formatter * Created 2 methods in BatchTiledMapRenderer specifically related to calculating the render colors for ImageLayers and TileLayers. This code was duplicated throughout 5 Map renderers. This should help clean it up and give a single point of entry for calculating colors for the map renderer's that extend the BatchTiledMapRenderer. Refactored methods meant to check for transparency support in the TiledMapImageLayer. Now we directly check against the image texture's pixel format to determine whether this image can properly handle alpha values in a tint color. Created static helper method in BaseTmxMapLoader meant to be used to translate TiledMap color formats to the libGDX equivalent. This cuts down on code duplication and is available for use elsewhere if needed. Removed redundant 1 values from OrthoCachedTiledMapRenderer Color multiplication. Small changes to 3 of the test maps, (image positions, etc) * Apply formatter * Moved tiled color utility method to BaseTiledMapLoader. Updated BaseTmjMapLoader to parse tint colors to be in parity with the BaseTmxMapLoader. * Apply formatter --------- Co-authored-by: GitHub Action --- gdx/src/com/badlogic/gdx/graphics/Color.java | 4 +- gdx/src/com/badlogic/gdx/maps/MapLayer.java | 29 ++- .../gdx/maps/tiled/BaseTiledMapLoader.java | 18 +- .../gdx/maps/tiled/BaseTmjMapLoader.java | 5 + .../gdx/maps/tiled/BaseTmxMapLoader.java | 5 + .../gdx/maps/tiled/TiledMapImageLayer.java | 30 +++ .../renderers/BatchTiledMapRenderer.java | 45 +++- .../renderers/HexagonalTiledMapRenderer.java | 5 +- .../IsometricStaggeredTiledMapRenderer.java | 5 +- .../renderers/IsometricTiledMapRenderer.java | 5 +- .../OrthoCachedTiledMapRenderer.java | 21 +- .../renderers/OrthogonalTiledMapRenderer.java | 2 +- .../badlogic-with-whitespace-small.png | Bin 0 -> 14651 bytes .../data/maps/tiled-tint-opacity/hex.tmx | 46 ++++ .../data/maps/tiled-tint-opacity/iso.tmx | 94 +++++++++ .../data/maps/tiled-tint-opacity/iso_stag.tmx | 92 ++++++++ .../data/maps/tiled-tint-opacity/ortho.tmx | 163 +++++++++++++++ .../maps/tiled-tint-opacity/ortho_cached.tmx | 159 ++++++++++++++ .../ortho_deep_group_tints.tmx | 156 ++++++++++++++ .../tiled-tint-opacity/ortho_w_img_layer.tmx | 197 ++++++++++++++++++ .../data/maps/tiled-tint-opacity/sky.png | Bin 0 -> 1161 bytes .../tests/TiledMapLayerTintOpacityTest.java | 170 +++++++++++++++ .../badlogic/gdx/tests/utils/GdxTests.java | 1 + 23 files changed, 1231 insertions(+), 21 deletions(-) create mode 100644 tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/badlogic-with-whitespace-small.png create mode 100644 tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/hex.tmx create mode 100644 tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/iso.tmx create mode 100644 tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/iso_stag.tmx create mode 100644 tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/ortho.tmx create mode 100644 tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/ortho_cached.tmx create mode 100644 tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/ortho_deep_group_tints.tmx create mode 100644 tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/ortho_w_img_layer.tmx create mode 100644 tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/sky.png create mode 100644 tests/gdx-tests/src/com/badlogic/gdx/tests/TiledMapLayerTintOpacityTest.java diff --git a/gdx/src/com/badlogic/gdx/graphics/Color.java b/gdx/src/com/badlogic/gdx/graphics/Color.java index 96f01ff0991..914d2a86d2f 100644 --- a/gdx/src/com/badlogic/gdx/graphics/Color.java +++ b/gdx/src/com/badlogic/gdx/graphics/Color.java @@ -116,7 +116,7 @@ public Color set (Color color) { } /** Sets this color to the red, green and blue components of the provided Color and a deviating alpha value. - * + * * @param rgb the desired red, green and blue values (alpha of that Color is ignored) * @param alpha the desired alpha value (will be clamped to the range [0, 1]) * @return this color. */ @@ -128,7 +128,7 @@ public Color set (Color rgb, float alpha) { return this; } - /** Multiplies the this color and the given color + /** Multiplies this color and the given color * * @param color the color * @return this color. */ diff --git a/gdx/src/com/badlogic/gdx/maps/MapLayer.java b/gdx/src/com/badlogic/gdx/maps/MapLayer.java index 99550eda0eb..e072355c3fb 100644 --- a/gdx/src/com/badlogic/gdx/maps/MapLayer.java +++ b/gdx/src/com/badlogic/gdx/maps/MapLayer.java @@ -16,12 +16,15 @@ package com.badlogic.gdx.maps; +import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.utils.GdxRuntimeException; /** Map layer containing a set of objects and properties */ public class MapLayer { private String name = ""; private float opacity = 1.0f; + private Color tintColor = new Color(Color.WHITE); + private Color tempColor = new Color(Color.WHITE); private boolean visible = true; private float offsetX; private float offsetY; @@ -46,7 +49,10 @@ public void setName (String name) { /** @return layer's opacity */ public float getOpacity () { - return opacity; + if (parent != null) + return opacity * parent.getOpacity(); + else + return opacity; } /** @param opacity new opacity for the layer */ @@ -54,6 +60,27 @@ public void setOpacity (float opacity) { this.opacity = opacity; } + /** Returns a temporary color that is the combination of this layer's tint color and its parent's tint color. The returned + * color is reused internally, so it should not be held onto or modified. + * @return layer's tint color combined with the parent's tint color */ + public Color getCombinedTintColor () { + if (parent != null) { + return tempColor.set(tintColor).mul(parent.getCombinedTintColor()); + } else { + return tempColor.set(tintColor); + } + } + + /** @return layer's tint color */ + public Color getTintColor () { + return tintColor; + } + + /** @param tintColor new tint color for the layer */ + public void setTintColor (Color tintColor) { + this.tintColor.set(tintColor); + } + /** @return layer's x offset */ public float getOffsetX () { return offsetX; diff --git a/gdx/src/com/badlogic/gdx/maps/tiled/BaseTiledMapLoader.java b/gdx/src/com/badlogic/gdx/maps/tiled/BaseTiledMapLoader.java index 79dd5f91b62..5287ad9ff04 100644 --- a/gdx/src/com/badlogic/gdx/maps/tiled/BaseTiledMapLoader.java +++ b/gdx/src/com/badlogic/gdx/maps/tiled/BaseTiledMapLoader.java @@ -103,10 +103,8 @@ protected Object castProperty (String name, String value, String type) { } else if (type.equals("bool")) { return Boolean.valueOf(value); } else if (type.equals("color")) { - // Tiled uses the format #AARRGGBB - String opaqueColor = value.substring(3); - String alpha = value.substring(1, 3); - return Color.valueOf(opaqueColor + alpha); + // return color after converting from #AARRGGBB to #RRGGBBAA + return Color.valueOf(tiledColorToLibGDXColor(value)); } else { throw new GdxRuntimeException( "Wrong type given for property " + name + ", given : " + type + ", supported : string, bool, int, float, color"); @@ -162,4 +160,16 @@ protected void addStaticTiledMapTile (TiledMapTileSet tileSet, TextureRegion tex tileSet.putTile(tileId, tile); } + /** Converts Tiled's color format #AARRGGBB to a libGDX appropriate #RRGGBBAA The Tiled Map Editor uses the color format + * #AARRGGBB But note, if the alpha of the color is set to 255, Tiled does not include it as part of the color code in the .tmx + * ex. Red (r:255,g:0,b:0,a:255) becomes #ff0000, Red (r:255,g:0,b:0,a:127) becomes #7fff0000 + * + * @param tiledColor A String representing a color in Tiled's #AARRGGBB format + * @return A String representing the color in the #RRGGBBAA format */ + public static String tiledColorToLibGDXColor (String tiledColor) { + String alpha = tiledColor.length() == 9 ? tiledColor.substring(1, 3) : "ff"; + String color = tiledColor.length() == 9 ? tiledColor.substring(3) : tiledColor.substring(1); + return color + alpha; + } + } diff --git a/gdx/src/com/badlogic/gdx/maps/tiled/BaseTmjMapLoader.java b/gdx/src/com/badlogic/gdx/maps/tiled/BaseTmjMapLoader.java index 82ae8f2fafe..d42b3a651ed 100644 --- a/gdx/src/com/badlogic/gdx/maps/tiled/BaseTmjMapLoader.java +++ b/gdx/src/com/badlogic/gdx/maps/tiled/BaseTmjMapLoader.java @@ -20,6 +20,7 @@ import com.badlogic.gdx.assets.loaders.FileHandleResolver; import com.badlogic.gdx.assets.loaders.TextureLoader; import com.badlogic.gdx.files.FileHandle; +import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.maps.*; import com.badlogic.gdx.maps.objects.EllipseMapObject; @@ -300,6 +301,7 @@ protected void loadImageLayer (TiledMap map, MapLayers parentLayers, JsonValue e protected void loadBasicLayerInfo (MapLayer layer, JsonValue element) { String name = element.getString("name"); float opacity = element.getFloat("opacity", 1.0f); + String tintColor = element.getString("tintcolor", "#ffffffff"); boolean visible = element.getBoolean("visible", true); float offsetX = element.getFloat("offsetx", 0); float offsetY = element.getFloat("offsety", 0); @@ -313,6 +315,9 @@ protected void loadBasicLayerInfo (MapLayer layer, JsonValue element) { layer.setOffsetY(offsetY); layer.setParallaxX(parallaxX); layer.setParallaxY(parallaxY); + + // set layer tint color after converting from #AARRGGBB to #RRGGBBAA + layer.setTintColor(Color.valueOf(tiledColorToLibGDXColor(tintColor))); } protected void loadObject (TiledMap map, MapLayer layer, JsonValue element) { diff --git a/gdx/src/com/badlogic/gdx/maps/tiled/BaseTmxMapLoader.java b/gdx/src/com/badlogic/gdx/maps/tiled/BaseTmxMapLoader.java index 154876e96b2..c4f4fabea27 100644 --- a/gdx/src/com/badlogic/gdx/maps/tiled/BaseTmxMapLoader.java +++ b/gdx/src/com/badlogic/gdx/maps/tiled/BaseTmxMapLoader.java @@ -20,6 +20,7 @@ import com.badlogic.gdx.assets.loaders.FileHandleResolver; import com.badlogic.gdx.assets.loaders.TextureLoader; import com.badlogic.gdx.files.FileHandle; +import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.maps.*; import com.badlogic.gdx.maps.objects.EllipseMapObject; @@ -307,6 +308,7 @@ protected void loadImageLayer (TiledMap map, MapLayers parentLayers, Element ele protected void loadBasicLayerInfo (MapLayer layer, Element element) { String name = element.getAttribute("name", null); float opacity = Float.parseFloat(element.getAttribute("opacity", "1.0")); + String tintColor = element.getAttribute("tintcolor", "#ffffffff"); boolean visible = element.getIntAttribute("visible", 1) == 1; float offsetX = element.getFloatAttribute("offsetx", 0); float offsetY = element.getFloatAttribute("offsety", 0); @@ -320,6 +322,9 @@ protected void loadBasicLayerInfo (MapLayer layer, Element element) { layer.setOffsetY(offsetY); layer.setParallaxX(parallaxX); layer.setParallaxY(parallaxY); + + // set layer tint color after converting from #AARRGGBB to #RRGGBBAA + layer.setTintColor(Color.valueOf(tiledColorToLibGDXColor(tintColor))); } protected void loadObject (TiledMap map, MapLayer layer, Element element) { diff --git a/gdx/src/com/badlogic/gdx/maps/tiled/TiledMapImageLayer.java b/gdx/src/com/badlogic/gdx/maps/tiled/TiledMapImageLayer.java index 37cac3bff4a..e0bee4c167a 100644 --- a/gdx/src/com/badlogic/gdx/maps/tiled/TiledMapImageLayer.java +++ b/gdx/src/com/badlogic/gdx/maps/tiled/TiledMapImageLayer.java @@ -16,6 +16,7 @@ package com.badlogic.gdx.maps.tiled; +import com.badlogic.gdx.graphics.Pixmap; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.maps.MapLayer; @@ -27,6 +28,7 @@ public class TiledMapImageLayer extends MapLayer { private float y; private boolean repeatX; private boolean repeatY; + private boolean supportsTransparency; public TiledMapImageLayer (TextureRegion region, float x, float y, boolean repeatX, boolean repeatY) { this.region = region; @@ -34,6 +36,34 @@ public TiledMapImageLayer (TextureRegion region, float x, float y, boolean repea this.y = y; this.repeatX = repeatX; this.repeatY = repeatY; + this.supportsTransparency = checkTransparencySupport(region); + } + + /** TiledMap ImageLayers can support transparency through tint color if the image provided supports the proper pixel format. + * Here we check to see if the file supports transparency by checking the format of the TextureData. + * + * @param region TextureRegion of the ImageLayer + * @return boolean */ + private boolean checkTransparencySupport (TextureRegion region) { + Pixmap.Format format = region.getTexture().getTextureData().getFormat(); + return format != null && formatHasAlpha(format); + } + + // Check if pixel format supports alpha channel + private boolean formatHasAlpha (Pixmap.Format format) { + switch (format) { + case Alpha: + case LuminanceAlpha: + case RGBA4444: + case RGBA8888: + return true; + default: + return false; + } + } + + public boolean supportsTransparency () { + return supportsTransparency; } public TextureRegion getTextureRegion () { diff --git a/gdx/src/com/badlogic/gdx/maps/tiled/renderers/BatchTiledMapRenderer.java b/gdx/src/com/badlogic/gdx/maps/tiled/renderers/BatchTiledMapRenderer.java index 3211d84a2e6..59e98d1ba77 100644 --- a/gdx/src/com/badlogic/gdx/maps/tiled/renderers/BatchTiledMapRenderer.java +++ b/gdx/src/com/badlogic/gdx/maps/tiled/renderers/BatchTiledMapRenderer.java @@ -46,10 +46,7 @@ import com.badlogic.gdx.maps.MapLayer; import com.badlogic.gdx.maps.MapLayers; import com.badlogic.gdx.maps.MapObject; -import com.badlogic.gdx.maps.tiled.TiledMap; -import com.badlogic.gdx.maps.tiled.TiledMapImageLayer; -import com.badlogic.gdx.maps.tiled.TiledMapRenderer; -import com.badlogic.gdx.maps.tiled.TiledMapTileLayer; +import com.badlogic.gdx.maps.tiled.*; import com.badlogic.gdx.maps.tiled.tiles.AnimatedTiledMapTile; import com.badlogic.gdx.math.Matrix4; import com.badlogic.gdx.math.Rectangle; @@ -186,7 +183,8 @@ public void renderObject (MapObject object) { @Override public void renderImageLayer (TiledMapImageLayer layer) { final Color batchColor = batch.getColor(); - final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity()); + + final float color = getImageLayerColor(layer, batchColor); final float[] vertices = this.vertices; @@ -309,6 +307,43 @@ public void renderImageLayer (TiledMapImageLayer layer) { } } + /** Calculates the float color for rendering an image layer, taking into account the layer's tint color, opacity, and whether + * the image format supports transparency then multiplying is against the batchColor + * + * @param layer The layer to render. + * @param batchColor The current color of the batch. + * @return The float color value to use for rendering. */ + protected float getImageLayerColor (TiledMapImageLayer layer, Color batchColor) { + + final Color combinedTint = layer.getCombinedTintColor(); + + // Check if layer supports transparency + boolean supportsTransparency = layer.supportsTransparency(); + + // If the Image Layer supports transparency we do not want to modify the combined tint during rendering + // and if the Image Layer does not support transparency, we want to multiply the combined tint values, by its alpha + float alphaMultiplier = supportsTransparency ? 1f : combinedTint.a; + // Only modify opacity by combinedTint.b if Image Layer supports transparency + float opacityMultiplier = supportsTransparency ? combinedTint.a : 1f; + + // For image layer rendering multiply all by alpha + // except for opacity when image layer does not support transparency + return Color.toFloatBits(batchColor.r * (combinedTint.r * alphaMultiplier), + batchColor.g * (combinedTint.g * alphaMultiplier), batchColor.b * (combinedTint.b * alphaMultiplier), + batchColor.a * (layer.getOpacity() * opacityMultiplier)); + } + + /** Calculates the float color for rendering a tile layer, taking into account the layer's tint color and opacity, then + * multiplying is against the batchColor + * + * @param layer + * @param batchColor + * @return */ + protected float getTileLayerColor (TiledMapTileLayer layer, Color batchColor) { + return Color.toFloatBits(batchColor.r * layer.getCombinedTintColor().r, batchColor.g * layer.getCombinedTintColor().g, + batchColor.b * layer.getCombinedTintColor().b, batchColor.a * layer.getCombinedTintColor().a * layer.getOpacity()); + } + /** Called before the rendering of all layers starts. */ protected void beginRender () { AnimatedTiledMapTile.updateAnimationBaseTime(); diff --git a/gdx/src/com/badlogic/gdx/maps/tiled/renderers/HexagonalTiledMapRenderer.java b/gdx/src/com/badlogic/gdx/maps/tiled/renderers/HexagonalTiledMapRenderer.java index a41dde4e829..bfbc80d74be 100644 --- a/gdx/src/com/badlogic/gdx/maps/tiled/renderers/HexagonalTiledMapRenderer.java +++ b/gdx/src/com/badlogic/gdx/maps/tiled/renderers/HexagonalTiledMapRenderer.java @@ -109,7 +109,7 @@ private void init (TiledMap map) { @Override public void renderTileLayer (TiledMapTileLayer layer) { final Color batchColor = batch.getColor(); - final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity()); + final float color = getTileLayerColor(layer, batchColor); final int layerWidth = layer.getWidth(); final int layerHeight = layer.getHeight(); @@ -263,7 +263,8 @@ private void renderCell (final TiledMapTileLayer.Cell cell, final float x, final @Override public void renderImageLayer (TiledMapImageLayer layer) { final Color batchColor = batch.getColor(); - final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity()); + + final float color = getImageLayerColor(layer, batchColor); final float[] vertices = this.vertices; diff --git a/gdx/src/com/badlogic/gdx/maps/tiled/renderers/IsometricStaggeredTiledMapRenderer.java b/gdx/src/com/badlogic/gdx/maps/tiled/renderers/IsometricStaggeredTiledMapRenderer.java index be1c66be8e3..ebc948d5c71 100644 --- a/gdx/src/com/badlogic/gdx/maps/tiled/renderers/IsometricStaggeredTiledMapRenderer.java +++ b/gdx/src/com/badlogic/gdx/maps/tiled/renderers/IsometricStaggeredTiledMapRenderer.java @@ -48,7 +48,7 @@ public IsometricStaggeredTiledMapRenderer (TiledMap map, float unitScale, Batch @Override public void renderTileLayer (TiledMapTileLayer layer) { final Color batchColor = batch.getColor(); - final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity()); + final float color = getTileLayerColor(layer, batchColor); final int layerWidth = layer.getWidth(); final int layerHeight = layer.getHeight(); @@ -192,7 +192,8 @@ public void renderTileLayer (TiledMapTileLayer layer) { @Override public void renderImageLayer (TiledMapImageLayer layer) { final Color batchColor = batch.getColor(); - final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity()); + + final float color = getImageLayerColor(layer, batchColor); final float[] vertices = this.vertices; diff --git a/gdx/src/com/badlogic/gdx/maps/tiled/renderers/IsometricTiledMapRenderer.java b/gdx/src/com/badlogic/gdx/maps/tiled/renderers/IsometricTiledMapRenderer.java index 8af8b70df29..bb404ccfbd2 100644 --- a/gdx/src/com/badlogic/gdx/maps/tiled/renderers/IsometricTiledMapRenderer.java +++ b/gdx/src/com/badlogic/gdx/maps/tiled/renderers/IsometricTiledMapRenderer.java @@ -85,7 +85,7 @@ private Vector3 translateScreenToIso (Vector2 vec) { @Override public void renderTileLayer (TiledMapTileLayer layer) { final Color batchColor = batch.getColor(); - final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity()); + final float color = getTileLayerColor(layer, batchColor); float tileWidth = layer.getTileWidth() * unitScale; float tileHeight = layer.getTileHeight() * unitScale; @@ -236,7 +236,8 @@ public void renderTileLayer (TiledMapTileLayer layer) { @Override public void renderImageLayer (TiledMapImageLayer layer) { final Color batchColor = batch.getColor(); - final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity()); + + final float color = getImageLayerColor(layer, batchColor); final float[] vertices = this.vertices; diff --git a/gdx/src/com/badlogic/gdx/maps/tiled/renderers/OrthoCachedTiledMapRenderer.java b/gdx/src/com/badlogic/gdx/maps/tiled/renderers/OrthoCachedTiledMapRenderer.java index 8d46b10bdad..b58e48a50fe 100644 --- a/gdx/src/com/badlogic/gdx/maps/tiled/renderers/OrthoCachedTiledMapRenderer.java +++ b/gdx/src/com/badlogic/gdx/maps/tiled/renderers/OrthoCachedTiledMapRenderer.java @@ -209,7 +209,9 @@ public void renderObject (MapObject object) { @Override public void renderTileLayer (TiledMapTileLayer layer) { - final float color = Color.toFloatBits(1, 1, 1, layer.getOpacity()); + + final float color = Color.toFloatBits(layer.getCombinedTintColor().r, layer.getCombinedTintColor().g, + layer.getCombinedTintColor().b, layer.getOpacity() * layer.getCombinedTintColor().a); final int layerWidth = layer.getWidth(); final int layerHeight = layer.getHeight(); @@ -359,7 +361,22 @@ public void renderTileLayer (TiledMapTileLayer layer) { @Override public void renderImageLayer (TiledMapImageLayer layer) { - final float color = Color.toFloatBits(1.0f, 1.0f, 1.0f, layer.getOpacity()); + + final Color combinedTint = layer.getCombinedTintColor(); + // Check if layer supports transparency + boolean supportsTransparency = layer.supportsTransparency(); + + // If the Image Layer supports transparency we do not want to modify the combined tint during rendering + // and if the Image Layer does not support transparency, we want to multiply the combined tint values, by its alpha + float alphaMultiplier = supportsTransparency ? 1f : combinedTint.a; + // Only modify opacity by combinedTint.b if Image Layer supports transparency + float opacityMultiplier = supportsTransparency ? combinedTint.a : 1f; + + // For image layer rendering multiply all by alpha + // except for opacity when image layer does not support transparency + final float color = Color.toFloatBits(combinedTint.r * alphaMultiplier, combinedTint.g * alphaMultiplier, + combinedTint.b * alphaMultiplier, layer.getOpacity() * opacityMultiplier); + final float[] vertices = this.vertices; TextureRegion region = layer.getTextureRegion(); diff --git a/gdx/src/com/badlogic/gdx/maps/tiled/renderers/OrthogonalTiledMapRenderer.java b/gdx/src/com/badlogic/gdx/maps/tiled/renderers/OrthogonalTiledMapRenderer.java index c9d2402e7a1..2a2cadb55e2 100644 --- a/gdx/src/com/badlogic/gdx/maps/tiled/renderers/OrthogonalTiledMapRenderer.java +++ b/gdx/src/com/badlogic/gdx/maps/tiled/renderers/OrthogonalTiledMapRenderer.java @@ -66,7 +66,7 @@ public OrthogonalTiledMapRenderer (TiledMap map, float unitScale, Batch batch) { @Override public void renderTileLayer (TiledMapTileLayer layer) { final Color batchColor = batch.getColor(); - final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity()); + final float color = getTileLayerColor(layer, batchColor); final int layerWidth = layer.getWidth(); final int layerHeight = layer.getHeight(); diff --git a/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/badlogic-with-whitespace-small.png b/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/badlogic-with-whitespace-small.png new file mode 100644 index 0000000000000000000000000000000000000000..3fba7698ee1fd7c8270f501031b9a8a8c9c77d86 GIT binary patch literal 14651 zcmWk!161987{0AmEt|`>ZP&8xRxR6H_OiXK#Vsvkan-WD?B)7?U+1)Yc5n69i$_r^ zN;1d@1PBla1X)g2QVqPy|NjjS3;yL*@;L-A@0?_HT_F%e%>TckAXzzh5D0?uCkY7^ z6>CQ~M^|e{CsH{H2~sB)N6SxkA0ZI0rCfC@4fO*Yq1&}(9yfi9ZRa{} z_r_nE=Y{vHuW}nF;kx0G(quVQxq^@?#EH>2LWcSWH+PstgApj5AZYN77G$o^6i|@6 z06{?p@@}}F5Gb!1M0iNIVsc-U=1X7TQ z4X*a;*=qu&c4C4%z6HgY>97m-mE6p1`(<~s%1IOg*>nq-dSPT~BnT3K4YGeJqB@1K zHbN|Lzm2hMKoxC<6dWvRUpf7MZ=?#pv@S00?(8gl=oi;F9ntoGvFbJM)_%6T4-kC1 zz1jG=MH$R)7%T&Gx6wOxtx)oQGU;8Y*~(sm%+q(o*C(PG@_sq9Rvmh*ZB-2Cc*(5T zEA|rdDDfn^0jlX&i>-CWM`+=7F32|cVkAk)tTECkG6WBSNEQUse-k6T?!ja1hJD}jcBKdL z$%H#poU*@H98Da-BIvz~30?JPaoX_lZ$$JaEPq6aIJ;G?!;_s*n0qyUpa?mkKA6Ji z_0V<%zk?AQhQ~A|TZ)7-i`JothsVtfyCdt7g~5oSB>feMrAjWJ$R*3B7Og?5DNA%I z^C$C1T8YK9pRSn%9bz?qR?+Jqu zEYC`ZRq#?cxLQu5jwJr z6mu8}m@H_%krMqplo(MG>@=-k-pJK|)tJVZmY#M{qc~u!$mWzKph*6;WMSI?$CtuL z$}k+Zle^Qm!?8oSLw2c;kZUID{Pj+Ki&kyK<^%pN+AilV?8gjtG0oyEwbk-M4Ro#q zJ@J~t7PUInh;mF$_bk5g5F9!AlA5B_83Jou>)TItf8E;9S5t|V(tm4Dj~>YUP5%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_3;x!Qyw%!x)& zs(m)i4IU?Yuqf|`|4tQyfFO8!2#AQ20q?>{K@oW8f6eNlK|N#kdP__oeXFwkV%2t$pSu-u9|fL zX|Dg(ZB`QqFo{8?4~0Z{42Xo*Ha1&3zmh}6$*2`FL=6ny|9=QckOQU`7S0QJe)vBE z47&Em%fk@}$drL#Y5VHL59e)=ORnpBApoK)E!Gy$clpW4p?#>rK`R=7hhQVszrM6Y zkByBDm^LW7nwlC74Goie9iTUX+{)1Q|5h8g*cAsJFh_`p6!rB9acv3F(Ss-Vi-8#e zrUM2B2I$hwNm!7=0e#n}@1&`T9J6t;JycOuMZv+53?w#iulj-$K)MBl)*MY#A%rfIAT7Uo=MzY$L*%5CBx}V@KK}=+P%uFN literal 0 HcmV?d00001 diff --git a/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/hex.tmx b/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/hex.tmx new file mode 100644 index 00000000000..66035f1841a --- /dev/null +++ b/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/hex.tmx @@ -0,0 +1,46 @@ + + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + + + + + + + + + + + + + + + + + + diff --git a/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/iso.tmx b/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/iso.tmx new file mode 100644 index 00000000000..358ffb22129 --- /dev/null +++ b/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/iso.tmx @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + eJxjYBgFo2AUjIJRMApGAS2BxCgexTTAAKGUDhE= + + + + + eJztwzENAAAAAiBj2D+pKfxgo0mqqt7CwwASFiyJ + + + + + eJztkFELwyAMhHW6tWylo24w//8vXYQ7uAZf+5aDDzSJJpeeUurGz3gZH7Ah1iW/GDeQjSr3gntFrsiZ7wc7coMVfdijufdZav3f7M/cmP0NFpf/ij968D2q1HtPrG+TGt7ppUmcOZ1Xd6eeyD7Zr55XeLgbh/GQHiWdd6KzavyJd36W7P6gJ1+vzGYdhEKhUCgUulZ/HucDtw== + + + + + eJztk8kOwjAMRJMm7FspiPL/X4ojecTDwA2JSyyNQpV4xsuQUo8ev4+7YTJkw2CohuJYGJZ+Hgwbw86w8vvqeQVnBY/QNI64E2/7vTbcnHv2t1vck595Bfzt+4K6svOuUGP73jv/7Gg6Z+eMedItuOOMBtShWtp5DRrCFHIy6s8AZ3/w2jJyF5jVDC3NmPMiH/ehHsYP867eQ+SnxhB4tJeaXr2QwUWd8mUfsQ/tXz1P0GAv4lI+36nHe3qdlTyvOsf0PkP1l4MO/SzPnEI/+p8MyB/T0wvaP71coHNBPn0mreh3eiPOsL3p0aPHf+MBrZ4Isg== + + + + + + + + eJztUtkOwyAM4yp02tHd3f9/6YJkS27Wl70TySqFOIkNIYwYMWLEiBH/RwKioQARe5OhSg7zMvIycs6Gg+ED3OW8SG1yk+NdsK/nnKXnvQwPwwn1j4Ymc5JDPvE0rG6mIpwIzKg3YZ4V+ao1uS97d+6C+ZrMXF1+37tJ/a7hDQ9q+PVHPVB9Rfq2sNVzhVbWb9ijHtXMNblECVsvU9jeN/Uu0n8W/Xrnyf1zre/Ma/R8nUd9US/2/PGcJH20V3Y1dNbooGd7PZWnfnpf/fv7AtqTBMA= + + + + + + + + + + + + + + + + + + diff --git a/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/iso_stag.tmx b/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/iso_stag.tmx new file mode 100644 index 00000000000..236906dd66b --- /dev/null +++ b/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/iso_stag.tmx @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + + + + + + + + + + + + + + + + + + diff --git a/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/ortho.tmx b/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/ortho.tmx new file mode 100644 index 00000000000..6fd35db2e11 --- /dev/null +++ b/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/ortho.tmx @@ -0,0 +1,163 @@ + + + + + +0,0,0,0,97,98,0,0,0,0,0,0,0,0,0, +0,0,0,97,105,105,98,0,0,0,0,0,0,0,0, +0,0,0,99,102,102,100,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,115,116, +0,0,0,0,0,0,0,0,0,0,0,0,0,113,114, +0,0,0,0,0,0,0,0,0,0,0,0,0,113,114, +0,0,0,0,0,0,0,0,0,0,0,0,0,113,114 + + + + +0,0,0,0,0,0,0,0,0,0,0,97,98,0,0, +0,0,0,0,0,0,0,0,0,97,101,105,105,98,0, +0,0,0,0,0,0,0,0,97,105,105,105,105,105,98, +0,0,0,0,0,0,0,0,99,102,102,102,102,102,100, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0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,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +2,2,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,109,5,2,6,108,0, +0,0,0,0,0,0,0,0,0,0,3,1,4,0,0, +0,0,0,0,0,0,0,0,0,0,10,11,12,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + + + + + + + + + + + + + + + diff --git a/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/ortho_cached.tmx b/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/ortho_cached.tmx new file mode 100644 index 00000000000..beebb56d456 --- /dev/null +++ b/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/ortho_cached.tmx @@ -0,0 +1,159 @@ + + + + + +0,0,0,0,97,98,0,0,0,0,0,0,0,0,0, +0,0,0,97,105,105,98,0,0,0,0,0,0,0,0, +0,0,0,99,102,102,100,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,115,116, +0,0,0,0,0,0,0,0,0,0,0,0,0,113,114, +0,0,0,0,0,0,0,0,0,0,0,0,0,113,114, +0,0,0,0,0,0,0,0,0,0,0,0,0,113,114 + + + + +0,0,0,0,0,0,0,0,0,0,0,97,98,0,0, +0,0,0,0,0,0,0,0,0,97,101,105,105,98,0, +0,0,0,0,0,0,0,0,97,105,105,105,105,105,98, +0,0,0,0,0,0,0,0,99,102,102,102,102,102,100, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,16,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,115,116,0,0,0,0,0,0,0,0,0,0,0, +0,0,113,114,0,0,0,0,0,0,0,0,0,0,0, +0,0,113,114,0,0,0,0,0,0,0,0,0,0,0, +0,0,113,114,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,17,0,0,0,0,0,0,0,0,0,0,0, +0,0,17,18,0,0,0,0,0,0,0,0,0,0,0, +0,0,18,1,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +2,2,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,109,5,2,6,108,0, +0,0,0,0,0,0,0,0,0,0,3,1,4,0,0, +0,0,0,0,0,0,0,0,0,0,10,11,12,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + + + + + + + + + + + + + + + diff --git a/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/ortho_deep_group_tints.tmx b/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/ortho_deep_group_tints.tmx new file mode 100644 index 00000000000..08dbb0c46d7 --- /dev/null +++ b/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/ortho_deep_group_tints.tmx @@ -0,0 +1,156 @@ + + + + + +49,50,51,52,53,54,55,56,49,50,51,52,53,54,55, +50,51,52,53,54,55,56,49,50,51,52,53,54,55,56, +49,50,51,52,53,54,55,56,49,50,51,52,53,54,55, +49,50,51,52,53,54,55,56,49,50,51,52,53,54,55, +49,50,51,52,53,54,55,49,50,51,52,53,54,55,56, +49,50,51,52,53,54,55,56,50,51,52,53,54,55,56, +49,50,51,52,53,54,55,49,50,51,52,53,54,55,56, +49,50,51,52,53,54,55,49,50,51,52,53,54,55,56, +5,2,2,2,2,2,2,2,2,2,2,2,2,2,6, +10,11,11,11,11,11,11,11,11,11,11,11,11,11,12 + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,14,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,13,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,13,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,13,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,13,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,5,2,6,0,0,0,0,0,0,0,0,0,0,0, +0,10,11,12,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,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,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +115,116,0,0,0,0,0,0,0,0,0,0,0,0,0, +1073741939,1073741940,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +115,116,0,0,0,0,0,0,0,0,0,0,0,0,0, +1073741939,1073741940,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + + diff --git a/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/ortho_w_img_layer.tmx b/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/ortho_w_img_layer.tmx new file mode 100644 index 00000000000..bf12994187b --- /dev/null +++ b/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/ortho_w_img_layer.tmx @@ -0,0 +1,197 @@ + + + + + + + + +0,0,0,0,97,98,0,0,0,0,0,0,0,0,0, +0,0,0,97,105,105,98,0,0,0,0,0,0,0,0, +0,0,0,99,102,102,100,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,115,116, +0,0,0,0,0,0,0,0,0,0,0,0,0,113,114, +0,0,0,0,0,0,0,0,0,0,0,0,0,113,114, +0,0,0,0,0,0,0,0,0,0,0,0,0,113,114 + + + + +0,0,0,0,0,0,0,0,0,0,0,97,98,0,0, +0,0,0,0,0,0,0,0,0,97,101,105,105,98,0, +0,0,0,0,0,0,0,0,97,105,105,105,105,105,98, +0,0,0,0,0,0,0,0,99,102,102,102,102,102,100, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,115,116,0,0,0,0,0,0,0,0,0,0,0, +0,0,113,114,0,0,0,0,0,0,0,0,0,0,0, +0,0,113,114,0,0,0,0,0,0,0,0,0,0,0, +0,0,113,114,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0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0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,16,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,16,0,16,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + + + + + + + diff --git a/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/sky.png b/tests/gdx-tests-android/assets/data/maps/tiled-tint-opacity/sky.png new file mode 100644 index 0000000000000000000000000000000000000000..c1bc040028bf0f799a8eab166169ee83d39c4612 GIT binary patch literal 1161 zcmeAS@N?(olHy`uVBq!ia0vp^9~c-I9XQy4tfm(qgMk!dage(c!@6@aFBuqEoIPC} zLn`LHy>*cDu!8{0!RXDFTK{cW!uWo5w5{U!Bbin^%kuhPdxuN!U&}M>Q9mG{Mh&#> z^H+U_xZBDHCp>LwGf+2a$xPr7PT;s*=^F1}&0B4l{tN|2Hc7Fgwp+aGs$m1~uq27jI&l3|JrBaN{Qp2E06p zOgxEk3&9$Isx22Pp5f#Li2>2H2#}RN4T@*dRX9MZfm(qIpk^zwBbhBFaY$#Q0!XW0 z2FT$Evw`N=DLc*ps)m{kRLTNY4K*h`1LTRcPF9fCVkfY>(aq+uQ~;^|e*oqnU@!pv z%W2T^_J;sZB-Cf{;7B{cm{YghXDWp literal 0 HcmV?d00001 diff --git a/tests/gdx-tests/src/com/badlogic/gdx/tests/TiledMapLayerTintOpacityTest.java b/tests/gdx-tests/src/com/badlogic/gdx/tests/TiledMapLayerTintOpacityTest.java new file mode 100644 index 00000000000..bdd2716851e --- /dev/null +++ b/tests/gdx-tests/src/com/badlogic/gdx/tests/TiledMapLayerTintOpacityTest.java @@ -0,0 +1,170 @@ +/******************************************************************************* + * Copyright 2011 See AUTHORS file. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +package com.badlogic.gdx.tests; + +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.Input; +import com.badlogic.gdx.assets.AssetManager; +import com.badlogic.gdx.assets.loaders.resolvers.InternalFileHandleResolver; +import com.badlogic.gdx.graphics.Color; +import com.badlogic.gdx.graphics.OrthographicCamera; +import com.badlogic.gdx.graphics.g2d.BitmapFont; +import com.badlogic.gdx.graphics.g2d.SpriteBatch; +import com.badlogic.gdx.graphics.glutils.ShapeRenderer; +import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType; +import com.badlogic.gdx.maps.tiled.TiledMap; +import com.badlogic.gdx.maps.tiled.TiledMapRenderer; +import com.badlogic.gdx.maps.tiled.TmxMapLoader; +import com.badlogic.gdx.maps.tiled.renderers.*; +import com.badlogic.gdx.tests.utils.GdxTest; +import com.badlogic.gdx.tests.utils.OrthoCamController; +import com.badlogic.gdx.utils.Disposable; +import com.badlogic.gdx.utils.ScreenUtils; + +public class TiledMapLayerTintOpacityTest extends GdxTest { + private final static String MAP_ORTHO = "data/maps/tiled-tint-opacity/ortho.tmx"; + private final static String MAP_ORTHO_CACHED = "data/maps/tiled-tint-opacity/ortho_cached.tmx"; + private final static String MAP_ISO = "data/maps/tiled-tint-opacity/iso.tmx"; + private final static String MAP_ISO_STAG = "data/maps/tiled-tint-opacity/iso_stag.tmx"; + private final static String MAP_HEX = "data/maps/tiled-tint-opacity/hex.tmx"; + private final static String MAP_ORTHO_W_IMG = "data/maps/tiled-tint-opacity/ortho_w_img_layer.tmx"; + private final static String MAP_ORTHO_DEEP_GROUP_TINT = "data/maps/tiled-tint-opacity/ortho_deep_group_tints.tmx"; + + private TiledMap map; + private TiledMapRenderer renderer; + private OrthographicCamera camera; + private OrthoCamController cameraController; + private AssetManager assetManager; + private BitmapFont font; + private SpriteBatch batch; + private ShapeRenderer shapeRenderer; + private int mapType = 0; + + @Override + public void create () { + float w = Gdx.graphics.getWidth(); + float h = Gdx.graphics.getHeight(); + + camera = new OrthographicCamera(); + camera.setToOrtho(false, (w / h) * 10, 10); + camera.zoom = 2; + camera.update(); + + cameraController = new OrthoCamController(camera); + Gdx.input.setInputProcessor(cameraController); + + font = new BitmapFont(); + batch = new SpriteBatch(); + shapeRenderer = new ShapeRenderer(); + + assetManager = new AssetManager(); + assetManager.setLoader(TiledMap.class, new TmxMapLoader(new InternalFileHandleResolver())); + assetManager.load(MAP_ORTHO, TiledMap.class); + assetManager.load(MAP_ORTHO_CACHED, TiledMap.class); + assetManager.load(MAP_ISO, TiledMap.class); + assetManager.load(MAP_ISO_STAG, TiledMap.class); + assetManager.load(MAP_HEX, TiledMap.class); + assetManager.load(MAP_ORTHO_W_IMG, TiledMap.class); + assetManager.load(MAP_ORTHO_DEEP_GROUP_TINT, TiledMap.class); + assetManager.finishLoading(); + + map = assetManager.get(MAP_ORTHO); + renderer = new OrthogonalTiledMapRenderer(map, 1f / 32f); + } + + @Override + public void render () { + if (Gdx.input.isKeyJustPressed(Input.Keys.NUM_1)) { + if (mapType != 0) { + if (renderer instanceof Disposable) ((Disposable)renderer).dispose(); + mapType = 0; + map = assetManager.get(MAP_ORTHO); + renderer = new OrthogonalTiledMapRenderer(map, 1f / 32f); + } + } else if (Gdx.input.isKeyJustPressed(Input.Keys.NUM_2)) { + if (mapType != 1) { + if (renderer instanceof Disposable) ((Disposable)renderer).dispose(); + mapType = 1; + map = assetManager.get(MAP_ORTHO_CACHED); + renderer = new OrthoCachedTiledMapRenderer(map, 1f / 32f); + ((OrthoCachedTiledMapRenderer)renderer).setBlending(true); + } + } else if (Gdx.input.isKeyJustPressed(Input.Keys.NUM_3)) { + if (mapType != 2) { + if (renderer instanceof Disposable) ((Disposable)renderer).dispose(); + mapType = 2; + map = assetManager.get(MAP_ISO); + renderer = new IsometricTiledMapRenderer(map, 1f / 64f); + } + } else if (Gdx.input.isKeyJustPressed(Input.Keys.NUM_4)) { + if (mapType != 3) { + if (renderer instanceof Disposable) ((Disposable)renderer).dispose(); + mapType = 3; + map = assetManager.get(MAP_ISO_STAG); + renderer = new IsometricStaggeredTiledMapRenderer(map, 1f / 64f); + } + } else if (Gdx.input.isKeyJustPressed(Input.Keys.NUM_5)) { + if (mapType != 4) { + if (renderer instanceof Disposable) ((Disposable)renderer).dispose(); + mapType = 4; + map = assetManager.get(MAP_HEX); + renderer = new HexagonalTiledMapRenderer(map, 1f / 128f); + } + } else if (Gdx.input.isKeyJustPressed(Input.Keys.NUM_6)) { + if (mapType != 5) { + if (renderer instanceof Disposable) ((Disposable)renderer).dispose(); + mapType = 5; + map = assetManager.get(MAP_ORTHO_W_IMG); + renderer = new OrthogonalTiledMapRenderer(map, 1f / 32f); + } + } else if (Gdx.input.isKeyJustPressed(Input.Keys.NUM_7)) { + if (mapType != 6) { + if (renderer instanceof Disposable) ((Disposable)renderer).dispose(); + mapType = 6; + map = assetManager.get(MAP_ORTHO_DEEP_GROUP_TINT); + renderer = new OrthogonalTiledMapRenderer(map, 1f / 32f); + } + } + + ScreenUtils.clear(137f / 255f, 137f / 255f, 137f / 255f, 1f); + camera.update(); + + // add margin to view bounds so it is easy to see any issues with clipping, calculated same way as + // BatchTiledMapRenderer#setView (OrthographicCamera) + final float margin = 3; + final float width = camera.viewportWidth * camera.zoom - margin * 2; + final float height = camera.viewportHeight * camera.zoom - margin * 2; + final float w = width * Math.abs(camera.up.y) + height * Math.abs(camera.up.x); + final float h = height * Math.abs(camera.up.y) + width * Math.abs(camera.up.x); + final float x = camera.position.x - w / 2; + final float y = camera.position.y - h / 2; + renderer.setView(camera.combined, x, y, w, h); + renderer.render(); + + shapeRenderer.setProjectionMatrix(camera.combined); + shapeRenderer.begin(ShapeType.Line); + shapeRenderer.setColor(Color.RED); + shapeRenderer.rect(x, y, w, h); + shapeRenderer.end(); + + batch.begin(); + font.draw(batch, "FPS: " + Gdx.graphics.getFramesPerSecond(), 10, 20); + font.draw(batch, "Switch type with 1-7", Gdx.graphics.getHeight() - 100, 50); + font.draw(batch, renderer.getClass().getSimpleName(), Gdx.graphics.getHeight() - 100, 20); + batch.end(); + } +} diff --git a/tests/gdx-tests/src/com/badlogic/gdx/tests/utils/GdxTests.java b/tests/gdx-tests/src/com/badlogic/gdx/tests/utils/GdxTests.java index a73da8873d7..ee445c57b83 100644 --- a/tests/gdx-tests/src/com/badlogic/gdx/tests/utils/GdxTests.java +++ b/tests/gdx-tests/src/com/badlogic/gdx/tests/utils/GdxTests.java @@ -318,6 +318,7 @@ public class GdxTests { TiledMapObjectPropertyTest.class, TiledMapBench.class, TiledMapLayerOffsetTest.class, + TiledMapLayerTintOpacityTest.class, TiledMapJsonFormatTest.class, TiledMapJsonObjectLoadingTest.class, TimerTest.class,