diff options
Diffstat (limited to 'src/extantz/extantz.c')
-rw-r--r-- | src/extantz/extantz.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/extantz/extantz.c b/src/extantz/extantz.c index 5fb88f4..03979ab 100644 --- a/src/extantz/extantz.c +++ b/src/extantz/extantz.c | |||
@@ -89,6 +89,8 @@ static void _on_resize(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA | |||
89 | evas_obj_size_hint_min_get(NULL, &h), | 89 | evas_obj_size_hint_min_get(NULL, &h), |
90 | evas_obj_size_set(ourGlobals->win_w, h) | 90 | evas_obj_size_set(ourGlobals->win_w, h) |
91 | ); | 91 | ); |
92 | if (ourGlobals->world) | ||
93 | ephysics_world_render_geometry_set(ourGlobals->world, 0, 0, -50, ourGlobals->win_w, ourGlobals->win_h, 100); | ||
92 | _resize(gld); | 94 | _resize(gld); |
93 | } | 95 | } |
94 | 96 | ||
@@ -403,7 +405,6 @@ void overlay_add(globals *ourGlobals) | |||
403 | 405 | ||
404 | EAPI_MAIN int elm_main(int argc, char **argv) | 406 | EAPI_MAIN int elm_main(int argc, char **argv) |
405 | { | 407 | { |
406 | EPhysics_World *world; | ||
407 | GLData *gld = NULL; | 408 | GLData *gld = NULL; |
408 | char buf[PATH_MAX]; | 409 | char buf[PATH_MAX]; |
409 | // Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't. | 410 | // Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't. |
@@ -435,17 +436,15 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
435 | elm_config_finger_size_set(0); | 436 | elm_config_finger_size_set(0); |
436 | elm_config_scale_set(1.0); | 437 | elm_config_scale_set(1.0); |
437 | 438 | ||
438 | #if USE_PHYSICS | ||
439 | if (!ephysics_init()) | 439 | if (!ephysics_init()) |
440 | return 1; | 440 | return 1; |
441 | #endif | ||
442 | 441 | ||
443 | gld = &ourGlobals.gld; | 442 | gld = &ourGlobals.gld; |
444 | gldata_init(gld); | 443 | gldata_init(gld); |
445 | 444 | ||
446 | // Set the engine to opengl_x11, then open our window. | 445 | // Set the engine to opengl_x11, then open our window. |
447 | elm_config_preferred_engine_set("opengl_x11"); | 446 | elm_config_preferred_engine_set("opengl_x11"); |
448 | ourGlobals.mainWindow = winFangAdd(NULL, 0, 0, 50, 20, "extantz virtual world viewer", "extantz"); | 447 | ourGlobals.mainWindow = winFangAdd(NULL, 0, 0, 50, 20, "extantz virtual world viewer", "extantz", NULL); |
449 | // Set preferred engine back to default from config | 448 | // Set preferred engine back to default from config |
450 | elm_config_preferred_engine_set(NULL); | 449 | elm_config_preferred_engine_set(NULL); |
451 | 450 | ||
@@ -514,17 +513,15 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
514 | // Also, GL focus gets lost when any menu is used. sigh | 513 | // Also, GL focus gets lost when any menu is used. sigh |
515 | makeMainMenu(&ourGlobals); | 514 | makeMainMenu(&ourGlobals); |
516 | 515 | ||
516 | ourGlobals.world = ephysicsAdd(&ourGlobals); | ||
517 | |||
517 | // overlay_add(&ourGlobals); | 518 | // overlay_add(&ourGlobals); |
518 | GuiLuaLoad("test", ourGlobals.mainWindow); | 519 | GuiLuaLoad("test", ourGlobals.mainWindow, ourGlobals.world); |
519 | woMan_add(&ourGlobals); | 520 | woMan_add(&ourGlobals); |
520 | GuiLuaLoad("purkle", ourGlobals.mainWindow); | 521 | GuiLuaLoad("purkle", ourGlobals.mainWindow, ourGlobals.world); |
521 | ourGlobals.files = filesAdd(&ourGlobals, (char *) elm_app_data_dir_get(), EINA_TRUE, EINA_FALSE); | 522 | ourGlobals.files = filesAdd(&ourGlobals, (char *) elm_app_data_dir_get(), EINA_TRUE, EINA_FALSE); |
522 | 523 | ||
523 | #if USE_PHYSICS | 524 | // Bump the top toolbar above the windows. |
524 | world = ephysicsAdd(&ourGlobals); | ||
525 | #endif | ||
526 | |||
527 | // Bump the top toolbar above the windows. | ||
528 | evas_object_raise(ourGlobals.tb); | 525 | evas_object_raise(ourGlobals.tb); |
529 | 526 | ||
530 | evas_object_show(ourGlobals.mainWindow->box); | 527 | evas_object_show(ourGlobals.mainWindow->box); |
@@ -532,10 +529,8 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
532 | 529 | ||
533 | elm_run(); | 530 | elm_run(); |
534 | 531 | ||
535 | #if USE_PHYSICS | 532 | ephysics_world_del(ourGlobals.world); |
536 | ephysics_world_del(world); | ||
537 | ephysics_shutdown(); | 533 | ephysics_shutdown(); |
538 | #endif | ||
539 | 534 | ||
540 | if (ourGlobals.win) | 535 | if (ourGlobals.win) |
541 | { | 536 | { |