|
|
|
@ -70,6 +70,18 @@ arenaAllocateBlock(memory_arena* arena, size_t block_size) |
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define MAX_NAME_LENGTH 256 |
|
|
|
|
|
|
|
char* |
|
|
|
|
|
|
|
arenaCopyCStr(memory_arena* arena, const char* input) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
u32 name_len = std::strlen(input) + 1; |
|
|
|
|
|
|
|
assert(name_len < MAX_NAME_LENGTH); |
|
|
|
|
|
|
|
// TODO: make an arena alloc macro
|
|
|
|
|
|
|
|
char* out = (char*) arenaAllocateBlock(arena, name_len); |
|
|
|
|
|
|
|
std::strncpy(out, input, name_len); |
|
|
|
|
|
|
|
return out; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// forward declarations
|
|
|
|
// forward declarations
|
|
|
|
void dumpNodes(tinygltf::Model t_mdl); |
|
|
|
void dumpNodes(tinygltf::Model t_mdl); |
|
|
|
|