mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
downsampling sorta works, ONLY WHEN (width or height % 4) is 0 or 1
This commit is contained in:
@@ -47,7 +47,7 @@ object FeaturesDrawer {
|
||||
* usually targeted for the environmental temperature (desert/winterland), hence the name.
|
||||
*/
|
||||
fun drawEnvOverlay(batch: SpriteBatch) {
|
||||
val onscreen_tiles_max = FastMath.ceil(Gdx.graphics.height * Gdx.graphics.width / FastMath.sqr (TILE_SIZE.toFloat())) * 2
|
||||
val onscreen_tiles_max = FastMath.ceil(TerrarumGDX.HEIGHT * TerrarumGDX.WIDTH / FastMath.sqr (TILE_SIZE.toFloat())) * 2
|
||||
val onscreen_tiles_cap = onscreen_tiles_max / 4f
|
||||
val onscreen_cold_tiles = BlockStats.getCount(*TILES_COLD).toFloat()
|
||||
val onscreen_warm_tiles = BlockStats.getCount(*TILES_WARM).toFloat()
|
||||
@@ -62,8 +62,8 @@ object FeaturesDrawer {
|
||||
batch.color = ColourTemp(colTemp)
|
||||
batch.fillRect(WorldCamera.x * zoom,
|
||||
WorldCamera.y * zoom,
|
||||
Gdx.graphics.width * if (zoom < 1) 1f / zoom else zoom,
|
||||
Gdx.graphics.height * if (zoom < 1) 1f / zoom else zoom
|
||||
TerrarumGDX.WIDTH * if (zoom < 1) 1f / zoom else zoom,
|
||||
TerrarumGDX.HEIGHT * if (zoom < 1) 1f / zoom else zoom
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user