2 #include <assimp/cimport.h>
3 #include <assimp/scene.h>
6 #include <stdio.h> // TODO remove
11 const Block BLOCK_EMPTY = 0;
12 const Block BLOCK_WALL01 = 1;
14 TgaImage* levelImage = NULL;
16 Block getBlock(GLushort x, GLushort y) {
17 if (levelImage == NULL) {
20 return ((Block*) (*levelImage).bytes)[x * (*levelImage).header.imageWidth + y];
23 void setImage(TgaImage* image) {
27 const struct aiScene* importModel(const char* path) {
28 const struct aiScene* scene = aiImportFile(path, 0u);
30 fprintf(stderr, "Asset import failed at file %s\n", path); // TODO factor logging the heck outta here
33 // TODO aiReleaseImport(scene);