mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-17 22:14:05 +09:00
lightmap to update every other frame, and rendering needs fix minor jitter
This commit is contained in:
@@ -60,7 +60,7 @@ object LightmapRenderer {
|
||||
finally {
|
||||
this.world = world
|
||||
|
||||
// fireRecalculateEvent()
|
||||
//fireRecalculateEvent()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,6 +101,8 @@ object LightmapRenderer {
|
||||
internal var for_draw_y_start = 0
|
||||
internal var for_draw_x_end = 0
|
||||
internal var for_draw_y_end = 0
|
||||
internal var camX = 0
|
||||
internal var camY = 0
|
||||
|
||||
/**
|
||||
* @param x world coord
|
||||
@@ -137,7 +139,7 @@ object LightmapRenderer {
|
||||
}
|
||||
}
|
||||
|
||||
internal fun fireRecalculateEvent(vararg actorContainers: List<ActorWithBody>?) {
|
||||
fun fireRecalculateEvent(vararg actorContainers: List<ActorWithBody>?) {
|
||||
try {
|
||||
world.getTileFromTerrain(0, 0) // test inquiry
|
||||
}
|
||||
@@ -167,6 +169,9 @@ object LightmapRenderer {
|
||||
for_draw_x_end = for_draw_x_start + WorldCamera.width / TILE_SIZE + 3
|
||||
for_draw_y_end = for_draw_y_start + WorldCamera.height / TILE_SIZE + 3
|
||||
|
||||
camX = WorldCamera.x / TILE_SIZE
|
||||
camY = WorldCamera.y / TILE_SIZE
|
||||
|
||||
//println("$for_x_start..$for_x_end, $for_x\t$for_y_start..$for_y_end, $for_y")
|
||||
|
||||
AppLoader.measureDebugTime("Renderer.Lanterns") {
|
||||
|
||||
Reference in New Issue
Block a user