refactor separate framework from game code, add demo3d
This commit is contained in:
parent
19ae869769
commit
40f5cdcaa5
92 changed files with 2665 additions and 6547 deletions
17
demo3d/client/world/demo3d_chunk.c
Normal file
17
demo3d/client/world/demo3d_chunk.c
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#include "demo3d_chunk.h"
|
||||
|
||||
#include "demo3d_bsp.h"
|
||||
#include "pxl8_mem.h"
|
||||
|
||||
demo3d_chunk* demo3d_chunk_create_bsp(u32 id) {
|
||||
demo3d_chunk* chunk = pxl8_calloc(1, sizeof(demo3d_chunk));
|
||||
if (!chunk) return NULL;
|
||||
chunk->id = id;
|
||||
return chunk;
|
||||
}
|
||||
|
||||
void demo3d_chunk_destroy(demo3d_chunk* chunk) {
|
||||
if (!chunk) return;
|
||||
if (chunk->bsp) demo3d_bsp_destroy(chunk->bsp);
|
||||
pxl8_free(chunk);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue