new world size is now much taller; loadscreen bar now has fixed ratio

This commit is contained in:
minjaesong
2024-08-30 21:56:46 +09:00
parent 56a1723e4f
commit da14c75278
4 changed files with 12 additions and 12 deletions

View File

@@ -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()