nonprivate lateinits are bitch

This commit is contained in:
Minjae Song
2018-12-11 16:39:27 +09:00
parent e0f72aafad
commit c7d7ae03c0
6 changed files with 23 additions and 20 deletions

View File

@@ -2,7 +2,6 @@ package net.torvald.terrarum.worlddrawer
import com.badlogic.gdx.Gdx
import com.badlogic.gdx.graphics.*
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import com.badlogic.gdx.graphics.glutils.ShaderProgram
import com.badlogic.gdx.math.Matrix4
import net.torvald.terrarum.gameworld.GameWorld
@@ -31,8 +30,8 @@ import java.util.zip.GZIPInputStream
* Created by minjaesong on 2016-01-19.
*/
internal object BlocksDrawer {
lateinit var world: GameWorld
var world: GameWorld = GameWorld.makeNullWorld()
private val TILE_SIZE = FeaturesDrawer.TILE_SIZE
private val TILE_SIZEF = FeaturesDrawer.TILE_SIZE.toFloat()

View File

@@ -10,7 +10,6 @@ import net.torvald.terrarum.blockproperties.BlockCodex
import com.jme3.math.FastMath
import net.torvald.terrarum.AppLoader.printdbg
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.blendNormal
import net.torvald.terrarum.gameworld.GameWorld
import net.torvald.terrarum.blockproperties.Block
import net.torvald.terrarum.gameactors.*
@@ -40,7 +39,7 @@ object LightmapRenderer {
// FIXME lightmap shifts to left, ONLY AT x=33.5-34.5
private lateinit var world: GameWorld
private var world: GameWorld = GameWorld.makeNullWorld()
/** do not call this yourself! Let your game renderer handle this! */
fun setWorld(world: GameWorld) {
@@ -486,7 +485,7 @@ object LightmapRenderer {
const val DRAW_FOR_RGB = 0xFFF0
const val DRAW_FOR_ALPHA = 0x000F
lateinit var lightBuffer: Pixmap
var lightBuffer: Pixmap = Pixmap(1, 1, Pixmap.Format.RGBA8888)
private val colourNull = Color(0)