Increase wall height

This commit is contained in:
MrLetsplay 2023-09-16 21:12:49 +02:00
parent 5ecab3b668
commit aa27b24ffd
Signed by: mr
SSH Key Fingerprint: SHA256:92jBH80vpXyaZHjaIl47pjRq+Yt7XGTArqQg1V7hSqg

View File

@ -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!");