X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=blobdiff_plain;f=src%2Fapp.cc;h=7b4280d897e346fb1cbd4ff32b185e88da27c1be;hp=63e7cd71399619f83e39410ab07b101d49205fbc;hb=0d27f859021b4af5dbb5404ef5af012546abf335;hpb=d47a663825bd358d2165c1a4b040cc828aeb4991 diff --git a/src/app.cc b/src/app.cc index 63e7cd7..7b4280d 100644 --- a/src/app.cc +++ b/src/app.cc @@ -84,6 +84,8 @@ static Renderer *rend; static Ray last_pick_ray; +static bool post_scene_init_pending = true; + bool app_init(int argc, char **argv) { @@ -206,6 +208,11 @@ bool app_init(int argc, char **argv) return true; } +static void post_scene_init() +{ + exman->load(mscn, "data/exhibits"); +} + void app_cleanup() { if(mscn->music) { @@ -257,6 +264,11 @@ static void update(float dt) texman.update(); sceneman.update(); + if(post_scene_init_pending && !sceneman.pending()) { + post_scene_init_pending = false; + post_scene_init(); + } + mscn->update(dt); exman->update(dt); exui_update(dt);