]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/dungeongen.h
Put ChatEvent handler into own function
[dragonfireclient.git] / src / dungeongen.h
index b2b28db3a414e5c7c5929c3efa676f58316058f4..4e1201d82df6df757269ec8c61ee145d6da1abd0 100644 (file)
@@ -22,16 +22,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "voxel.h"
 #include "noise.h"
+#include "mapgen.h"
 
 #define VMANIP_FLAG_DUNGEON_INSIDE VOXELFLAG_CHECKED1
 #define VMANIP_FLAG_DUNGEON_PRESERVE VOXELFLAG_CHECKED2
 #define VMANIP_FLAG_DUNGEON_UNTOUCHABLE (\
                VMANIP_FLAG_DUNGEON_INSIDE|VMANIP_FLAG_DUNGEON_PRESERVE)
 
-class ManualMapVoxelManipulator;
+class MMVManip;
 class INodeDefManager;
 
-
 v3s16 rand_ortho_dir(PseudoRandom &random, bool diagonal_dirs);
 v3s16 turn_xz(v3s16 olddir, int t);
 v3s16 random_turn(PseudoRandom &random, v3s16 olddir);
@@ -44,6 +44,7 @@ struct DungeonParams {
        content_t c_moss;
        content_t c_stair;
 
+       GenNotifyType notifytype;
        bool diagonal_dirs;
        float mossratio;
        v3s16 holesize;
@@ -56,25 +57,22 @@ struct DungeonParams {
 
 class DungeonGen {
 public:
+       MMVManip *vm;
+       Mapgen *mg;
        u32 blockseed;
-       u64 mapseed;
-       ManualMapVoxelManipulator *vmanip;
-       INodeDefManager *ndef;
        PseudoRandom random;
        v3s16 csize;
-       s16 water_level;
 
        content_t c_torch;
        DungeonParams dp;
-       
+
        //RoomWalker
        v3s16 m_pos;
        v3s16 m_dir;
 
-       DungeonGen(INodeDefManager *ndef, u64 seed, s16 waterlevel, DungeonParams *dparams);
-       void generate(ManualMapVoxelManipulator *vm, u32 bseed,
-               v3s16 full_node_min, v3s16 full_node_max);
-       
+       DungeonGen(Mapgen *mg, DungeonParams *dparams);
+       void generate(u32 bseed, v3s16 full_node_min, v3s16 full_node_max);
+
        void makeDungeon(v3s16 start_padding);
        void makeRoom(v3s16 roomsize, v3s16 roomplace);
        void makeCorridor(v3s16 doorplace, v3s16 doordir,
@@ -86,7 +84,7 @@ class DungeonGen {
        bool findPlaceForDoor(v3s16 &result_place, v3s16 &result_dir);
        bool findPlaceForRoomDoor(v3s16 roomsize, v3s16 &result_doorplace,
                        v3s16 &result_doordir, v3s16 &result_roomplace);
-                       
+
        void randomizeDir()
        {
                m_dir = rand_ortho_dir(random, dp.diagonal_dirs);