]> git.lizzy.rs Git - shadowclad.git/blobdiff - level.c
Return aiScene* from import, move prints to debugutil
[shadowclad.git] / level.c
diff --git a/level.c b/level.c
index 9f9b240ba628721d2d8cb98860933efd53e8b095..2c9dba2fc03dc7c43c253f5a4b3dcc805ca00a9e 100644 (file)
--- a/level.c
+++ b/level.c
@@ -23,24 +23,11 @@ void set_image(TGAimage* image) {
        level_image = image;
 }
 
-void import_model(const char* path) {
+const struct aiScene* import_model(const char* path) {
        const struct aiScene* scene = aiImportFile(path, 0u);
        if (scene == NULL) {
-               printf("We have nothing.\n");
-               return;
+               fprintf(stderr, "Asset import failed at file %s\n", path); // TODO factor logging the heck outta here
        }
-       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",
-                       (*scene).mFlags,
-                       (*scene).mRootNode,
-                       (*scene).mNumMeshes,
-                       (*scene).mMeshes,
-                       (*scene).mNumMaterials,
-                       (*scene).mMaterials,
-                       (*scene).mNumAnimations,
-                       (*scene).mAnimations,
-                       (*scene).mNumTextures,
-                       (*scene).mTextures,
-                       (*scene).mNumLights,
-                       (*scene).mLights);
-       aiReleaseImport(scene);
+       return scene;
+       // TODO aiReleaseImport(scene);
 }