From 1156c0f58b01ff080b9d9ede15b449a845df6654 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 11 Mar 2020 01:52:27 +0100 Subject: Starting on entity system... --- src/ModelLoader.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/ModelLoader.cpp') diff --git a/src/ModelLoader.cpp b/src/ModelLoader.cpp index 60626f1..099349c 100644 --- a/src/ModelLoader.cpp +++ b/src/ModelLoader.cpp @@ -171,13 +171,18 @@ namespace amalgine { for(unsigned int j = 0; j < num_textures; ++j) { std::string texture_name = model_loader.extract_null_terminated_string(); + if(texture_name.empty()) + continue; + fprintf(stderr, "texture name: %s\n", texture_name.c_str()); std::string texture_path = dir_path + "/" + texture_name; - assert(!*image); // TODO: Support multiple images + //assert(!*image); // TODO: Support multiple images + if(*image) + continue; Result image_result = Image::loadFromFile(texture_path.c_str()); if(!image_result) { - fprintf(stderr, "%s\n", image_result.getErrorMsg().c_str()); - return false; + fprintf(stderr, "Warning: %s\n", image_result.getErrorMsg().c_str()); + continue; } *image = image_result.unwrap(); } -- cgit v1.2.3