diff options
Diffstat (limited to 'src/mg_schematic.h')
-rw-r--r-- | src/mg_schematic.h | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/mg_schematic.h b/src/mg_schematic.h index 5b546f879..3d3e328d3 100644 --- a/src/mg_schematic.h +++ b/src/mg_schematic.h @@ -85,26 +85,14 @@ enum SchematicFormatType { class Schematic : public ObjDef, public NodeResolver { public: - std::vector<content_t> c_nodes; - - u32 flags; - v3s16 size; - MapNode *schemdata; - u8 *slice_probs; - Schematic(); virtual ~Schematic(); virtual void resolveNodeNames(); - void updateContentIds(); - - void blitToVManip(v3s16 p, MMVManip *vm, - Rotation rot, bool force_placement); - bool loadSchematicFromFile(const std::string &filename, INodeDefManager *ndef, - StringMap *replace_names); - bool saveSchematicToFile(const std::string &filename); + StringMap *replace_names=NULL); + bool saveSchematicToFile(const std::string &filename, INodeDefManager *ndef); bool getSchematicFromMap(Map *map, v3s16 p1, v3s16 p2); bool deserializeFromMts(std::istream *is, std::vector<std::string> *names); @@ -112,11 +100,18 @@ public: bool serializeToLua(std::ostream *os, const std::vector<std::string> &names, bool use_comments, u32 indent_spaces); - void placeStructure(Map *map, v3s16 p, u32 flags, - Rotation rot, bool force_placement); + void blitToVManip(v3s16 p, MMVManip *vm, Rotation rot, bool force_place); + void placeStructure(Map *map, v3s16 p, u32 flags, Rotation rot, bool force_place); + void applyProbabilities(v3s16 p0, std::vector<std::pair<v3s16, u8> > *plist, std::vector<std::pair<s16, u8> > *splist); + + std::vector<content_t> c_nodes; + u32 flags; + v3s16 size; + MapNode *schemdata; + u8 *slice_probs; }; class SchematicManager : public ObjDefManager { |