aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/main.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/main.kt')
-rw-r--r--src/main/kotlin/main.kt15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/main/kotlin/main.kt b/src/main/kotlin/main.kt
index 7533287..bc39316 100644
--- a/src/main/kotlin/main.kt
+++ b/src/main/kotlin/main.kt
@@ -1,12 +1,11 @@
fun main() {
val renderer = Renderer(viewportWidth = 320, viewportHeight = 240, outputScale = 3)
val textureManager = TextureManager()
- .apply { loadTextures() }
val camera = Camera(
fov = 90,
- xPos = 2.0,
- yPos = 2.0,
- rotation = 90.0
+ xPos = 1.2,
+ yPos = 2.5,
+ rotation = 60.0
)
val map = Map()
val minimap = Minimap(map)
@@ -15,10 +14,16 @@ fun main() {
val raycaster = Raycaster(stepPrecision = 32)
- CameraController(camera, moveSpeed = 0.5, rotateSpeed = 5) {
+ CameraController(camera, moveSpeed = 1.0, rotateSpeed = 15) {
paint(raycaster, context)
}
+ val ui = Ui(textureManager) {
+ paint(raycaster, context)
+ }
+
+ textureManager.loadTextures(ui.getSelectedTextureSet())
+
// Do an initial paint and wait for input
paint(raycaster, context)
}