no more reading entire savefiles onto the memory upon the booting

This commit is contained in:
minjaesong
2021-10-01 10:07:23 +09:00
parent aaa8a80324
commit b720c12c4e
9 changed files with 92 additions and 38 deletions

View File

@@ -5,7 +5,9 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch
import net.torvald.terrarum.App
import net.torvald.terrarum.Second
import net.torvald.terrarum.serialise.LoadSavegame
import net.torvald.terrarum.tvda.VDUtil
import net.torvald.terrarum.ui.UICanvas
import java.util.logging.Level
/**
* Created by minjaesong on 2021-09-13.
@@ -30,7 +32,9 @@ class UIProxyLoadLatestSave : UICanvas() {
override fun endOpening(delta: Float) {
if (App.savegames.size > 0) {
LoadSavegame(App.savegames[0])
LoadSavegame(VDUtil.readDiskArchive(App.savegames[0].first, Level.INFO) {
System.err.println("Possibly damaged savefile ${App.savegames[0].first.absolutePath}:\n$it")
})
}
}