pxl8/src/pxl8_procgen.h
2025-11-09 06:30:17 -06:00

56 lines
1 KiB
C

#pragma once
#include "pxl8_bsp.h"
#include "pxl8_types.h"
typedef enum pxl8_procgen_type {
PXL8_PROCGEN_CAVE,
PXL8_PROCGEN_DUNGEON,
PXL8_PROCGEN_TERRAIN
} pxl8_procgen_type;
typedef struct pxl8_procgen_params {
pxl8_procgen_type type;
i32 width;
i32 height;
i32 depth;
u32 seed;
f32 density;
i32 iterations;
void* type_params;
} pxl8_procgen_params;
typedef struct pxl8_procgen_cave_params {
i32 min_cave_size;
} pxl8_procgen_cave_params;
typedef struct pxl8_procgen_dungeon_params {
i32 room_count;
i32 min_room_size;
i32 max_room_size;
i32 corridor_width;
} pxl8_procgen_dungeon_params;
typedef struct pxl8_procgen_tex_params {
u32 seed;
i32 width;
i32 height;
f32 scale;
f32 roughness;
u8 base_color;
u8 variation;
} pxl8_procgen_tex_params;
#ifdef __cplusplus
extern "C" {
#endif
pxl8_result pxl8_procgen(pxl8_bsp* bsp, const pxl8_procgen_params* params);
void pxl8_procgen_tex(u8* buffer, const pxl8_procgen_tex_params* params);
#ifdef __cplusplus
}
#endif