fixed a NaN bug caused by a zero-width/height hitbox

Also inventory is widened to 10x7 of prev 9x7
This commit is contained in:
minjaesong
2018-11-06 04:02:33 +09:00
parent 5c8cdd3162
commit c7c68187eb
14 changed files with 78 additions and 43 deletions

View File

@@ -79,6 +79,10 @@ open class Ingame(batch: SpriteBatch) : IngameInstance(batch) {
camera.update()
batch.projectionMatrix = camera.combined
}
fun getCanonicalTitle() = AppLoader.GAME_NAME +
" — F: ${Gdx.graphics.framesPerSecond} (${Terrarum.TARGET_INTERNAL_FPS})" +
" — M: J${Terrarum.memJavaHeap}M / N${Terrarum.memNativeHeap}M / X${Terrarum.memXmx}M"
}
@@ -461,10 +465,7 @@ open class Ingame(batch: SpriteBatch) : IngameInstance(batch) {
Gdx.graphics.setTitle(AppLoader.GAME_NAME +
" — F: ${Gdx.graphics.framesPerSecond} (${Terrarum.TARGET_INTERNAL_FPS})" +
" — M: ${Terrarum.memInUse}M / ${Terrarum.memTotal}M / ${Terrarum.memXmx}M"
)
Gdx.graphics.setTitle(getCanonicalTitle())
// ASYNCHRONOUS UPDATE AND RENDER //
@@ -913,7 +914,8 @@ open class Ingame(batch: SpriteBatch) : IngameInstance(batch) {
*/
override fun resize(width: Int, height: Int) {
MegaRainGovernor.resize()
// FIXME debugger is pointing at this thing, not sure it actually caused memleak
//MegaRainGovernor.resize()
IngameRenderer.resize(Terrarum.WIDTH, Terrarum.HEIGHT)