new item type, "Dynamic Item"; working text terminal

Former-commit-id: 81e6d836f5f1e6490027d38146a32d404cf9ce3e
Former-commit-id: af6557340f9cd0ea0b67eb7a8825aeffe75f9d82
This commit is contained in:
Song Minjae
2016-09-10 16:45:04 +09:00
parent 9b9b65efba
commit d8b70887a9
69 changed files with 1310 additions and 131 deletions

View File

@@ -191,6 +191,8 @@ object LightmapRenderer {
}
}
// O(36n) == O(n) where n is a size of the map.
// Because of inevitable overlaps on the area, it only works with ADDITIVE blend (aka maxblend)
try {
// Round 1
for (y in for_y_start - overscan_open..for_y_end) {
@@ -230,6 +232,8 @@ object LightmapRenderer {
private fun calculate(x: Int, y: Int): Int = calculate(x, y, false)
private fun calculate(x: Int, y: Int, doNotCalculateAmbient: Boolean): Int {
// O(9n) == O(n) where n is a size of the map.
var lightLevelThis: Int = 0
val thisTerrain = Terrarum.ingame.world.getTileFromTerrain(x, y)
val thisWall = Terrarum.ingame.world.getTileFromWall(x, y)

View File

@@ -1,14 +1,14 @@
package net.torvald.terrarum.mapdrawer
import net.torvald.terrarum.gamemap.GameWorld
import net.torvald.terrarum.gamemap.PairedMapLayer
import net.torvald.terrarum.gameworld.GameWorld
import net.torvald.terrarum.gameworld.PairedMapLayer
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.tileproperties.TileNameCode
import net.torvald.terrarum.tileproperties.TilePropCodex
import com.jme3.math.FastMath
import net.torvald.terrarum.concurrent.ThreadPool
import net.torvald.terrarum.setBlendMul
import net.torvald.terrarum.setBlendNormal
import net.torvald.terrarum.blendMul
import net.torvald.terrarum.blendNormal
import org.lwjgl.opengl.GL11
import org.newdawn.slick.GameContainer
import org.newdawn.slick.Graphics
@@ -247,15 +247,15 @@ object MapCamera {
/**
* render to camera
*/
setBlendNormal()
blendNormal()
drawTiles(WALL, false)
drawTiles(TERRAIN, false)
}
fun renderFront(gc: GameContainer, g: Graphics) {
setBlendMul()
blendMul()
drawTiles(TERRAIN, true)
setBlendNormal()
blendNormal()
}
private fun drawTiles(mode: Int, drawModeTilesBlendMul: Boolean) {

View File

@@ -1,6 +1,6 @@
package net.torvald.terrarum.mapdrawer
import net.torvald.terrarum.gamemap.GameWorld
import net.torvald.terrarum.gameworld.GameWorld
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.tileproperties.TileNameCode
import net.torvald.terrarum.tilestats.TileStats