createtileatlas: fixing a mistake where non-47 blocks won't be rendered to atlas

This commit is contained in:
minjaesong
2019-03-03 21:53:56 +09:00
parent 01e5f75bf4
commit a05e2fc695
27 changed files with 107 additions and 92 deletions

View File

@@ -14,6 +14,7 @@ import net.torvald.terrarum.gameworld.fmod
import net.torvald.terrarum.itemproperties.GameItem
import net.torvald.terrarum.itemproperties.ItemCodex
import net.torvald.terrarum.modulebasegame.Ingame
import net.torvald.terrarum.worlddrawer.CreateTileAtlas
import net.torvald.terrarum.worlddrawer.FeaturesDrawer
import net.torvald.terrarum.worlddrawer.WorldCamera
@@ -38,10 +39,10 @@ class IngameController(val ingame: Ingame) : InputAdapter() {
get() = WorldCamera.y + Gdx.input.y / (ingame.screenZoom)
/** currently pointing tile coordinate */
val mouseTileX: Int
get() = (mouseX / FeaturesDrawer.TILE_SIZE).floorInt()
get() = (mouseX / CreateTileAtlas.TILE_SIZE).floorInt()
/** currently pointing tile coordinate */
val mouseTileY: Int
get() = (mouseY / FeaturesDrawer.TILE_SIZE).floorInt()
get() = (mouseY / CreateTileAtlas.TILE_SIZE).floorInt()
init {
if (Controllers.getControllers().size == 0) {