diff options
Diffstat (limited to 'src/mapgen/mg_decoration.h')
-rw-r--r-- | src/mapgen/mg_decoration.h | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/src/mapgen/mg_decoration.h b/src/mapgen/mg_decoration.h index 1ea02a527..c0cd4af9f 100644 --- a/src/mapgen/mg_decoration.h +++ b/src/mapgen/mg_decoration.h @@ -25,32 +25,33 @@ 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; @@ -80,8 +81,8 @@ protected: void cloneTo(Decoration *def) const; }; - -class DecoSimple : public Decoration { +class DecoSimple : public Decoration +{ public: ObjDef *clone() const; @@ -95,8 +96,8 @@ public: u8 deco_param2_max; }; - -class DecoSchematic : public Decoration { +class DecoSchematic : public Decoration +{ public: ObjDef *clone() const; @@ -110,7 +111,6 @@ public: bool was_cloned = false; // see FIXME inside DecoSchemtic::clone() }; - /* class DecoLSystem : public Decoration { public: @@ -118,18 +118,15 @@ 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) { @@ -138,7 +135,7 @@ public: return new DecoSimple; case DECO_SCHEMATIC: return new DecoSchematic; - //case DECO_LSYSTEM: + // case DECO_LSYSTEM: // return new DecoLSystem; default: return NULL; @@ -148,5 +145,5 @@ public: size_t placeAllDecos(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax); private: - DecorationManager() {}; + DecorationManager(){}; }; |