mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-06 08:38:30 +09:00
worldgen sliced evenly
This commit is contained in:
@@ -20,7 +20,7 @@ class Biomegen(world: GameWorld, seed: Long, params: Any) : Gen(world, seed, par
|
|||||||
|
|
||||||
private val threadExecutor = TerrarumIngame.worldgenThreadExecutor
|
private val threadExecutor = TerrarumIngame.worldgenThreadExecutor
|
||||||
|
|
||||||
private val genSlices = max(threadExecutor.threadCount, world.width / 8)
|
private val genSlices = max(threadExecutor.threadCount, world.width / 9)
|
||||||
|
|
||||||
private val YHEIGHT_MAGIC = 2800.0 / 3.0
|
private val YHEIGHT_MAGIC = 2800.0 / 3.0
|
||||||
private val YHEIGHT_DIVISOR = 2.0 / 7.0
|
private val YHEIGHT_DIVISOR = 2.0 / 7.0
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import kotlin.math.sqrt
|
|||||||
class Oregen(world: GameWorld, private val caveAttenuateBiasScaled: ModuleScaleDomain, seed: Long, private val ores: List<OregenParams>) : Gen(world, seed) {
|
class Oregen(world: GameWorld, private val caveAttenuateBiasScaled: ModuleScaleDomain, seed: Long, private val ores: List<OregenParams>) : Gen(world, seed) {
|
||||||
|
|
||||||
private val threadExecutor = TerrarumIngame.worldgenThreadExecutor
|
private val threadExecutor = TerrarumIngame.worldgenThreadExecutor
|
||||||
private val genSlices = max(threadExecutor.threadCount, world.width / 8)
|
private val genSlices = max(threadExecutor.threadCount, world.width / 9)
|
||||||
|
|
||||||
override fun getDone() {
|
override fun getDone() {
|
||||||
threadExecutor.renew()
|
threadExecutor.renew()
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import kotlin.math.max
|
|||||||
class OregenAutotiling(world: GameWorld, seed: Long, val tilingModes: HashMap<ItemID, String>) : Gen(world, seed) {
|
class OregenAutotiling(world: GameWorld, seed: Long, val tilingModes: HashMap<ItemID, String>) : Gen(world, seed) {
|
||||||
|
|
||||||
private val threadExecutor = TerrarumIngame.worldgenThreadExecutor
|
private val threadExecutor = TerrarumIngame.worldgenThreadExecutor
|
||||||
private val genSlices = max(threadExecutor.threadCount, world.width / 8)
|
private val genSlices = max(threadExecutor.threadCount, world.width / 9)
|
||||||
|
|
||||||
override fun getDone() {
|
override fun getDone() {
|
||||||
threadExecutor.renew()
|
threadExecutor.renew()
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class Terragen(world: GameWorld, val highlandLowlandSelectCache: ModuleCache, se
|
|||||||
|
|
||||||
private val threadExecutor = TerrarumIngame.worldgenThreadExecutor
|
private val threadExecutor = TerrarumIngame.worldgenThreadExecutor
|
||||||
|
|
||||||
private val genSlices = max(threadExecutor.threadCount, world.width / 8)
|
private val genSlices = max(threadExecutor.threadCount, world.width / 9)
|
||||||
|
|
||||||
|
|
||||||
private val dirtStoneDitherSize = 3 // actual dither size will be double of this value
|
private val dirtStoneDitherSize = 3 // actual dither size will be double of this value
|
||||||
|
|||||||
Reference in New Issue
Block a user