]> git.lizzy.rs Git - minetest.git/blobdiff - src/client/tile.h
Rewrite rendering engine (#6253)
[minetest.git] / src / client / tile.h
index 8a8c5bd4788c05f381d7300b8f8ecfb76eea4d7f..e69dbe0c7bb3d6d7352dd74f28f907a53662ee13 100644 (file)
@@ -209,7 +209,8 @@ struct TileLayer
                        texture_id == other.texture_id &&
                        material_type == other.material_type &&
                        material_flags == other.material_flags &&
-                       color == other.color;
+                       color == other.color &&
+                       scale == other.scale;
        }
 
        /*!
@@ -237,6 +238,8 @@ struct TileLayer
                case TILE_MATERIAL_LIQUID_TRANSPARENT:
                        material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
                        break;
+               default:
+                       break;
                }
                material.BackfaceCulling = (material_flags & MATERIAL_FLAG_BACKFACE_CULLING) != 0;
                if (!(material_flags & MATERIAL_FLAG_TILEABLE_HORIZONTAL)) {
@@ -296,6 +299,8 @@ struct TileLayer
         * a color then the color of the node owning this tile.
         */
        video::SColor color;
+
+       u8 scale;
 };
 
 /*!
@@ -304,8 +309,8 @@ struct TileLayer
 struct TileSpec
 {
        TileSpec() {
-               for (int layer = 0; layer < MAX_TILE_LAYERS; layer++)
-                       layers[layer] = TileLayer();
+               for (auto &layer : layers)
+                       layer = TileLayer();
        }
 
        /*!
@@ -323,6 +328,9 @@ struct TileSpec
                        && emissive_light == other.emissive_light;
        }
 
+       //! If true, the tile rotation is ignored.
+       bool world_aligned = false;
+       //! Tile rotation.
        u8 rotation = 0;
        //! This much light does the tile emit.
        u8 emissive_light = 0;