Luanti 5.16.0-dev
Loading...
Searching...
No Matches
DungeonGen Class Reference

#include <dungeongen.h>

Collaboration diagram for DungeonGen:

Public Member Functions

 DungeonGen (const NodeDefManager *ndef, GenerateNotifier *gennotify, DungeonParams *dparams)
void generate (MMVManip *vm, u32 bseed, v3s16 full_node_min, v3s16 full_node_max)
void makeDungeon (v3s16 start_padding)
void makeRoom (v3s16 roomsize, v3s16 roomplace)
void makeCorridor (v3s16 doorplace, v3s16 doordir, v3s16 &result_place, v3s16 &result_dir)
void makeDoor (v3s16 doorplace, v3s16 doordir)
void makeFill (v3s16 place, v3s16 size, u8 avoid_flags, MapNode n, u8 or_flags)
void makeHole (v3s16 place)
bool findPlaceForDoor (v3s16 &result_place, v3s16 &result_dir)
bool findPlaceForRoomDoor (v3s16 roomsize, v3s16 &result_doorplace, v3s16 &result_doordir, v3s16 &result_roomplace)
void randomizeDir ()

Public Attributes

MMVManipvm = nullptr
const NodeDefManagerndef = nullptr
GenerateNotifiergennotify = nullptr
u32 blockseed
PseudoRandom random
v3s16 csize
content_t c_torch
DungeonParams dp
v3s16 m_pos
v3s16 m_dir

Constructor & Destructor Documentation

◆ DungeonGen()

DungeonGen::DungeonGen ( const NodeDefManager * ndef,
GenerateNotifier * gennotify,
DungeonParams * dparams )

References c_torch, dp, gennotify, GENNOTIFY_DUNGEON, and ndef.

Member Function Documentation

◆ findPlaceForDoor()

bool DungeonGen::findPlaceForDoor ( v3s16 & result_place,
v3s16 & result_dir )

References CONTENT_AIR, dp, m_dir, m_pos, p(), randomizeDir(), and vm.

Referenced by findPlaceForRoomDoor(), and makeDungeon().

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

◆ findPlaceForRoomDoor()

bool DungeonGen::findPlaceForRoomDoor ( v3s16 roomsize,
v3s16 & result_doorplace,
v3s16 & result_doordir,
v3s16 & result_roomplace )

References findPlaceForDoor(), p(), random, vm, VMANIP_FLAG_DUNGEON_INSIDE, x, y, and z.

Referenced by makeDungeon().

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

◆ generate()

void DungeonGen::generate ( MMVManip * vm,
u32 bseed,
v3s16 full_node_min,
v3s16 full_node_max )

References blockseed, CONTENT_IGNORE, dp, makeDungeon(), MAP_BLOCKSIZE, ndef, NDT_AIRLIKE, NDT_LIQUID, NoiseFractal3D(), random, vm, VMANIP_FLAG_DUNGEON_INSIDE, VMANIP_FLAG_DUNGEON_PRESERVE, x, y, and z.

Referenced by MapgenBasic::generateDungeons(), and MapgenV6::makeChunk().

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

◆ makeCorridor()

void DungeonGen::makeCorridor ( v3s16 doorplace,
v3s16 doordir,
v3s16 & result_place,
v3s16 & result_dir )

References CONTENT_AIR, dir(), dir_to_facedir(), dp, makeFill(), makeHole(), p(), random, random_turn(), turn_xz(), vm, VMANIP_FLAG_DUNGEON_INSIDE, and VMANIP_FLAG_DUNGEON_UNTOUCHABLE.

Referenced by makeDungeon().

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

◆ makeDoor()

void DungeonGen::makeDoor ( v3s16 doorplace,
v3s16 doordir )

References c_torch, makeHole(), and vm.

Referenced by makeDungeon().

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

◆ makeDungeon()

void DungeonGen::makeDungeon ( v3s16 start_padding)

References c_torch, CONTENT_IGNORE, dp, findPlaceForDoor(), findPlaceForRoomDoor(), gennotify, m_dir, m_pos, makeCorridor(), makeDoor(), makeRoom(), p(), random, vm, VMANIP_FLAG_DUNGEON_UNTOUCHABLE, x, y, and z.

Referenced by generate().

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

◆ makeFill()

void DungeonGen::makeFill ( v3s16 place,
v3s16 size,
u8 avoid_flags,
MapNode n,
u8 or_flags )

References p(), vm, x, y, and z.

Referenced by makeCorridor(), and makeHole().

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

◆ makeHole()

void DungeonGen::makeHole ( v3s16 place)

References CONTENT_AIR, dp, makeFill(), and VMANIP_FLAG_DUNGEON_INSIDE.

Referenced by makeCorridor(), and makeDoor().

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

◆ makeRoom()

void DungeonGen::makeRoom ( v3s16 roomsize,
v3s16 roomplace )

References CONTENT_AIR, dp, p(), vm, VMANIP_FLAG_DUNGEON_UNTOUCHABLE, x, y, and z.

Referenced by makeDungeon().

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

◆ randomizeDir()

void DungeonGen::randomizeDir ( )
inline

References dp, m_dir, rand_ortho_dir(), and random.

Referenced by findPlaceForDoor().

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

Member Data Documentation

◆ blockseed

u32 DungeonGen::blockseed

Referenced by generate().

◆ c_torch

content_t DungeonGen::c_torch

Referenced by DungeonGen(), makeDoor(), and makeDungeon().

◆ csize

v3s16 DungeonGen::csize

◆ dp

◆ gennotify

GenerateNotifier* DungeonGen::gennotify = nullptr

Referenced by DungeonGen(), and makeDungeon().

◆ m_dir

v3s16 DungeonGen::m_dir

◆ m_pos

v3s16 DungeonGen::m_pos

Referenced by findPlaceForDoor(), and makeDungeon().

◆ ndef

const NodeDefManager* DungeonGen::ndef = nullptr

Referenced by DungeonGen(), and generate().

◆ random

◆ vm


The documentation for this class was generated from the following files: