summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/chunk.c2
-rw-r--r--src/engine.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/chunk.c b/src/chunk.c
index 982882d..3741629 100644
--- a/src/chunk.c
+++ b/src/chunk.c
@@ -114,7 +114,7 @@ void _chunk_plains_gen(struct chunk* chunk) {
for (int h = 0; h < z_final; h++) {
struct block* blk = malloc(sizeof(struct block));
// Adjust block coordinates with global chunk coordinates
- vec3 pos = {x + (CHUNK_WIDTH * chunk->coord[0]), h, -y - 1 - (CHUNK_LENGTH * chunk->coord[1])};
+ vec3 pos = {x + (CHUNK_WIDTH * chunk->coord[0]), h, -y - (CHUNK_LENGTH * chunk->coord[1])};
block_init(pos, blk);
chunk->blocks[x][y][h] = blk;
}
diff --git a/src/engine.c b/src/engine.c
index 7bfa115..23c6aa2 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -49,7 +49,7 @@ int engine_init(struct engine *engine) {
// Setup camera
camera_init(&engine->camera);
- vec3 camera_pos = { 10.0f, 10.0f, 15.0f };
+ vec3 camera_pos = { 0.0f, 5.0f, -0.0f };
camera_set_position(engine->camera, camera_pos);
// Final step - Start the game
@@ -66,7 +66,6 @@ void _engine_insert_chunk_ptrs(struct engine* engine, struct chunk* chunk) {
continue;
}
if (VECTOR_INSERT(engine->objects, (void*)blk) == -1) exit(1);
- // block_debug(blk);
counter += 1;
}
}