From d4e0c0f9b818120286369b33b1bdb5eb6ece7a83 Mon Sep 17 00:00:00 2001 From: number Zero Date: Mon, 13 Feb 2017 19:31:43 +0300 Subject: Content_mapblock.cpp: Refactor --- src/nodedef.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/nodedef.h') diff --git a/src/nodedef.h b/src/nodedef.h index 6275b41ce..4a9908ecc 100644 --- a/src/nodedef.h +++ b/src/nodedef.h @@ -166,6 +166,19 @@ enum NodeDrawType NDT_MESH, // Uses static meshes }; +// Mesh options for NDT_PLANTLIKE with CPT2_MESHOPTIONS +static const u8 MO_MASK_STYLE = 0x07; +static const u8 MO_BIT_RANDOM_OFFSET = 0x08; +static const u8 MO_BIT_SCALE_SQRT2 = 0x10; +static const u8 MO_BIT_RANDOM_OFFSET_Y = 0x20; +enum PlantlikeStyle { + PLANT_STYLE_CROSS, + PLANT_STYLE_CROSS2, + PLANT_STYLE_STAR, + PLANT_STYLE_HASH, + PLANT_STYLE_HASH2, +}; + /* Stand-alone definition of a TileSpec (basically a server-side TileSpec) */ @@ -364,6 +377,11 @@ struct ContentFeatures return (liquid_alternative_flowing == f.liquid_alternative_flowing); } + int getGroup(const std::string &group) const + { + return itemgroup_get(groups, group); + } + #ifndef SERVER void fillTileAttribs(ITextureSource *tsrc, TileSpec *tile, TileDef *tiledef, u32 shader_id, bool use_normal_texture, bool backface_culling, -- cgit v1.2.3