resolving issue #5

Former-commit-id: 12d11b683a242172a7c3ec831efb7d65f552951f
Former-commit-id: fd276318b77ac5ef9b1963e84fb33380ddbae45c
This commit is contained in:
Song Minjae
2016-12-22 22:20:49 +09:00
parent 611b78ffa5
commit 1362f6921e
3 changed files with 34 additions and 3 deletions

View File

@@ -190,6 +190,7 @@ object LightmapRenderer {
lanternMap.add(Lantern(x, y, it.luminosity))
// Q&D fix for Roundworld anormaly
lanternMap.add(Lantern(x + world.width, y, it.luminosity))
lanternMap.add(Lantern(x - world.width, y, it.luminosity))
}
}
}
@@ -237,7 +238,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.
// O(9n) == O(n) where n is a size of the map
// TODO devise multithreading on this
var lightLevelThis: Int = 0
val thisTerrain = Terrarum.ingame.world.getTileFromTerrain(x, y)