Localised lightmap (reducing memory usage by 64 MB!), smoother and realistic light dimming (looks even more beautiful)

Former-commit-id: c312c73701bb3d2add4d5a5fe4f476ee6ee8be25
Former-commit-id: bc40f0e42025d1a368a22d08447c8ecc956248bb
This commit is contained in:
Song Minjae
2016-04-13 02:25:45 +09:00
parent ac9f5b5138
commit d39715cbff
5 changed files with 84 additions and 116 deletions

View File

@@ -34,7 +34,7 @@ class BasicDebugInfoWindow : UICanvas {
override fun update(gc: GameContainer, delta: Int) {
val player = Terrarum.game.player
val hitbox = player.hitbox!!
val hitbox = player.hitbox
xdelta = hitbox.pointedX - prevPlayerX
ydelta = hitbox.pointedY - prevPlayerY
@@ -53,8 +53,8 @@ class BasicDebugInfoWindow : UICanvas {
val sb = StringBuilder()
val formatter = Formatter(sb)
val mouseTileX = ((MapCamera.cameraX + gc.getInput().mouseX / Terrarum.game.screenZoom) / MapDrawer.TILE_SIZE).toInt()
val mouseTileY = ((MapCamera.cameraY + gc.getInput().mouseY / Terrarum.game.screenZoom) / MapDrawer.TILE_SIZE).toInt()
val mouseTileX = ((MapCamera.cameraX + gc.input.mouseX / Terrarum.game.screenZoom) / MapDrawer.TILE_SIZE).toInt()
val mouseTileY = ((MapCamera.cameraY + gc.input.mouseY / Terrarum.game.screenZoom) / MapDrawer.TILE_SIZE).toInt()
g.color = Color.white
@@ -62,7 +62,7 @@ class BasicDebugInfoWindow : UICanvas {
val nextHitbox = player.nextHitbox
printLine(g, 1, "posX: "
+ "${hitbox!!.pointedX.toString()}"
+ "${hitbox.pointedX.toString()}"
+ " ("
+ "${(hitbox.pointedX / MapDrawer.TILE_SIZE).toInt().toString()}"
+ ")")