1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 08:35:20 +02:00

Adding particle blend, glow and animation (#4705)

This commit is contained in:
Foghrye4
2016-11-14 18:09:59 +04:00
committed by Zeno-
parent 649448a2a9
commit 93e3555eae
15 changed files with 800 additions and 81 deletions

View File

@@ -35,10 +35,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "noise.h"
#include <json/json.h>
struct EnumString es_TileAnimationType[] =
struct EnumString es_AnimationType[] =
{
{TAT_NONE, "none"},
{TAT_VERTICAL_FRAMES, "vertical_frames"},
{AT_NONE, "none"},
{AT_VERTICAL_FRAMES, "vertical_frames"},
{AT_2D_ANIMATION_SHEET, "2d_animation_sheet"},
{0, NULL},
};
@@ -335,9 +336,9 @@ TileDef read_tiledef(lua_State *L, int index, u8 drawtype)
lua_getfield(L, index, "animation");
if(lua_istable(L, -1)){
// {type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0}
tiledef.animation.type = (TileAnimationType)
getenumfield(L, -1, "type", es_TileAnimationType,
TAT_NONE);
tiledef.animation.type = (AnimationType)
getenumfield(L, -1, "type", es_AnimationType,
AT_NONE);
tiledef.animation.aspect_w =
getintfield_default(L, -1, "aspect_w", 16);
tiledef.animation.aspect_h =