projects
/
ld37_one_room
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
backported changes from museum project
[ld37_one_room]
/
src
/
sceneload.cc
diff --git
a/src/sceneload.cc
b/src/sceneload.cc
index
e33e457
..
58d1865
100644
(file)
--- a/
src/sceneload.cc
+++ b/
src/sceneload.cc
@@
-200,6
+200,8
@@
static bool load_material(Scene *scn, Material *mat, const aiMaterial *aimat)
*dptr++ = *sptr == '\\' ? '/' : *sptr;
} while(*sptr++);
*dptr++ = *sptr == '\\' ? '/' : *sptr;
} while(*sptr++);
+ if(!fname || !*fname) continue;
+
int textype = assimp_textype(aitype);
Texture *tex = texman.get_texture(fname, TEX_2D, &scn->datamap);
int textype = assimp_textype(aitype);
Texture *tex = texman.get_texture(fname, TEX_2D, &scn->datamap);
@@
-377,6
+379,7
@@
Scene *SceneSet::create_scene()
bool SceneSet::load_scene(Scene *scn, const char *fname)
{
bool SceneSet::load_scene(Scene *scn, const char *fname)
{
+ scn->clear();
return scn->load(fname, SCNLOAD_FLIPTEX | SCNLOAD_STAGE_IO);
}
return scn->load(fname, SCNLOAD_FLIPTEX | SCNLOAD_STAGE_IO);
}