MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / buildFloatingDungeonLayout

Method buildFloatingDungeonLayout

source/game/StarWorldLayout.cpp:292–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290}
291
292WorldLayout WorldLayout::buildFloatingDungeonLayout(FloatingDungeonWorldParameters const& floatingDungeonParameters, uint64_t seed) {
293 auto assets = Root::singleton().assets();
294 auto biomeDatabase = Root::singleton().biomeDatabase();
295
296 RandomSource randSource(seed);
297
298 WorldLayout layout;
299 layout.m_worldSize = floatingDungeonParameters.worldSize;
300
301 RegionParams biomeRegion{
302 (int)floatingDungeonParameters.dungeonSurfaceHeight,
303 floatingDungeonParameters.threatLevel,
304 floatingDungeonParameters.biome,
305 {}, {}, {}, {}, {}, {},
306 {EmptyLiquidId, 0.0f, EmptyLiquidId, 0, false, false}
307 };
308
309 layout.addLayer(seed, 0, biomeRegion);
310 if (floatingDungeonParameters.biome)
311 biomeDatabase->biomeSkyColoring(*floatingDungeonParameters.biome, seed);
312 else
313 layout.finalize(Color::Black);
314
315 return layout;
316}
317
318WorldLayout::WorldLayout() : m_regionBlending(0.0f) {}
319

Callers

nothing calls this directly

Calls 6

singletonClass · 0.85
assetsMethod · 0.80
biomeDatabaseMethod · 0.80
addLayerMethod · 0.80
biomeSkyColoringMethod · 0.80
finalizeMethod · 0.80

Tested by

no test coverage detected