summaryrefslogtreecommitdiff
path: root/src/dungeongen.h
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2014-12-06 04:18:04 -0500
committerkwolekr <kwolekr@minetest.net>2014-12-06 13:53:35 -0500
commit5062b99cb0d252d9e377ff4560f7ecc9e66fd558 (patch)
tree3474c0734aac243cabfcf3af763becb4025da35b /src/dungeongen.h
parent2b119e1e192ead701e69e261fe94ccb7382dbee7 (diff)
downloadminetest-5062b99cb0d252d9e377ff4560f7ecc9e66fd558.tar.gz
minetest-5062b99cb0d252d9e377ff4560f7ecc9e66fd558.tar.bz2
minetest-5062b99cb0d252d9e377ff4560f7ecc9e66fd558.zip
Rewrite generate notification mechanism
Add support for notify-on-decoration Clean up mapgen constructors Clean up mapgen.cpp code style somewhat Remove trailing whitespace from some files
Diffstat (limited to 'src/dungeongen.h')
-rw-r--r--src/dungeongen.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dungeongen.h b/src/dungeongen.h
index 4a0bfcefd..ff1d0bc33 100644
--- a/src/dungeongen.h
+++ b/src/dungeongen.h
@@ -22,6 +22,7 @@ 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
@@ -30,7 +31,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
class ManualMapVoxelManipulator;
class INodeDefManager;
-class Mapgen;
v3s16 rand_ortho_dir(PseudoRandom &random, bool diagonal_dirs);
v3s16 turn_xz(v3s16 olddir, int t);
@@ -44,7 +44,7 @@ struct DungeonParams {
content_t c_moss;
content_t c_stair;
- int notifytype;
+ GenNotifyType notifytype;
bool diagonal_dirs;
float mossratio;
v3s16 holesize;
@@ -65,14 +65,14 @@ public:
content_t c_torch;
DungeonParams dp;
-
+
//RoomWalker
v3s16 m_pos;
v3s16 m_dir;
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,
@@ -84,7 +84,7 @@ public:
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);