mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-08 12:51:51 +09:00
working zoom out
Former-commit-id: a53ed485163ef36cf5b59941eb657761cde166d5 Former-commit-id: a2b575150e128ceb7894d9ba4eb0db127d071bcb
This commit is contained in:
@@ -72,8 +72,8 @@ constructor() : BasicGameState() {
|
||||
val ZOOM_MAX = 2.0f
|
||||
val ZOOM_MIN = 0.5f
|
||||
|
||||
val tilesDrawFrameBuffer = Image(Terrarum.WIDTH, Terrarum.HEIGHT)
|
||||
val actorsDrawFrameBuffer = Image(Terrarum.WIDTH, Terrarum.HEIGHT)
|
||||
val tilesDrawFrameBuffer = Image(Terrarum.WIDTH.div(ZOOM_MIN).ceilInt(), Terrarum.HEIGHT.div(ZOOM_MIN).ceilInt())
|
||||
val actorsDrawFrameBuffer = Image(Terrarum.WIDTH.div(ZOOM_MIN).ceilInt(), Terrarum.HEIGHT.div(ZOOM_MIN).ceilInt())
|
||||
val uisDrawFrameBuffer = Image(Terrarum.WIDTH, Terrarum.HEIGHT)
|
||||
|
||||
//private lateinit var shader12BitCol: Shader // grab LibGDX if you want some shader
|
||||
|
||||
@@ -1108,6 +1108,7 @@ open class ActorWithBody : Actor() {
|
||||
|
||||
fun Double.floorInt() = Math.floor(this).toInt()
|
||||
fun Float.floorInt() = FastMath.floor(this).toInt()
|
||||
fun Float.ceilInt() = FastMath.ceil(this).toInt()
|
||||
fun Double.round() = Math.round(this).toDouble()
|
||||
fun Double.floor() = Math.floor(this)
|
||||
fun Double.ceil() = this.floor() + 1.0
|
||||
|
||||
Reference in New Issue
Block a user