load screen render, fixed some init code of the app

This commit is contained in:
minjaesong
2017-07-13 03:59:26 +09:00
parent e74a738274
commit fcdac4b759
7 changed files with 156 additions and 32 deletions

View File

@@ -35,6 +35,7 @@ import net.torvald.random.HQRNG
import net.torvald.terrarum.ui.*
import net.torvald.terrarum.worldgenerator.RoguelikeRandomiser
import net.torvald.terrarum.worldgenerator.WorldGenerator
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
/**
@@ -197,6 +198,7 @@ class Ingame(val batch: SpriteBatch) : Screen {
override fun show() {
initViewPort(Terrarum.WIDTH, Terrarum.HEIGHT)
// gameLoadMode and gameLoadInfoPayload must be set beforehand!!
when (gameLoadMode) {
@@ -223,7 +225,7 @@ class Ingame(val batch: SpriteBatch) : Screen {
*/
private fun enter(gameSaveData: GameSaveData) {
if (gameFullyLoaded) {
Error("You are doing things horribly wrong, fucknugget.")
Error("You are doing horribly wrong, fucknugget.")
}
world = gameSaveData.world
@@ -1474,6 +1476,7 @@ class Ingame(val batch: SpriteBatch) : Screen {
}
override fun hide() {
dispose()
}
/**
@@ -1524,6 +1527,7 @@ class Ingame(val batch: SpriteBatch) : Screen {
override fun dispose() {
worldDrawFrameBuffer.dispose()
worldGlowFrameBuffer.dispose()
worldBlendFrameBuffer.dispose()
lightmapFboA.dispose()
lightmapFboB.dispose()
}