downsampling sorta works, ONLY WHEN (width or height % 4) is 0 or 1

This commit is contained in:
minjaesong
2017-07-05 16:03:50 +09:00
parent e54822a7e4
commit 2d5761d66c
16 changed files with 114 additions and 95 deletions

View File

@@ -30,8 +30,8 @@ object BlockStats {
val map = TerrarumGDX.ingame!!.world
val player = TerrarumGDX.ingame!!.player
val renderWidth = FastMath.ceil(Gdx.graphics.width.toFloat())
val renderHeight = FastMath.ceil(Gdx.graphics.height.toFloat())
val renderWidth = FastMath.ceil(TerrarumGDX.WIDTH.toFloat())
val renderHeight = FastMath.ceil(TerrarumGDX.HEIGHT.toFloat())
val noZoomCameraX = Math.round(FastMath.clamp(
(player?.hitbox?.centeredX?.toFloat() ?: 0f) - renderWidth / 2, TSIZE.toFloat(), map.width * TSIZE - renderWidth - TSIZE.toFloat()))