Luanti 5.11.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 "mapblock.h"
#include "mapnode.h"
#include "map.h"
#include "nodedef.h"
#include "emerge.h"
#include "voxelalgorithms.h"
#include "porting.h"
#include "profiler.h"
#include "settings.h"
#include "treegen.h"
#include "serialization.h"
#include "util/serialize.h"
#include "util/numeric.h"
#include "util/directiontables.h"
#include "filesys.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< s16, s16 > get_mapgen_edges (s16 mapgen_limit, s16 chunksize)
 

Variables

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

Function Documentation

◆ get_mapgen_edges()

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

References MAP_BLOCKSIZE, MAX_MAP_GENERATION_LIMIT, MYMAX, and rangelim.

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

+ Here is the caller graph for this function:

Variable Documentation

◆ flagdesc_gennotify

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:64
@ GENNOTIFY_LARGECAVE_END
Definition mapgen.h:62
@ GENNOTIFY_DECORATION
Definition mapgen.h:63
@ GENNOTIFY_LARGECAVE_BEGIN
Definition mapgen.h:61
@ GENNOTIFY_CAVE_END
Definition mapgen.h:60
@ GENNOTIFY_TEMPLE
Definition mapgen.h:58
@ GENNOTIFY_DUNGEON
Definition mapgen.h:57
@ GENNOTIFY_CAVE_BEGIN
Definition mapgen.h:59

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

◆ flagdesc_mapgen

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:22
#define MG_LIGHT
Definition mapgen.h:21
#define MG_BIOMES
Definition mapgen.h:23
#define MG_CAVES
Definition mapgen.h:19
#define MG_DUNGEONS
Definition mapgen.h:20
#define MG_ORES
Definition mapgen.h:24

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().