aboutsummaryrefslogtreecommitdiff
path: root/src/dungeongen.h
Commit message (Collapse)AuthorAge
* C++ modernize: Pragma once (#6264)Loïc Blot2017-08-17
| | | | * Migrate cpp headers to pragma once
* Dungeongen: Add and improve parametersparamat2017-02-26
| | | | | | | | | | | | | | | | | | Add: Bool for 'only_in_ground'. Min and max corridor length. Min and max room size with X, Y, Z components. Min and max large room size with X, Y, Z components. 'only_in_ground = false' allows core mapgens to create structures in air and water using dungeongen. Corridor length parameters replace a fixed random range. Room size parameters replace the former system where one parameter 'roomsize' was added to fixed random ranges. All parameters are set for no change to current dungeon behaviour. Remove some now-redundant and long-unused code.
* Dungeons: Generalise use, add capabilities, various modificationsparamat2016-06-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Generalise node names to c_wall and c_alt_wall - Remove 'mossratio' and instead disable alt_wall loop if c_alt_wall == CONTENT_IGNORE - Use one generalised 3D noise for alternative wall nodes and in mgv6 create moss distribution similar to the previous - Rename rarity noise to density noise and enable the option of multiple dungeons per chunk determined by the value. Recreate previous distribution - Add parameters for min and max rooms per dungeon - Add dungeon y limits - Integrate river water properly Generalisation is needed now that we have sandstone and desert stone dungeons by default and can choose any node for alternative structure. The current code is based around cobble dungeons with mossycobble alternative nodes, the 2 noises controlling the alternative nodes are based on wetness. Enabling multiple dungeons per chunk with definable number of rooms allows the option of very dense and complex underground structures that could interconnect to create megastructures. Y limits are added to be consistent with other mapgen elements, and enable locaton of dungeon or megastructure realms as part of our 'stacked realms' philosophy.
* Change internal type for seeds to s32kwolekr2016-06-04
| | | | | This fixes value truncation (and therefore incompatibility) on platforms with an LP32 data model, such as VAX or MS-DOS.
* Dungeongen: Remove dependency on Mapgenkwolekr2016-05-27
|
* Dungeongen: Also preserve river water nodesparamat2015-11-29
| | | | | | For future river mapgens Dungeons will not generate in river water, to avoid dungeons filling and blocking river channels
* Shorten ManualMapVoxelManipulator to MMVManipkwolekr2015-01-05
|
* Rewrite generate notification mechanismkwolekr2014-12-06
| | | | | | | Add support for notify-on-decoration Clean up mapgen constructors Clean up mapgen.cpp code style somewhat Remove trailing whitespace from some files
* Add map feature generation notify Lua APIkwolekr2013-12-14
|
* Dungeongen: Create dungeon gen tuneables; add desert temples for Mapgen V6kwolekr2013-12-07
|
* Re-add dungeons in new dungeongen.cppkwolekr2013-03-10
ade = 0.0f, float pitch = 1.0f) = 0; virtual int playSoundAt(const std::string &name, bool loop, float volume, v3f pos, float pitch = 1.0f) = 0; virtual void stopSound(int sound) = 0; virtual bool soundExists(int sound) = 0; virtual void updateSoundPosition(int sound, v3f pos) = 0; virtual bool updateSoundGain(int id, float gain) = 0; virtual float getSoundGain(int id) = 0; virtual void step(float dtime) = 0; virtual void fadeSound(int sound, float step, float gain) = 0; int playSound(const SimpleSoundSpec &spec, bool loop) { return playSound(spec.name, loop, spec.gain, spec.fade, spec.pitch); } int playSoundAt(const SimpleSoundSpec &spec, bool loop, const v3f &pos) { return playSoundAt(spec.name, loop, spec.gain, pos, spec.pitch); } }; class DummySoundManager : public ISoundManager { public: virtual bool loadSoundFile(const std::string &name, const std::string &filepath) { return true; } virtual bool loadSoundData(const std::string &name, const std::string &filedata) { return true; } void updateListener(const v3f &pos, const v3f &vel, const v3f &at, const v3f &up) { } void setListenerGain(float gain) {} int playSound(const std::string &name, bool loop, float volume, float fade, float pitch) { return 0; } int playSoundAt(const std::string &name, bool loop, float volume, v3f pos, float pitch) { return 0; } void stopSound(int sound) {} bool soundExists(int sound) { return false; } void updateSoundPosition(int sound, v3f pos) {} bool updateSoundGain(int id, float gain) { return false; } float getSoundGain(int id) { return 0; } void step(float dtime) {} void fadeSound(int sound, float step, float gain) {} }; // Global DummySoundManager singleton extern DummySoundManager dummySoundManager;