mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-15 13:04:05 +09:00
hacked the titlescreen to fix resize-related UI shit
This commit is contained in:
@@ -674,10 +674,13 @@ object LightmapRenderer {
|
||||
// excluiding overscans; only reckon echo lights
|
||||
for (y in overscan_open..render_height + overscan_open + 1) {
|
||||
for (x in overscan_open..render_width + overscan_open + 1) {
|
||||
val colour = lightmap[y][x]
|
||||
reds [minOf(CHANNEL_MAX, colour.r.times(MUL).floorInt())] += 1
|
||||
greens[minOf(CHANNEL_MAX, colour.g.times(MUL).floorInt())] += 1
|
||||
blues [minOf(CHANNEL_MAX, colour.b.times(MUL).floorInt())] += 1
|
||||
try {
|
||||
val colour = lightmap[y][x]
|
||||
reds[minOf(CHANNEL_MAX, colour.r.times(MUL).floorInt())] += 1
|
||||
greens[minOf(CHANNEL_MAX, colour.g.times(MUL).floorInt())] += 1
|
||||
blues[minOf(CHANNEL_MAX, colour.b.times(MUL).floorInt())] += 1
|
||||
}
|
||||
catch (e: ArrayIndexOutOfBoundsException) { }
|
||||
}
|
||||
}
|
||||
return Histogram(reds, greens, blues)
|
||||
|
||||
Reference in New Issue
Block a user