Cpp11 initializers: last src root changeset (#6022)
[oweals/minetest.git] / src / mg_schematic.h
index da885954062aea81750c6828f35f5b414de3e299..16e967a7c5e8e9158ba2c0ee8729d721d77aa4f6 100644 (file)
@@ -1,6 +1,7 @@
 /*
 Minetest
-Copyright (C) 2010-2013 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
+Copyright (C) 2014-2016 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
+Copyright (C) 2015-2017 paramat
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
@@ -25,11 +26,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "util/string.h"
 
 class Map;
+class ServerMap;
 class Mapgen;
 class MMVManip;
 class PseudoRandom;
 class NodeResolver;
-class IGameDef;
+class Server;
 
 /*
        Minetest Schematic File Format
@@ -108,22 +110,22 @@ public:
 
        void blitToVManip(MMVManip *vm, v3s16 p, Rotation rot, bool force_place);
        bool placeOnVManip(MMVManip *vm, v3s16 p, u32 flags, Rotation rot, bool force_place);
-       void placeOnMap(Map *map, v3s16 p, u32 flags, Rotation rot, bool force_place);
+       void placeOnMap(ServerMap *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;
+       u32 flags = 0;
        v3s16 size;
-       MapNode *schemdata;
-       u8 *slice_probs;
+       MapNode *schemdata = nullptr;
+       u8 *slice_probs = nullptr;
 };
 
 class SchematicManager : public ObjDefManager {
 public:
-       SchematicManager(IGameDef *gamedef);
+       SchematicManager(Server *server);
        virtual ~SchematicManager() {}
 
        virtual void clear();
@@ -139,7 +141,7 @@ public:
        }
 
 private:
-       IGameDef *m_gamedef;
+       Server *m_server;
 };
 
 void generate_nodelist_and_update_ids(MapNode *nodes, size_t nodecount,