implementation of feature ROUNDWORLD

Former-commit-id: b869816eceefc4d728919cd2028ea98cf4d0f505
Former-commit-id: 8dc1d95e49aef406899c8086f053ebb13d416884
This commit is contained in:
Song Minjae
2016-10-23 00:48:05 +09:00
parent 3160ecea16
commit 2b31bb962a
5 changed files with 69 additions and 75 deletions

View File

@@ -38,10 +38,10 @@ object TileStats {
val noZoomCameraY = Math.round(FastMath.clamp(
player.hitbox.centeredY.toFloat() - renderHeight / 2, TSIZE.toFloat(), map.width * TSIZE - renderHeight - TSIZE.toFloat()))
val for_x_start = MapCamera.div16(noZoomCameraX)
val for_y_start = MapCamera.div16(noZoomCameraY)
val for_y_end = MapCamera.clampHTile(for_y_start + MapCamera.div16(renderHeight) + 2)
val for_x_end = MapCamera.clampWTile(for_x_start + MapCamera.div16(renderWidth) + 2)
val for_x_start = noZoomCameraX / TSIZE
val for_y_start = noZoomCameraY / TSIZE
val for_y_end = MapCamera.clampHTile(for_y_start + (renderHeight / TSIZE) + 2)
val for_x_end = MapCamera.clampWTile(for_x_start + (renderWidth / TSIZE) + 2)
for (y in for_y_start..for_y_end - 1) {
for (x in for_x_start..for_x_end - 1) {