aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/GuiLua/GuiLua.c3
-rw-r--r--src/GuiLua/GuiLua.h3
-rw-r--r--src/extantz/extantz.c28
3 files changed, 18 insertions, 16 deletions
diff --git a/src/GuiLua/GuiLua.c b/src/GuiLua/GuiLua.c
index 65e0d79..f2de1ea 100644
--- a/src/GuiLua/GuiLua.c
+++ b/src/GuiLua/GuiLua.c
@@ -429,7 +429,7 @@ GuiLua *GuiLuaDo(int argc, char **argv, winFang *parent, EPhysics_World *world)
429 return result; 429 return result;
430} 430}
431 431
432GuiLua *GuiLuaLoad(char *module, winFang *parent, EPhysics_World *world) 432GuiLua *GuiLuaLoad(char *module, winFang *parent, Ecore_Con_Server *server, EPhysics_World *world)
433{ 433{
434 GuiLua *result; 434 GuiLua *result;
435 char *args[] = {"GuiLUa", "-l", ""}; 435 char *args[] = {"GuiLUa", "-l", ""};
@@ -437,6 +437,7 @@ GuiLua *GuiLuaLoad(char *module, winFang *parent, EPhysics_World *world)
437 args[2] = module; 437 args[2] = module;
438 result = GuiLuaDo(3, args, parent, world); 438 result = GuiLuaDo(3, args, parent, world);
439 result->name = module; 439 result->name = module;
440 result->server = server;
440 return result; 441 return result;
441} 442}
442 443
diff --git a/src/GuiLua/GuiLua.h b/src/GuiLua/GuiLua.h
index 9ee5a1f..cf94e1f 100644
--- a/src/GuiLua/GuiLua.h
+++ b/src/GuiLua/GuiLua.h
@@ -22,6 +22,7 @@ typedef struct _GuiLua
22 winFang *us; // Our window, if it exists. 22 winFang *us; // Our window, if it exists.
23 winFang *parent; // Our parent window, if it exists. 23 winFang *parent; // Our parent window, if it exists.
24 EPhysics_World *world; // Our world, if it exists. 24 EPhysics_World *world; // Our world, if it exists.
25 Ecore_Con_Server *server;
25 int inDel; 26 int inDel;
26 27
27 Eina_Clist node; 28 Eina_Clist node;
@@ -32,7 +33,7 @@ typedef struct _GuiLua
32extern const char *glName; 33extern const char *glName;
33 34
34GuiLua *GuiLuaDo(int argc, char **argv, winFang *parent, EPhysics_World *world); 35GuiLua *GuiLuaDo(int argc, char **argv, winFang *parent, EPhysics_World *world);
35GuiLua *GuiLuaLoad(char *module, winFang *parent, EPhysics_World *world); 36GuiLua *GuiLuaLoad(char *module, winFang *parent, Ecore_Con_Server *server, EPhysics_World *world);
36void GuiLuaDel(GuiLua *gl); 37void GuiLuaDel(GuiLua *gl);
37 38
38#endif 39#endif
diff --git a/src/extantz/extantz.c b/src/extantz/extantz.c
index 6c68bd2..5122f42 100644
--- a/src/extantz/extantz.c
+++ b/src/extantz/extantz.c
@@ -652,18 +652,6 @@ EAPI_MAIN int elm_main(int argc, char **argv)
652 652
653 ourGlobals.world = ephysicsAdd(&ourGlobals); 653 ourGlobals.world = ephysicsAdd(&ourGlobals);
654 654
655// overlay_add(&ourGlobals);
656 GuiLuaLoad("test", ourGlobals.mainWindow, ourGlobals.world);
657 woMan_add(&ourGlobals);
658 ourGlobals.LSLGuiMess = GuiLuaLoad("LSLGuiMess", ourGlobals.mainWindow, ourGlobals.world);
659 ourGlobals.purkle = GuiLuaLoad("purkle", ourGlobals.mainWindow, ourGlobals.world);
660 ourGlobals.files = filesAdd(&ourGlobals, (char *) elm_app_data_dir_get(), EINA_TRUE, EINA_FALSE);
661
662 // Bump the top toolbar above the windows.
663 evas_object_raise(ourGlobals.tb);
664
665 _on_resize(&ourGlobals, NULL, NULL, NULL);
666
667 // Try to connect to the love server we started before. 655 // Try to connect to the love server we started before.
668 ourGlobals.address = "127.0.0.1"; 656 ourGlobals.address = "127.0.0.1";
669 ourGlobals.port = 8211; 657 ourGlobals.port = 8211;
@@ -678,16 +666,28 @@ EAPI_MAIN int elm_main(int argc, char **argv)
678 else 666 else
679 PC("Failed to connect to server!"); 667 PC("Failed to connect to server!");
680 668
669// overlay_add(&ourGlobals);
670// GuiLuaLoad("test", ourGlobals.mainWindow, ourGlobals.world);
671 woMan_add(&ourGlobals);
672 ourGlobals.LSLGuiMess = GuiLuaLoad("LSLGuiMess", ourGlobals.mainWindow, ourGlobals.server, ourGlobals.world);
673 ourGlobals.purkle = GuiLuaLoad("purkle", ourGlobals.mainWindow, ourGlobals.server, ourGlobals.world);
674 ourGlobals.files = filesAdd(&ourGlobals, (char *) elm_app_data_dir_get(), EINA_TRUE, EINA_FALSE);
675
676 // Bump the top toolbar above the windows.
677 evas_object_raise(ourGlobals.tb);
678
679 _on_resize(&ourGlobals, NULL, NULL, NULL);
680
681 // Setup our callback for clicking in world. 681 // Setup our callback for clicking in world.
682 ourGlobals.scene->clickCb = _onWorldClick; 682 ourGlobals.scene->clickCb = _onWorldClick;
683 683
684 elm_run(); 684 elm_run();
685 685
686 if (ourGlobals.server) ecore_con_server_del(ourGlobals.server);
687
688 ephysics_world_del(ourGlobals.world); 686 ephysics_world_del(ourGlobals.world);
689 ephysics_shutdown(); 687 ephysics_shutdown();
690 688
689 if (ourGlobals.server) ecore_con_server_del(ourGlobals.server);
690
691 if (ourGlobals.win) 691 if (ourGlobals.win)
692 { 692 {
693 Evas_3D_Demo_fini(&ourGlobals); 693 Evas_3D_Demo_fini(&ourGlobals);