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

@@ -299,7 +299,7 @@ object ModMgr {
} }
} }
catch (e: Throwable) { catch (e: Throwable) {
printdbgerr(this, "$moduleName failed to load, skipping...") printdbgerr(this, "Module failed to load, skipping: $moduleName")
printdbgerr(this, "\t$e") printdbgerr(this, "\t$e")
print(App.csiR); e.printStackTrace(System.out); print(App.csi0) print(App.csiR); e.printStackTrace(System.out); print(App.csi0)
@@ -316,20 +316,20 @@ object ModMgr {
entryPointClasses.add(newClassInstance as ModuleEntryPoint) entryPointClasses.add(newClassInstance as ModuleEntryPoint)
(newClassInstance as ModuleEntryPoint).invoke() (newClassInstance as ModuleEntryPoint).invoke()
printdbg(this, "$moduleName loaded successfully") printdbg(this, "Module loaded successfully: $moduleName")
} }
else { else {
moduleInfo.remove(moduleName) moduleInfo.remove(moduleName)
moduleInfoErrored[moduleName] = module moduleInfoErrored[moduleName] = module
printdbg(this, "$moduleName did not load...") printdbg(this, "Module did not load: $moduleName")
} }
} }
printmsg(this, "Module $moduleName processed") printmsg(this, "Module processed: $moduleName")
} }
catch (noSuchModule: FileNotFoundException) { catch (noSuchModule: FileNotFoundException) {
printmsgerr(this, "No such module: $moduleName, skipping...") printmsgerr(this, "No such module, skipping: $moduleName")
logError(LoadErrorType.NOT_EVEN_THERE, moduleName, noSuchModule) logError(LoadErrorType.NOT_EVEN_THERE, moduleName, noSuchModule)

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 ratio = worldwidth * sqrt(2.0 / (worldwidth.sqr() + worldheight.sqr())) // world size is always wider than tall
val htilesCount = worldwidth / CHUNK_W 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 unitSize = ((540 * ratio) / htilesCount).roundToInt() // (visible tilesize + gapSize)
val previewWidth = unitSize * htilesCount val previewWidth = unitSize * htilesCount
val previewHeight = unitSize * vtilesCount val previewHeight = (previewWidth / 5f).roundToInt()
val xoff = (Math.random() * (1024-764)/2).toInt() val xoff = (Math.random() * (1024-764)/2).toInt()

View File

@@ -168,10 +168,10 @@ open class TerrarumIngame(batch: FlippingSpriteBatch) : IngameInstance(batch) {
// x: neither // x: neither
(this.hitbox.endX >= WorldCamera.x && this.hitbox.startX <= WorldCamera.xEnd)) (this.hitbox.endX >= WorldCamera.x && this.hitbox.startX <= WorldCamera.xEnd))
val SIZE_SMALL = Point2i(6030, 1800) val SIZE_SMALL = Point2i(6030, 4500)
val SIZE_NORMAL = Point2i(9000, 2250) val SIZE_NORMAL = Point2i(9000, 6750)
val SIZE_LARGE = Point2i(13500, 2970) val SIZE_LARGE = Point2i(13500, 10080)
val SIZE_HUGE = Point2i(22500, 4500) val SIZE_HUGE = Point2i(22500, 16920) // world ratio: 4:3
val NEW_WORLD_SIZE = arrayOf(SIZE_SMALL, SIZE_NORMAL, SIZE_LARGE, SIZE_HUGE) val NEW_WORLD_SIZE = arrayOf(SIZE_SMALL, SIZE_NORMAL, SIZE_LARGE, SIZE_HUGE)
val WORLDPORTAL_NEW_WORLD_SIZE = arrayOf(SIZE_SMALL, SIZE_NORMAL, SIZE_LARGE, SIZE_HUGE) val WORLDPORTAL_NEW_WORLD_SIZE = arrayOf(SIZE_SMALL, SIZE_NORMAL, SIZE_LARGE, SIZE_HUGE)

View File

@@ -161,7 +161,7 @@ class Biomegen(world: GameWorld, isFinal: Boolean, seed: Long, params: Any, val
0 -> { 0 -> {
if (tileThis == Block.DIRT && hasNoFloor) { if (tileThis == Block.DIRT && hasNoFloor) {
if (exposedToAir) biomeMapOut[ba] = BIOME_KEY_GRAVELS if (exposedToAir) biomeMapOut[ba] = BIOME_KEY_GRAVELS
Block.STONE_QUARRIED to null Block.STONE to null
} }
else if (tileThis == Block.DIRT) { else if (tileThis == Block.DIRT) {
if (exposedToAir) biomeMapOut[ba] = BIOME_KEY_GRAVELS if (exposedToAir) biomeMapOut[ba] = BIOME_KEY_GRAVELS