aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen/mg_decoration.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapgen/mg_decoration.h')
-rw-r--r--src/mapgen/mg_decoration.h45
1 files changed, 24 insertions, 21 deletions
diff --git a/src/mapgen/mg_decoration.h b/src/mapgen/mg_decoration.h
index c0cd4af9f..1ea02a527 100644
--- a/src/mapgen/mg_decoration.h
+++ b/src/mapgen/mg_decoration.h
@@ -25,33 +25,32 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "noise.h"
#include "nodedef.h"
-typedef u16 biome_t; // copy from mg_biome.h to avoid an unnecessary include
+typedef u16 biome_t; // copy from mg_biome.h to avoid an unnecessary include
class Mapgen;
class MMVManip;
class PcgRandom;
class Schematic;
-enum DecorationType
-{
+enum DecorationType {
DECO_SIMPLE,
DECO_SCHEMATIC,
DECO_LSYSTEM
};
-#define DECO_PLACE_CENTER_X 0x01
-#define DECO_PLACE_CENTER_Y 0x02
-#define DECO_PLACE_CENTER_Z 0x04
-#define DECO_USE_NOISE 0x08
+#define DECO_PLACE_CENTER_X 0x01
+#define DECO_PLACE_CENTER_Y 0x02
+#define DECO_PLACE_CENTER_Z 0x04
+#define DECO_USE_NOISE 0x08
#define DECO_FORCE_PLACEMENT 0x10
-#define DECO_LIQUID_SURFACE 0x20
-#define DECO_ALL_FLOORS 0x40
-#define DECO_ALL_CEILINGS 0x80
+#define DECO_LIQUID_SURFACE 0x20
+#define DECO_ALL_FLOORS 0x40
+#define DECO_ALL_CEILINGS 0x80
extern FlagDesc flagdesc_deco[];
-class Decoration : public ObjDef, public NodeResolver
-{
+
+class Decoration : public ObjDef, public NodeResolver {
public:
Decoration() = default;
virtual ~Decoration() = default;
@@ -81,8 +80,8 @@ protected:
void cloneTo(Decoration *def) const;
};
-class DecoSimple : public Decoration
-{
+
+class DecoSimple : public Decoration {
public:
ObjDef *clone() const;
@@ -96,8 +95,8 @@ public:
u8 deco_param2_max;
};
-class DecoSchematic : public Decoration
-{
+
+class DecoSchematic : public Decoration {
public:
ObjDef *clone() const;
@@ -111,6 +110,7 @@ public:
bool was_cloned = false; // see FIXME inside DecoSchemtic::clone()
};
+
/*
class DecoLSystem : public Decoration {
public:
@@ -118,15 +118,18 @@ public:
};
*/
-class DecorationManager : public ObjDefManager
-{
+
+class DecorationManager : public ObjDefManager {
public:
DecorationManager(IGameDef *gamedef);
virtual ~DecorationManager() = default;
DecorationManager *clone() const;
- const char *getObjectTitle() const { return "decoration"; }
+ const char *getObjectTitle() const
+ {
+ return "decoration";
+ }
static Decoration *create(DecorationType type)
{
@@ -135,7 +138,7 @@ public:
return new DecoSimple;
case DECO_SCHEMATIC:
return new DecoSchematic;
- // case DECO_LSYSTEM:
+ //case DECO_LSYSTEM:
// return new DecoLSystem;
default:
return NULL;
@@ -145,5 +148,5 @@ public:
size_t placeAllDecos(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax);
private:
- DecorationManager(){};
+ DecorationManager() {};
};