projects
/
oweals
/
minetest.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Node highlighting.
[oweals/minetest.git]
/
src
/
mapgen.h
diff --git
a/src/mapgen.h
b/src/mapgen.h
index aa66982c3d999dad17da319b968652ae8a87e6f2..3c897e02315a58c58b3ea5d42d2e4d826070fb22 100644
(file)
--- a/
src/mapgen.h
+++ b/
src/mapgen.h
@@
-28,17
+28,14
@@
with this program; if not, write to the Free Software Foundation, Inc.,
#include "noise.h"
#include "settings.h"
#include "noise.h"
#include "settings.h"
+#define DEFAULT_MAPGEN "v6"
+
/////////////////// Mapgen flags
#define MG_TREES 0x01
#define MG_CAVES 0x02
#define MG_DUNGEONS 0x04
/////////////////// Mapgen flags
#define MG_TREES 0x01
#define MG_CAVES 0x02
#define MG_DUNGEONS 0x04
-#define MGV6_JUNGLES 0x08
-#define MGV6_BIOME_BLEND 0x10
-#define MG_FLAT 0x20
-#define MG_NOLIGHT 0x40
-#define MGV7_MOUNTAINS 0x80
-#define MGV7_RIDGES 0x100
-#define MGV6_NOMUDFLOW 0x200
+#define MG_FLAT 0x08
+#define MG_LIGHT 0x10
/////////////////// Ore generation flags
// Use absolute value of height to determine ore placement
/////////////////// Ore generation flags
// Use absolute value of height to determine ore placement
@@
-101,6
+98,12
@@
enum OreType {
};
};
+struct MapgenSpecificParams {
+ virtual void readParams(Settings *settings) = 0;
+ virtual void writeParams(Settings *settings) = 0;
+ virtual ~MapgenSpecificParams() {}
+};
+
struct MapgenParams {
std::string mg_name;
int chunksize;
struct MapgenParams {
std::string mg_name;
int chunksize;
@@
-108,17
+111,16
@@
struct MapgenParams {
int water_level;
u32 flags;
int water_level;
u32 flags;
+ MapgenSpecificParams *sparams;
+
MapgenParams() {
MapgenParams() {
- mg_name =
"v6"
;
+ mg_name =
DEFAULT_MAPGEN
;
seed = 0;
water_level = 1;
chunksize = 5;
seed = 0;
water_level = 1;
chunksize = 5;
- flags = MG_TREES | MG_CAVES | MGV6_BIOME_BLEND;
+ flags = MG_TREES | MG_CAVES | MG_LIGHT;
+ sparams = NULL;
}
}
-
- virtual bool readParams(Settings *settings) { return true; }
- virtual void writeParams(Settings *settings) {}
- virtual ~MapgenParams() {}
};
class Mapgen {
};
class Mapgen {
@@
-156,7
+158,7
@@
public:
struct MapgenFactory {
virtual Mapgen *createMapgen(int mgid, MapgenParams *params,
EmergeManager *emerge) = 0;
struct MapgenFactory {
virtual Mapgen *createMapgen(int mgid, MapgenParams *params,
EmergeManager *emerge) = 0;
- virtual MapgenParams *createMapgenParams() = 0;
+ virtual Mapgen
Specific
Params *createMapgenParams() = 0;
virtual ~MapgenFactory() {}
};
virtual ~MapgenFactory() {}
};
@@
-207,7
+209,7
@@
Ore *createOre(OreType type);
enum DecorationType {
enum DecorationType {
- DECO_SIMPLE,
+ DECO_SIMPLE
= 1
,
DECO_SCHEMATIC,
DECO_LSYSTEM
};
DECO_SCHEMATIC,
DECO_LSYSTEM
};
@@
-311,7
+313,7
@@
public:
void saveSchematicFile(INodeDefManager *ndef);
bool getSchematicFromMap(Map *map, v3s16 p1, v3s16 p2);
void saveSchematicFile(INodeDefManager *ndef);
bool getSchematicFromMap(Map *map, v3s16 p1, v3s16 p2);
- void placeStructure(Map *map, v3s16 p);
+ void placeStructure(Map *map, v3s16 p
, bool force_placement
);
void applyProbabilities(v3s16 p0,
std::vector<std::pair<v3s16, u8> > *plist,
std::vector<std::pair<s16, u8> > *splist);
void applyProbabilities(v3s16 p0,
std::vector<std::pair<v3s16, u8> > *plist,
std::vector<std::pair<s16, u8> > *splist);