From aa27b24ffd3618ce3909e47691d45d20a8efdbe5 Mon Sep 17 00:00:00 2001 From: MrLetsplay2003 Date: Sat, 16 Sep 2023 21:12:49 +0200 Subject: [PATCH] Increase wall height --- src/kekrooms/cpp/kekrooms.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/kekrooms/cpp/kekrooms.cpp b/src/kekrooms/cpp/kekrooms.cpp index 80056a9..1977ea0 100644 --- a/src/kekrooms/cpp/kekrooms.cpp +++ b/src/kekrooms/cpp/kekrooms.cpp @@ -31,7 +31,7 @@ using namespace kek; #define CHUNK_SIZE 64 #define CHUNK_RADIUS 2 #define WALLS_PER_CHUNK 20 -#define WALL_HEIGHT 9 +#define WALL_HEIGHT 10 #define LIGHT_SPACING 16 static ButtonElement *buttonPlay; @@ -98,7 +98,7 @@ void gameLoop(GLFWwindow *window, void *) { scene->addObject(floor); GameObject *ceiling = new GameObject(); - ceiling->addMesh(genCubeMesh(CHUNK_SIZE, 2, CHUNK_SIZE, gray, gray, gray)); + ceiling->addMesh(genCubeMesh(CHUNK_SIZE, 1, CHUNK_SIZE, gray, gray, gray)); // ceiling->addPhysics(new btBoxShape(btVector3(CHUNK_SIZE / 2, 1, CHUNK_SIZE / 2)), 0, btCollisionObject::CF_STATIC_OBJECT); ceiling->moveTo(glm::vec3(x * CHUNK_SIZE, WALL_HEIGHT, z * CHUNK_SIZE)); scene->addObject(ceiling); @@ -125,7 +125,7 @@ void gameLoop(GLFWwindow *window, void *) { for(int lx = 0; lx < CHUNK_SIZE / LIGHT_SPACING; lx++) { for(int ly = 0; ly < CHUNK_SIZE / LIGHT_SPACING; ly++) { // SpotLight *light = new SpotLight(glm::vec3(1), glm::vec3(0, -1, 0), 1, 1, 1, 0.5, 0.6); - glm::vec3 lightPos(x * CHUNK_SIZE + lx * LIGHT_SPACING, WALL_HEIGHT - 1, z * CHUNK_SIZE + ly * LIGHT_SPACING); + glm::vec3 lightPos(x * CHUNK_SIZE + lx * LIGHT_SPACING, WALL_HEIGHT - 0.5, z * CHUNK_SIZE + ly * LIGHT_SPACING); PointLight *light = new PointLight(glm::vec3(1), 1, 1, 1); light->moveTo(glm::vec3(x * CHUNK_SIZE + lx * LIGHT_SPACING, WALL_HEIGHT - 1, z * CHUNK_SIZE + ly * LIGHT_SPACING)); @@ -133,7 +133,7 @@ void gameLoop(GLFWwindow *window, void *) { lights.push_back(light); GameObject *lamp = new GameObject(); - lamp->addMesh(genCubeMesh(2, 0.5, 2, white, white, white)); + lamp->addMesh(genCubeMesh(2, 1, 2, white, white, white)); lamp->moveTo(lightPos); walls.push_back(lamp); scene->addObject(lamp); @@ -177,7 +177,7 @@ void startGame(void *) { } scene->lights->add(flashlight); - scene->lights->add(new DirectionalLight(glm::vec3(0.005), glm::vec3(-0.1, -1, 0.1))); + // scene->lights->add(new DirectionalLight(glm::vec3(0.005), glm::vec3(-0.1, -1, 0.1))); debugText = new TextElement(uiPx(10), uiPx(100)); debugText->setText("Hello!");