summaryrefslogtreecommitdiff
path: root/src/mg_schematic.h
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2015-05-07 02:34:15 -0400
committerkwolekr <kwolekr@minetest.net>2015-05-07 02:36:01 -0400
commit656575b59d4f0d67452cca7409c9064f690f038c (patch)
tree2b35b13a8b2819dadfb00799dd92ee702bd83847 /src/mg_schematic.h
parentd720fd564427b64cfab76e4b6177307bc46fa893 (diff)
downloadminetest-656575b59d4f0d67452cca7409c9064f690f038c.tar.gz
minetest-656575b59d4f0d67452cca7409c9064f690f038c.tar.bz2
minetest-656575b59d4f0d67452cca7409c9064f690f038c.zip
NodeResolver: Remove NodeResolveMethod
This simplifies NodeResolver logic and makes some interfaces cleaner.
Diffstat (limited to 'src/mg_schematic.h')
-rw-r--r--src/mg_schematic.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/mg_schematic.h b/src/mg_schematic.h
index 296e7b104..3f253ad92 100644
--- a/src/mg_schematic.h
+++ b/src/mg_schematic.h
@@ -100,20 +100,20 @@ public:
void updateContentIds();
void blitToVManip(v3s16 p, MMVManip *vm,
- Rotation rot, bool force_placement, INodeDefManager *ndef);
+ Rotation rot, bool force_placement);
bool loadSchematicFromFile(const std::string &filename, INodeDefManager *ndef,
- StringMap *replace_names, NodeResolveMethod resolve_method);
+ StringMap *replace_names);
bool saveSchematicToFile(const std::string &filename);
bool getSchematicFromMap(Map *map, v3s16 p1, v3s16 p2);
- bool deserializeFromMts(std::istream *is, std::vector<std::string> *names_out);
- bool serializeToMts(std::ostream *os);
- bool serializeToLua(std::ostream *os, bool use_comments);
-
+ bool deserializeFromMts(std::istream *is, std::vector<std::string> *names);
+ bool serializeToMts(std::ostream *os, const std::vector<std::string> &names);
+ bool serializeToLua(std::ostream *os, const std::vector<std::string> &names,
+ bool use_comments);
void placeStructure(Map *map, v3s16 p, u32 flags,
- Rotation rot, bool force_placement, INodeDefManager *nef);
+ Rotation rot, bool force_placement);
void applyProbabilities(v3s16 p0,
std::vector<std::pair<v3s16, u8> > *plist,
std::vector<std::pair<s16, u8> > *splist);
@@ -140,8 +140,7 @@ private:
IGameDef *m_gamedef;
};
-void build_nnlist_and_update_ids(MapNode *nodes, u32 nodecount,
- std::vector<content_t> *usednodes);
-
+void generate_nodelist_and_update_ids(MapNode *nodes, size_t nodecount,
+ std::vector<std::string> *usednodes, INodeDefManager *ndef);
#endif