mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-16 21:44:05 +09:00
somehow fixed a consolewin bug
- It would read a key even if it's closed
This commit is contained in:
@@ -561,10 +561,14 @@ object LightmapRenderer {
|
||||
}
|
||||
|
||||
|
||||
fun resize(width: Int, height: Int) {
|
||||
fun resize(screenW: Int, screenH: Int) {
|
||||
// make sure the BlocksDrawer is resized first!
|
||||
|
||||
lightBuffer = Pixmap(BlocksDrawer.tilesInHorizontal, BlocksDrawer.tilesInVertical, Pixmap.Format.RGBA8888)
|
||||
// copied from BlocksDrawer, duh!
|
||||
val tilesInHorizontal = (screenW.toFloat() / TILE_SIZE).ceilInt() + 1
|
||||
val tilesInVertical = (screenH.toFloat() / TILE_SIZE).ceilInt() + 1
|
||||
|
||||
lightBuffer = Pixmap(tilesInHorizontal, tilesInVertical, Pixmap.Format.RGBA8888)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user