Luanti 5.15.0-dev
 
Loading...
Searching...
No Matches
mapgen.cpp File Reference
#include <cmath>
#include "mapgen.h"
#include "voxel.h"
#include "noise.h"
#include "gamedef.h"
#include "mg_biome.h"
#include "mapnode.h"
#include "map.h"
#include "nodedef.h"
#include "emerge.h"
#include "voxelalgorithms.h"
#include "profiler.h"
#include "settings.h"
#include "treegen.h"
#include "util/numeric.h"
#include "util/directiontables.h"
#include "log.h"
#include "mapgen_carpathian.h"
#include "mapgen_flat.h"
#include "mapgen_fractal.h"
#include "mapgen_v5.h"
#include "mapgen_v6.h"
#include "mapgen_v7.h"
#include "mapgen_valleys.h"
#include "mapgen_singlenode.h"
#include "cavegen.h"
#include "dungeongen.h"
+ Include dependency graph for mapgen.cpp:

Classes

struct  MapgenDesc
 

Functions

std::pair< v3s16, v3s16get_mapgen_edges (s16 mapgen_limit, v3s16 chunksize)
 

Variables

const FlagDesc flagdesc_mapgen []
 
const FlagDesc flagdesc_gennotify []
 
static MapgenDesc g_reg_mapgens []
 

Function Documentation

◆ get_mapgen_edges()

std::pair< v3s16, v3s16 > get_mapgen_edges ( s16 mapgen_limit,
v3s16 chunksize )

References MAP_BLOCKSIZE, MAX_MAP_GENERATION_LIMIT, and rangelim().

Referenced by MapgenParams::getSpawnRangeMax(), ModApiMapgen::Initialize(), ModApiMapgen::InitializeEmerge(), ModApiMapgen::l_get_mapgen_edges(), and TestMapgen::testMapgenEdges().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ flagdesc_gennotify

const FlagDesc flagdesc_gennotify[]
Initial value:
= {
{"dungeon", 1 << GENNOTIFY_DUNGEON},
{"temple", 1 << GENNOTIFY_TEMPLE},
{"cave_begin", 1 << GENNOTIFY_CAVE_BEGIN},
{"cave_end", 1 << GENNOTIFY_CAVE_END},
{"large_cave_begin", 1 << GENNOTIFY_LARGECAVE_BEGIN},
{"large_cave_end", 1 << GENNOTIFY_LARGECAVE_END},
{"decoration", 1 << GENNOTIFY_DECORATION},
{"custom", 1 << GENNOTIFY_CUSTOM},
{NULL, 0}
}
@ GENNOTIFY_CUSTOM
Definition mapgen.h:61
@ GENNOTIFY_LARGECAVE_END
Definition mapgen.h:59
@ GENNOTIFY_DECORATION
Definition mapgen.h:60
@ GENNOTIFY_LARGECAVE_BEGIN
Definition mapgen.h:58
@ GENNOTIFY_CAVE_END
Definition mapgen.h:57
@ GENNOTIFY_TEMPLE
Definition mapgen.h:55
@ GENNOTIFY_DUNGEON
Definition mapgen.h:54
@ GENNOTIFY_CAVE_BEGIN
Definition mapgen.h:56

Referenced by GenerateNotifier::getEvents(), ModApiMapgen::l_get_gen_notify(), and ModApiMapgen::l_set_gen_notify().

◆ flagdesc_mapgen

const FlagDesc flagdesc_mapgen[]
Initial value:
= {
{"caves", MG_CAVES},
{"dungeons", MG_DUNGEONS},
{"light", MG_LIGHT},
{"decorations", MG_DECORATIONS},
{"biomes", MG_BIOMES},
{"ores", MG_ORES},
{NULL, 0}
}
#define MG_DECORATIONS
Definition mapgen.h:24
#define MG_LIGHT
Definition mapgen.h:23
#define MG_BIOMES
Definition mapgen.h:25
#define MG_CAVES
Definition mapgen.h:21
#define MG_DUNGEONS
Definition mapgen.h:22
#define MG_ORES
Definition mapgen.h:26

Referenced by MapgenParams::readParams(), Mapgen::setDefaultSettings(), and MapgenParams::writeParams().

◆ g_reg_mapgens

MapgenDesc g_reg_mapgens[]
static
Initial value:
= {
{"v7", true},
{"valleys", true},
{"carpathian", true},
{"v5", true},
{"flat", true},
{"fractal", true},
{"singlenode", true},
{"v6", true},
}

Referenced by Mapgen::getMapgenName(), Mapgen::getMapgenNames(), and Mapgen::getMapgenType().