From 656575b59d4f0d67452cca7409c9064f690f038c Mon Sep 17 00:00:00 2001 From: kwolekr Date: Thu, 7 May 2015 02:34:15 -0400 Subject: NodeResolver: Remove NodeResolveMethod This simplifies NodeResolver logic and makes some interfaces cleaner. --- src/mg_schematic.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/mg_schematic.h') 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 *names_out); - bool serializeToMts(std::ostream *os); - bool serializeToLua(std::ostream *os, bool use_comments); - + bool deserializeFromMts(std::istream *is, std::vector *names); + bool serializeToMts(std::ostream *os, const std::vector &names); + bool serializeToLua(std::ostream *os, const std::vector &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 > *plist, std::vector > *splist); @@ -140,8 +140,7 @@ private: IGameDef *m_gamedef; }; -void build_nnlist_and_update_ids(MapNode *nodes, u32 nodecount, - std::vector *usednodes); - +void generate_nodelist_and_update_ids(MapNode *nodes, size_t nodecount, + std::vector *usednodes, INodeDefManager *ndef); #endif -- cgit v1.2.3