layer export: tested output seems legit but can't confirm

This commit is contained in:
minjaesong
2018-10-04 23:46:24 +09:00
parent 071dc85b94
commit 374070e9b9
8 changed files with 25 additions and 24 deletions

View File

@@ -24,7 +24,7 @@ import kotlin.system.measureNanoTime
*/
class BuildingMaker(batch: SpriteBatch) : IngameInstance(batch) {
val gameWorld = GameWorldExtension(1024, 256)
val gameWorld = GameWorldExtension(1, 1024, 256)
init {
// ghetto world for building

View File

@@ -2,26 +2,25 @@ package net.torvald.terrarum.modulebasegame.console
import net.torvald.terrarum.console.ConsoleCommand
import net.torvald.terrarum.console.Echo
import net.torvald.terrarum.serialise.WriteLayerData
import net.torvald.terrarum.console.EchoError
import net.torvald.terrarum.serialise.WriteLayerDataZip
/**
* Created by minjaesong on 2017-07-18.
*/
object ExportLayerData : ConsoleCommand {
override fun execute(args: Array<String>) {
if (args.size < 2) {
printUsage()
return
try {
val outfile = WriteLayerDataZip()
Echo("Layer data exported to ${outfile!!.canonicalPath}")
}
catch (e: Exception) {
e.printStackTrace()
EchoError("Layer data export failed; see console for error traces.")
}
val saveDirectoryName = args[1]
WriteLayerData(saveDirectoryName)
Echo("Layer data exported to $saveDirectoryName/${WriteLayerData.LAYERS_FILENAME}")
}
override fun printUsage() {
Echo("Usage: exportlayer savename")
Echo("Usage: exportlayer")
}
}

View File

@@ -115,7 +115,8 @@ open class UIRemoCon(treeRepresentation: QNDTreeNode<String>) : UICanvas() {
printdbg(this, 1)
val ingame = Ingame(Terrarum.batch)
ingame.gameLoadInfoPayload = Ingame.NewWorldParameters(2400, 800, HQRNG().nextLong())
//ingame.gameLoadInfoPayload = Ingame.NewWorldParameters(2400, 800, HQRNG().nextLong())
ingame.gameLoadInfoPayload = Ingame.NewWorldParameters(8192, 2048, 0x51621DL)
ingame.gameLoadMode = Ingame.GameLoadMode.CREATE_NEW
printdbg(this, 2)