diff options
| author | Aaditya Dhruv <[email protected]> | 2026-01-28 14:20:23 -0600 |
|---|---|---|
| committer | Aaditya Dhruv <[email protected]> | 2026-01-28 14:20:23 -0600 |
| commit | 17d2d2589694030f79f2a37732d72d4e433fd745 (patch) | |
| tree | 918cc9f51276c7401c273fe05ad12d10edfaa40f /src/world.c | |
| parent | 77dddef4153688218bec0b50f547622daa18903d (diff) | |
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
Diffstat (limited to 'src/world.c')
| -rw-r--r-- | src/world.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); |
