Moved code and assets for the game to a seperate folder. Moved jansson and raylib to third_party.

This commit is contained in:
2025-12-16 11:47:55 +01:00
parent fd2dbf232d
commit 8cdbd5b162
63 changed files with 14 additions and 14 deletions

View File

@@ -0,0 +1,32 @@
#ifndef WORLD_H
#define WORLD_H
#include <stdint.h>
#include "entity.h"
#include "grid.h"
#include "shared/squeue.h"
#include "shared/random.h"
typedef struct {
uint32_t seed;
Random_Generator random_generator;
SQueue entity_id_queue;
Entity *entities;
uint16_t max_entities;
Grid grid;
} Game_World;
Game_World *game_world_create(uint32_t seed, uint16_t level_width, uint16_t level_height);
void game_world_destroy(Game_World *world);
bool game_world_create_entity(Game_World *world, Entity_Type type, uint16_t x, uint16_t y, Entity_ID *out_entity_id);
void game_world_destroy_entity(Game_World *world, Entity_ID entity_id);
// TODO: SS - "void game_world_spawn_player(Game_World *world, ..)"
Entity *game_world_try_get_entity_by_id(Game_World *world, Entity_ID id);
#endif