#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;
void cloneTo(Decoration *def) const;
};
-class DecoSimple : public Decoration
-{
+
+class DecoSimple : public Decoration {
public:
ObjDef *clone() const;
u8 deco_param2_max;
};
-class DecoSchematic : public Decoration
-{
+
+class DecoSchematic : public Decoration {
public:
ObjDef *clone() const;
bool was_cloned = false; // see FIXME inside DecoSchemtic::clone()
};
+
/*
class DecoLSystem : public Decoration {
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)
{
return new DecoSimple;
case DECO_SCHEMATIC:
return new DecoSchematic;
- // case DECO_LSYSTEM:
+ //case DECO_LSYSTEM:
// return new DecoLSystem;
default:
return NULL;
size_t placeAllDecos(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax);
private:
- DecorationManager(){};
+ DecorationManager() {};
};