blockprop opacity to be actually cached

This commit is contained in:
minjaesong
2019-02-04 17:17:48 +09:00
parent a73a865d29
commit 52b1bee3a3
2 changed files with 2 additions and 7 deletions

View File

@@ -111,7 +111,7 @@ object BlockCodex {
prop.shadeColG = floatVal(record, "shdg") / LightmapRenderer.MUL_FLOAT
prop.shadeColB = floatVal(record, "shdb") / LightmapRenderer.MUL_FLOAT
prop.shadeColA = floatVal(record, "shduv") / LightmapRenderer.MUL_FLOAT
prop.shadeColor = Color(prop.shadeColR, prop.shadeColG, prop.shadeColB, prop.shadeColA)
prop.opacity = Color(prop.shadeColR, prop.shadeColG, prop.shadeColB, prop.shadeColA)
prop.strength = intVal(record, "str")
prop.density = intVal(record, "dsty")

View File

@@ -16,13 +16,8 @@ class BlockProp {
var shadeColG = 0f
var shadeColB = 0f
var shadeColA = 0f
lateinit var shadeColor: Color
/**
* @param opacity Raw RGB value, without alpha
*/
inline val opacity: Color
get() = Color(shadeColR, shadeColG, shadeColB, shadeColA)
lateinit var opacity: Color
var strength: Int = 0
var density: Int = 0