3 #include <stdio.h> // TODO remove
4 #include <assimp/cimport.h>
5 #include <assimp/scene.h>
10 const Block BLOCK_EMPTY = 0;
11 const Block BLOCK_WALL01 = 1;
13 TGAimage* level_image = NULL;
15 Block get_block(GLushort x, GLushort y) {
16 if (level_image == NULL) {
19 return ((Block*) (*level_image).bytes)[x * (*level_image).header.image_width + y];
22 void set_image(TGAimage* image) {
26 void import_model(const char* path) {
27 const struct aiScene* scene = aiImportFile(path, 0u);
29 printf("We have nothing.\n");
32 printf("mFlags = %u\nmRootNode = %p\nmNumMeshes = %u\nmMeshes = %p\nmNumMaterials = %u\nmMaterials = %p\nmNumAnimations = %u\nmAnimations = %p\nmNumTextures = %u\nmTextures = %p\nmNumLights = %u\nmLights = %p\n",
37 (*scene).mNumMaterials,
39 (*scene).mNumAnimations,
41 (*scene).mNumTextures,
45 aiReleaseImport(scene);