From 75320e7e88ab5088a46c9e42c1e789cbdacb13b0 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Sun, 15 Oct 2017 10:34:14 +0300 Subject: Real global textures (#6105) * Real global textures * Add world-aligned textures * Update minimal to support world-aligned tiles * Update minimal --- src/script/common/c_content.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/script/common') diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp index 8f08de1e5..4d8cdd352 100644 --- a/src/script/common/c_content.cpp +++ b/src/script/common/c_content.cpp @@ -431,6 +431,16 @@ TileDef read_tiledef(lua_State *L, int index, u8 drawtype) L, index, "tileable_horizontal", default_tiling); tiledef.tileable_vertical = getboolfield_default( L, index, "tileable_vertical", default_tiling); + std::string align_style; + if (getstringfield(L, index, "align_style", align_style)) { + if (align_style == "user") + tiledef.align_style = ALIGN_STYLE_USER_DEFINED; + else if (align_style == "world") + tiledef.align_style = ALIGN_STYLE_WORLD; + else + tiledef.align_style = ALIGN_STYLE_NODE; + } + tiledef.scale = getintfield_default(L, index, "scale", 0); // color = ... lua_getfield(L, index, "color"); tiledef.has_color = read_color(L, -1, &tiledef.color); -- cgit v1.2.3