2014-08-26 08:16:33 -04:00
|
|
|
|
|
|
|
// DungeonRoomsFinisher.h
|
|
|
|
|
|
|
|
// Declares the cDungeonRoomsFinisher class representing the finisher that generates dungeon rooms
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "GridStructGen.h"
|
2014-08-27 06:25:27 -04:00
|
|
|
#include "../ProbabDistrib.h"
|
2014-08-26 08:16:33 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class cDungeonRoomsFinisher :
|
|
|
|
public cGridStructGen
|
|
|
|
{
|
|
|
|
typedef cGridStructGen super;
|
|
|
|
|
|
|
|
public:
|
|
|
|
/** Creates a new dungeon room finisher.
|
2014-11-12 15:24:26 -05:00
|
|
|
a_ShapeGen is the underlying terrain shape generator, so that the rooms can always be placed under the terrain.
|
2014-08-27 06:25:27 -04:00
|
|
|
a_MaxSize and a_MinSize are the maximum and minimum sizes of the room's internal (air) area, in blocks across.
|
|
|
|
a_HeightDistrib is the string defining the height distribution for the rooms (cProbabDistrib format). */
|
2014-11-12 15:24:26 -05:00
|
|
|
cDungeonRoomsFinisher(cTerrainShapeGenPtr a_ShapeGen, int a_Seed, int a_GridSize, int a_MaxSize, int a_MinSize, const AString & a_HeightDistrib);
|
2014-08-26 08:16:33 -04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2014-11-12 15:24:26 -05:00
|
|
|
/** The shape gen that is used for limiting the rooms' Y coords */
|
|
|
|
cTerrainShapeGenPtr m_ShapeGen;
|
2014-08-26 08:16:33 -04:00
|
|
|
|
|
|
|
/** Maximum half-size (from center to wall) of the dungeon room's inner (air) area. Default is 3 (vanilla). */
|
|
|
|
int m_MaxHalfSize;
|
|
|
|
|
|
|
|
/** Minimum half-size (from center to wall) of the dungeon room's inner (air) area. Default is 2 (vanilla). */
|
|
|
|
int m_MinHalfSize;
|
|
|
|
|
2014-08-27 06:25:27 -04:00
|
|
|
/** The height probability distribution to make the spawners more common in layers 10 - 40, less common outside this range. */
|
|
|
|
cProbabDistrib m_HeightProbability;
|
|
|
|
|
2014-08-26 08:16:33 -04:00
|
|
|
|
|
|
|
// cGridStructGen overrides:
|
|
|
|
virtual cStructurePtr CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) override;
|
|
|
|
} ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|