2014-10-16 13:45:55 +02:00
|
|
|
/*
|
|
|
|
Minetest
|
2015-10-08 06:17:25 +02:00
|
|
|
Copyright (C) 2010-2015 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
|
|
|
|
Copyright (C) 2010-2015 paramat, Matt Gregory
|
2014-10-16 13:45:55 +02: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 06:17:25 +02:00
|
|
|
#define MGV5_LARGE_CAVE_DEPTH -256
|
2015-03-16 02:22:37 +01:00
|
|
|
|
2015-01-21 14:24:11 +01:00
|
|
|
class BiomeManager;
|
2014-10-16 13:45:55 +02:00
|
|
|
|
|
|
|
extern FlagDesc flagdesc_mapgen_v5[];
|
|
|
|
|
|
|
|
|
|
|
|
struct MapgenV5Params : public MapgenSpecificParams {
|
|
|
|
u32 spflags;
|
2016-04-25 12:47:25 +02:00
|
|
|
float cave_width;
|
2014-10-16 13:45:55 +02: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 10:18:04 +01:00
|
|
|
|
2015-01-26 12:44:49 +01:00
|
|
|
void readParams(const Settings *settings);
|
|
|
|
void writeParams(Settings *settings) const;
|
2014-10-16 13:45:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2016-05-02 08:24:57 +02:00
|
|
|
class MapgenV5 : public MapgenBasic {
|
2014-10-16 13:45:55 +02:00
|
|
|
public:
|
2016-05-22 08:17:19 +02:00
|
|
|
MapgenV5(int mapgenid, MapgenParams *params, EmergeManager *emerge);
|
|
|
|
~MapgenV5();
|
|
|
|
|
2016-06-14 06:10:55 +02:00
|
|
|
virtual MapgenType getType() const { return MAPGEN_V5; }
|
|
|
|
|
2016-05-22 08:17:19 +02:00
|
|
|
virtual void makeChunk(BlockMakeData *data);
|
|
|
|
int getSpawnLevelAtPoint(v2s16 p);
|
|
|
|
int generateBaseTerrain();
|
|
|
|
|
|
|
|
private:
|
2014-10-16 13:45:55 +02:00
|
|
|
Noise *noise_factor;
|
|
|
|
Noise *noise_height;
|
|
|
|
Noise *noise_ground;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|