fixed a bug where colourmap won't interpolate properly. BUG: fadeout/fadein is somewhat glitched, UIQuickBar does not fade-in/out instead it just (dis)appears with no effect

Former-commit-id: 029f504b7e2e4d85676ec8b36b27dcbed5e5db47
Former-commit-id: 0b56ca1e8976bfc5e7ea8d665e6ed6496a52de85
This commit is contained in:
Song Minjae
2016-07-27 00:20:36 +09:00
parent 00dd5e99bb
commit ee647652d2
36 changed files with 368 additions and 223 deletions

View File

@@ -19,7 +19,7 @@ import java.util.*
/**
* Created by minjaesong on 16-03-14.
*/
class BasicDebugInfoWindow:UICanvas {
class BasicDebugInfoWindow : UICanvas {
override var width: Int = Terrarum.WIDTH
override var height: Int = Terrarum.HEIGHT
@@ -101,6 +101,8 @@ class BasicDebugInfoWindow:UICanvas {
printLine(g, 5, "grounded $ccG${player.grounded}")
printLine(g, 6, "noClip $ccG${player.noClip}")
printLine(g, 7, "jump $ccG${player.jumpAcc}")
val lightVal: String
val mtX = mouseTileX.toString()
val mtY = mouseTileY.toString()
@@ -114,7 +116,7 @@ class BasicDebugInfoWindow:UICanvas {
rawR.toString() + " " +
rawG.toString() + " " +
rawB.toString() + ")"
printLine(g, 7, "light@cursor $ccG$lightVal")
printLine(g, 8, "light@cursor $ccG$lightVal")
val tileNo: String
val tileNumRaw = Terrarum.ingame.world.getTileFromTerrain(mouseTileX, mouseTileY) ?: -1
@@ -122,18 +124,22 @@ class BasicDebugInfoWindow:UICanvas {
val tiledmg = tileNumRaw % PairedMapLayer.RANGE
tileNo = if (tileNumRaw == -1) "" else "$tilenum:$tiledmg"
printLine(g, 8, "tile@cursor $ccG$tileNo ($mtX, $mtY)")
printLine(g, 9, "tile@cursor $ccG$tileNo ($mtX, $mtY)")
/**
* Second column
*/
printLineColumn(g, 2, 1, "VSync $ccG" + Terrarum.appgc.isVSyncRequested)
printLineColumn(g, 2, 2, "Env colour temp $ccG" + MapDrawer.getColTemp())
printLineColumn(g, 2, 2, "Env colour temp $ccG" + MapDrawer.colTemp)
printLineColumn(g, 2, 5, "Time $ccG${Terrarum.ingame.world.time.elapsedSeconds()}" +
" (${Terrarum.ingame.world.time.getFormattedTime()})")
printLineColumn(g, 2, 6, "Mass $ccG${player.mass}")
printLineColumn(g, 2, 7, "p_WalkX $ccG${player.walkX}")
printLineColumn(g, 2, 8, "p_WalkY $ccG${player.walkY}")
drawHistogram(g, LightmapRenderer.histogram,
Terrarum.WIDTH - histogramW - 30,
Terrarum.HEIGHT - histogramH - 30
@@ -220,7 +226,7 @@ class BasicDebugInfoWindow:UICanvas {
private fun line(i: Int): Float = i * 10f
private fun column(i: Int): Float = 250f * (i - 1)
private fun column(i: Int): Float = 300f * (i - 1)
override fun doOpening(gc: GameContainer, delta: Int) {