]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/mg_schematic.h
Mgv7 mountains: Remove divide by zero code that creates vast walls
[dragonfireclient.git] / src / mg_schematic.h
index 9d4d4a71681e262ba2d4bd3320b119e1f29ad0e6..ad5afb15f5d3a864032fbc5351b53f5c5b51dfb5 100644 (file)
@@ -26,7 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 class Map;
 class Mapgen;
-class ManualMapVoxelManipulator;
+class MMVManip;
 class PseudoRandom;
 class NodeResolver;
 
@@ -42,7 +42,7 @@ class NodeResolver;
 #define MTSCHEM_PROB_ALWAYS 0xFF
 
 
-class Schematic : public GenElement {
+class Schematic : public GenElement, public NodeResolver {
 public:
        std::vector<content_t> c_nodes;
 
@@ -52,14 +52,16 @@ class Schematic : public GenElement {
        u8 *slice_probs;
 
        Schematic();
-       ~Schematic();
+       virtual ~Schematic();
+
+       virtual void resolveNodeNames(NodeResolveInfo *nri);
 
        void updateContentIds();
 
-       void blitToVManip(v3s16 p, ManualMapVoxelManipulator *vm,
+       void blitToVManip(v3s16 p, MMVManip *vm,
                Rotation rot, bool force_placement, INodeDefManager *ndef);
 
-       bool loadSchematicFromFile(const char *filename, NodeResolver *resolver,
+       bool loadSchematicFromFile(const char *filename, INodeDefManager *ndef,
                std::map<std::string, std::string> &replace_names);
        void saveSchematicToFile(const char *filename, INodeDefManager *ndef);
        bool getSchematicFromMap(Map *map, v3s16 p1, v3s16 p2);
@@ -76,7 +78,7 @@ class SchematicManager : public GenElementManager {
        static const char *ELEMENT_TITLE;
        static const size_t ELEMENT_LIMIT = 0x10000;
 
-       SchematicManager(IGameDef *gamedef) {}
+       SchematicManager(IGameDef *gamedef);
        ~SchematicManager() {}
 
        Schematic *create(int type)
@@ -86,7 +88,7 @@ class SchematicManager : public GenElementManager {
 };
 
 void build_nnlist_and_update_ids(MapNode *nodes, u32 nodecount,
-                                       std::vector<content_t> *usednodes);
+       std::vector<content_t> *usednodes);
 
 
 #endif