mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-13 23:26:07 +09:00
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:
@@ -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()}"
|
||||
+ ")")
|
||||
|
||||
Reference in New Issue
Block a user