From 17d2d2589694030f79f2a37732d72d4e433fd745 Mon Sep 17 00:00:00 2001 From: Aaditya Dhruv Date: Wed, 28 Jan 2026 14:20:23 -0600 Subject: Add camera handling and movement Camera related movements have been moved to camera.c - it tracks the matrices as well so we don't have to call it in block_update The player class is empty right now, but the camera will be a child of the player, and the player a child of the engine --- src/world.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/world.c') diff --git a/src/world.c b/src/world.c index e81f100..72a0c21 100644 --- a/src/world.c +++ b/src/world.c @@ -7,8 +7,9 @@ int world_init(int32_t seed, struct world** world) { struct world* wld = malloc(sizeof(struct world)); memset(wld, 0, sizeof(struct world)); wld->seed = seed; - for (int i = 0; i < WORLD_WIDTH; i++) { - for (int j = 0; j < WORLD_LENGTH; j++) { + //TODO: Improve loading here + for (int i = 0; i < 2; i++) { + for (int j = 0; j < 2; j++) { struct chunk* chunk; vec2 coords = { i, j }; chunk_gen(wld, coords, &chunk); -- cgit