2014-10-16 07:45:55 -04:00
|
|
|
/*
|
|
|
|
Minetest
|
2015-10-08 00:17:25 -04:00
|
|
|
Copyright (C) 2010-2015 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
|
|
|
|
Copyright (C) 2010-2015 paramat, Matt Gregory
|
2014-10-16 07:45:55 -04:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Lesser General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2.1 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public License along
|
|
|
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MAPGEN_V5_HEADER
|
|
|
|
#define MAPGEN_V5_HEADER
|
|
|
|
|
|
|
|
#include "mapgen.h"
|
|
|
|
|
2015-10-08 00:17:25 -04:00
|
|
|
#define MGV5_LARGE_CAVE_DEPTH -256
|
2015-03-15 21:22:37 -04:00
|
|
|
|
2015-01-21 08:24:11 -05:00
|
|
|
class BiomeManager;
|
2014-10-16 07:45:55 -04:00
|
|
|
|
|
|
|
extern FlagDesc flagdesc_mapgen_v5[];
|
|
|
|
|
|
|
|
|
2016-06-24 18:15:56 -04:00
|
|
|
struct MapgenV5Params : public MapgenParams {
|
2014-10-16 07:45:55 -04:00
|
|
|
u32 spflags;
|
2016-04-25 06:47:25 -04:00
|
|
|
float cave_width;
|
2014-10-16 07:45:55 -04:00
|
|
|
NoiseParams np_filler_depth;
|
|
|
|
NoiseParams np_factor;
|
|
|
|
NoiseParams np_height;
|
|
|
|
NoiseParams np_cave1;
|
|
|
|
NoiseParams np_cave2;
|
|
|
|
NoiseParams np_ground;
|
|
|
|
|
|
|
|
MapgenV5Params();
|
|
|
|
~MapgenV5Params() {}
|
2014-12-06 04:18:04 -05:00
|
|
|
|
2015-01-26 06:44:49 -05:00
|
|
|
void readParams(const Settings *settings);
|
|
|
|
void writeParams(Settings *settings) const;
|
2014-10-16 07:45:55 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2016-05-02 02:24:57 -04:00
|
|
|
class MapgenV5 : public MapgenBasic {
|
2014-10-16 07:45:55 -04:00
|
|
|
public:
|
2016-06-24 18:15:56 -04:00
|
|
|
MapgenV5(int mapgenid, MapgenV5Params *params, EmergeManager *emerge);
|
2016-05-22 02:17:19 -04:00
|
|
|
~MapgenV5();
|
|
|
|
|
2016-06-14 00:10:55 -04:00
|
|
|
virtual MapgenType getType() const { return MAPGEN_V5; }
|
|
|
|
|
2016-05-22 02:17:19 -04:00
|
|
|
virtual void makeChunk(BlockMakeData *data);
|
|
|
|
int getSpawnLevelAtPoint(v2s16 p);
|
|
|
|
int generateBaseTerrain();
|
|
|
|
|
|
|
|
private:
|
2014-10-16 07:45:55 -04:00
|
|
|
Noise *noise_factor;
|
|
|
|
Noise *noise_height;
|
|
|
|
Noise *noise_ground;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|