mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 20:14:05 +09:00
float lightmap seems it does have little boost on fps
This commit is contained in:
@@ -107,12 +107,12 @@ class BasicDebugInfoWindow : UICanvas {
|
||||
val lightVal: String
|
||||
val mtX = mouseTileX.toString()
|
||||
val mtY = mouseTileY.toString()
|
||||
val valRaw = LightmapRenderer.getValueFromMap(mouseTileX, mouseTileY) ?: -1
|
||||
val rawR = valRaw.rawR()
|
||||
val rawG = valRaw.rawG()
|
||||
val rawB = valRaw.rawB()
|
||||
val valRaw = LightmapRenderer.getValueFromMap(mouseTileX, mouseTileY)
|
||||
val rawR = valRaw?.r?.times(100f)?.round()?.div(100f)
|
||||
val rawG = valRaw?.g?.times(100f)?.round()?.div(100f)
|
||||
val rawB = valRaw?.b?.times(100f)?.round()?.div(100f)
|
||||
|
||||
lightVal = if (valRaw == -1) "—"
|
||||
lightVal = if (valRaw == null) "—"
|
||||
else valRaw.toString() + " (" +
|
||||
rawR.toString() + " " +
|
||||
rawG.toString() + " " +
|
||||
|
||||
@@ -9,7 +9,7 @@ import net.torvald.terrarum.gameactors.Second
|
||||
import net.torvald.terrarum.gameactors.abs
|
||||
import net.torvald.terrarum.imagefont.Watch7SegSmall
|
||||
import net.torvald.terrarum.worlddrawer.LightmapRenderer
|
||||
import net.torvald.terrarum.worlddrawer.LightmapRenderer.normaliseToColour
|
||||
import net.torvald.terrarum.worlddrawer.toColor
|
||||
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
|
||||
/**
|
||||
@@ -94,11 +94,11 @@ class UIBasicNotifier(private val player: ActorHumanoid?) : UICanvas {
|
||||
if (player != null) {
|
||||
val playerPos = player.tilewiseHitbox
|
||||
lightLevel = (LightmapRenderer.getLight(playerPos.centeredX.toInt(), playerPos.centeredY.toInt()) ?:
|
||||
Terrarum.ingame!!.world.globalLight
|
||||
).normaliseToColour()
|
||||
Terrarum.ingame!!.world.globalLight.toColor()
|
||||
)
|
||||
}
|
||||
else {
|
||||
lightLevel = Terrarum.ingame!!.world.globalLight.normaliseToColour()
|
||||
lightLevel = Terrarum.ingame!!.world.globalLight.toColor()
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import net.torvald.terrarum.imagefont.Watch7SegMain
|
||||
import net.torvald.terrarum.imagefont.Watch7SegSmall
|
||||
import net.torvald.terrarum.imagefont.WatchDotAlph
|
||||
import net.torvald.terrarum.worlddrawer.LightmapRenderer
|
||||
import net.torvald.terrarum.worlddrawer.LightmapRenderer.normaliseToColour
|
||||
import net.torvald.terrarum.worlddrawer.toColor
|
||||
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
|
||||
/**
|
||||
@@ -69,11 +69,11 @@ class UITierOneWatch(private val player: ActorHumanoid?) : UICanvas {
|
||||
if (player != null) {
|
||||
val playerPos = player.tilewiseHitbox
|
||||
lightLevel = (LightmapRenderer.getLight(playerPos.centeredX.toInt(), playerPos.centeredY.toInt()) ?:
|
||||
Terrarum.ingame!!.world.globalLight
|
||||
).normaliseToColour()
|
||||
Terrarum.ingame!!.world.globalLight.toColor()
|
||||
)
|
||||
}
|
||||
else {
|
||||
lightLevel = Terrarum.ingame!!.world.globalLight.normaliseToColour()
|
||||
lightLevel = Terrarum.ingame!!.world.globalLight.toColor()
|
||||
}
|
||||
|
||||
// backplate
|
||||
|
||||
Reference in New Issue
Block a user