doin' some cleanup...

This commit is contained in:
asrael 2026-04-14 13:16:47 -05:00
parent 40f5cdcaa5
commit f6d6efea95
16 changed files with 136 additions and 182 deletions

View file

@ -53,25 +53,6 @@ static bool validate_chunk(const demo3d_bsp_chunk* chunk, u32 element_size, usiz
return true;
}
static inline bool demo3d_bsp_get_edge_vertex(const demo3d_bsp* bsp, i32 surfedge_idx, u32* out_vert_idx) {
if (surfedge_idx >= (i32)bsp->num_surfedges) return false;
i32 edge_idx = bsp->surfedges[surfedge_idx];
u32 vertex_index;
if (edge_idx >= 0) {
if ((u32)edge_idx >= bsp->num_edges) return false;
vertex_index = 0;
} else {
edge_idx = -edge_idx;
if ((u32)edge_idx >= bsp->num_edges) return false;
vertex_index = 1;
}
*out_vert_idx = bsp->edges[edge_idx].vertex[vertex_index];
return *out_vert_idx < bsp->num_vertices;
}
pxl8_result demo3d_bsp_load(const char* path, demo3d_bsp* bsp) {
if (!path || !bsp) return PXL8_ERROR_INVALID_ARGUMENT;