mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-15 13:04:05 +09:00
new world size is now much taller; loadscreen bar now has fixed ratio
This commit is contained in:
@@ -42,11 +42,11 @@ open class FancyWorldReadLoadScreen(screenToBeLoaded: IngameInstance, private va
|
||||
|
||||
val ratio = worldwidth * sqrt(2.0 / (worldwidth.sqr() + worldheight.sqr())) // world size is always wider than tall
|
||||
val htilesCount = worldwidth / CHUNK_W
|
||||
val vtilesCount = worldheight / CHUNK_H
|
||||
// val vtilesCount = worldheight / CHUNK_H
|
||||
|
||||
val unitSize = ((540 * ratio) / htilesCount).roundToInt() // (visible tilesize + gapSize)
|
||||
val previewWidth = unitSize * htilesCount
|
||||
val previewHeight = unitSize * vtilesCount
|
||||
val previewHeight = (previewWidth / 5f).roundToInt()
|
||||
|
||||
val xoff = (Math.random() * (1024-764)/2).toInt()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user