wip procgen

This commit is contained in:
asrael 2025-11-09 06:30:17 -06:00
parent a653eae745
commit 79a678f162
No known key found for this signature in database
GPG key ID: 2786557804DFAE24
18 changed files with 1317 additions and 127 deletions

View file

@ -208,13 +208,31 @@ static const char* pxl8_ffi_cdefs =
"pxl8_mat4 pxl8_mat4_scale(float x, float y, float z);\n"
"pxl8_mat4 pxl8_mat4_translate(float x, float y, float z);\n"
"\n"
"typedef enum pxl8_procgen_type {\n"
" PXL8_PROCGEN_CAVE = 0,\n"
" PXL8_PROCGEN_DUNGEON = 1,\n"
" PXL8_PROCGEN_TERRAIN = 2\n"
"} pxl8_procgen_type;\n"
"\n"
"typedef struct pxl8_procgen_params {\n"
" pxl8_procgen_type type;\n"
" int width;\n"
" int height;\n"
" int depth;\n"
" unsigned int seed;\n"
" float density;\n"
" int iterations;\n"
" void* type_params;\n"
"} pxl8_procgen_params;\n"
"\n"
"typedef struct pxl8_world pxl8_world;\n"
"pxl8_world* pxl8_world_create(void);\n"
"void pxl8_world_destroy(pxl8_world* world);\n"
"int pxl8_world_generate(pxl8_world* world, const pxl8_procgen_params* params);\n"
"bool pxl8_world_is_loaded(const pxl8_world* world);\n"
"int pxl8_world_load(pxl8_world* world, const char* path);\n"
"void pxl8_world_render(pxl8_world* world, pxl8_gfx* gfx, pxl8_vec3 camera_pos);\n"
"void pxl8_world_unload(pxl8_world* world);\n"
"bool pxl8_world_is_loaded(const pxl8_world* world);\n"
"\n"
"typedef struct pxl8_ui pxl8_ui;\n"
"typedef struct { unsigned char bg_color; unsigned int sprite_id; int corner_size; int edge_size; int padding; } pxl8_frame_theme;\n"