mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 03:54:06 +09:00
layer export: tested output seems legit but can't confirm
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user