aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ClientHamr/extantz
diff options
context:
space:
mode:
Diffstat (limited to 'ClientHamr/extantz')
-rw-r--r--ClientHamr/extantz/CDemo.cpp4
-rw-r--r--ClientHamr/extantz/crappisspuke.cpp4
-rw-r--r--ClientHamr/extantz/extantz.c59
3 files changed, 39 insertions, 28 deletions
diff --git a/ClientHamr/extantz/CDemo.cpp b/ClientHamr/extantz/CDemo.cpp
index 2013bdd..3b39653 100644
--- a/ClientHamr/extantz/CDemo.cpp
+++ b/ClientHamr/extantz/CDemo.cpp
@@ -32,8 +32,8 @@ void CDemo::setup(GLData *gld)
32{ 32{
33 device = gld->device; 33 device = gld->device;
34 IrrlichtDevice *device = gld->device; 34 IrrlichtDevice *device = gld->device;
35 IVideoDriver *driver = gld->driver; 35// IVideoDriver *driver = gld->driver;
36 ISceneManager *smgr = gld->smgr; 36// ISceneManager *smgr = gld->smgr;
37 37
38 if (device->getFileSystem()->existFile("irrlicht.dat")) 38 if (device->getFileSystem()->existFile("irrlicht.dat"))
39 device->getFileSystem()->addFileArchive("irrlicht.dat"); 39 device->getFileSystem()->addFileArchive("irrlicht.dat");
diff --git a/ClientHamr/extantz/crappisspuke.cpp b/ClientHamr/extantz/crappisspuke.cpp
index 576dd2b..6a560f1 100644
--- a/ClientHamr/extantz/crappisspuke.cpp
+++ b/ClientHamr/extantz/crappisspuke.cpp
@@ -33,7 +33,7 @@ EAPI int startIrr(GLData *gld)
33 void *display = NULL; 33 void *display = NULL;
34 unsigned long sfc = 0; 34 unsigned long sfc = 0;
35 void *ctx = NULL; 35 void *ctx = NULL;
36 Evas_GL_API *gl = gld->glApi; 36// Evas_GL_API *gl = gld->glApi;
37 37
38#if USE_DEMO 38#if USE_DEMO
39 myDemo = new CDemo(gld, additive); 39 myDemo = new CDemo(gld, additive);
@@ -238,7 +238,7 @@ EAPI void drawIrr_start(GLData *gld)
238 238
239 // Work out a frame delta time. 239 // Work out a frame delta time.
240 const u32 now = device->getTimer()->getTime(); 240 const u32 now = device->getTimer()->getTime();
241 const f32 frameDeltaTime = (f32)(now - then) / 1000.f; // Time in seconds 241// const f32 frameDeltaTime = (f32)(now - then) / 1000.f; // Time in seconds
242 then = now; 242 then = now;
243 243
244 244
diff --git a/ClientHamr/extantz/extantz.c b/ClientHamr/extantz/extantz.c
index 84567fe..d256478 100644
--- a/ClientHamr/extantz/extantz.c
+++ b/ClientHamr/extantz/extantz.c
@@ -37,14 +37,15 @@ static Elm_Genlist_Item_Class *grid_gic = NULL;
37static Elm_Genlist_Item_Class *account_gic = NULL; 37static Elm_Genlist_Item_Class *account_gic = NULL;
38static Elm_Genlist_Item_Class *viewer_gic = NULL; 38static Elm_Genlist_Item_Class *viewer_gic = NULL;
39 39
40static const char *img1 = PACKAGE_DATA_DIR "/images/plant_01.jpg"; 40//static const char *img1 = PACKAGE_DATA_DIR "/images/plant_01.jpg";
41static const char *img2 = PACKAGE_DATA_DIR "/images/sky_01.jpg"; 41//static const char *img2 = PACKAGE_DATA_DIR "/images/sky_01.jpg";
42static const char *img3 = PACKAGE_DATA_DIR "/images/rock_01.jpg"; 42static const char *img3 = PACKAGE_DATA_DIR "/images/rock_01.jpg";
43 43
44 44
45#define EPHYSICS_TEST_THEME "extantz" 45#define EPHYSICS_TEST_THEME "extantz"
46 46
47 47
48#if DO_GEARS
48//--------------------------------// 49//--------------------------------//
49// Gear Stuff. 50// Gear Stuff.
50 51
@@ -237,6 +238,8 @@ static void draw_gear(GLData *gld, Gear *gear, GLfloat *m, GLfloat x, GLfloat y,
237 gl->glEnableVertexAttribArray(1); 238 gl->glEnableVertexAttribArray(1);
238 gl->glDrawArrays(GL_TRIANGLE_STRIP, 0, gear->count); 239 gl->glDrawArrays(GL_TRIANGLE_STRIP, 0, gear->count);
239} 240}
241#endif
242
240 243
241static void gldata_init(GLData *gld) 244static void gldata_init(GLData *gld)
242{ 245{
@@ -255,6 +258,8 @@ static void gldata_init(GLData *gld)
255 258
256//-------------------------// 259//-------------------------//
257 260
261
262#if DO_GEARS
258static const char vertex_shader[] = 263static const char vertex_shader[] =
259 "uniform mat4 proj;\n" 264 "uniform mat4 proj;\n"
260 "attribute vec4 position;\n" 265 "attribute vec4 position;\n"
@@ -327,7 +332,7 @@ static void gears_init(GLData *gld)
327 Evas_GL_API *gl = gld->glApi; 332 Evas_GL_API *gl = gld->glApi;
328 GLint linked = 0; 333 GLint linked = 0;
329 334
330 char msg[512]; 335// char msg[512];
331 336
332 gl->glEnable(GL_CULL_FACE); 337 gl->glEnable(GL_CULL_FACE);
333 gl->glEnable(GL_DEPTH_TEST); 338 gl->glEnable(GL_DEPTH_TEST);
@@ -383,6 +388,7 @@ static void gears_init(GLData *gld)
383 388
384 gld->gearsInited = EINA_TRUE; 389 gld->gearsInited = EINA_TRUE;
385} 390}
391#endif
386 392
387static void _on_camera_input_down(void *data, Evas *evas, Evas_Object *obj, void *event_info) 393static void _on_camera_input_down(void *data, Evas *evas, Evas_Object *obj, void *event_info)
388{ 394{
@@ -559,7 +565,7 @@ static Eina_Bool _cb_event_GL(void *data, Evas_Object *obj, Evas_Object *src, Ev
559// Evas style event callback. 565// Evas style event callback.
560static void _cb_mouse_down_elm(void *data, Evas *evas, Evas_Object *obj, void *event_info) 566static void _cb_mouse_down_elm(void *data, Evas *evas, Evas_Object *obj, void *event_info)
561{ 567{
562 GLData *gld = data; 568// GLData *gld = data;
563 Evas_Event_Mouse_Down *ev = event_info; 569 Evas_Event_Mouse_Down *ev = event_info;
564 570
565 if (1 == ev->button) 571 if (1 == ev->button)
@@ -708,7 +714,7 @@ static void on_pixels(void *data, Evas_Object *obj)
708 714
709static void _draw_gl(Evas_Object *obj) 715static void _draw_gl(Evas_Object *obj)
710{ 716{
711 Evas_GL_API *gl = elm_glview_gl_api_get(obj); 717// Evas_GL_API *gl = elm_glview_gl_api_get(obj);
712 GLData *gld = evas_object_data_get(obj, "gld"); 718 GLData *gld = evas_object_data_get(obj, "gld");
713 if (!gld) return; 719 if (!gld) return;
714 720
@@ -1100,7 +1106,8 @@ static void create_handles(Evas_Object *obj)
1100static Evas_Object *_toolbar_menu_add(Evas_Object *win, Evas_Object *tb, char *label) 1106static Evas_Object *_toolbar_menu_add(Evas_Object *win, Evas_Object *tb, char *label)
1101{ 1107{
1102 Evas_Object *menu= NULL; 1108 Evas_Object *menu= NULL;
1103 Elm_Object_Item *tb_it, *menu_it; 1109 Elm_Object_Item *tb_it;
1110//, *menu_it;
1104 1111
1105 tb_it = elm_toolbar_item_append(tb, NULL, label, NULL, NULL); 1112 tb_it = elm_toolbar_item_append(tb, NULL, label, NULL, NULL);
1106 elm_toolbar_item_menu_set(tb_it, EINA_TRUE); 1113 elm_toolbar_item_menu_set(tb_it, EINA_TRUE);
@@ -1150,8 +1157,9 @@ static void fang_win_complete(GLData *gld, Evas_Object *win, int x, int y, int w
1150 1157
1151static void overlay_add(GLData *gld) 1158static void overlay_add(GLData *gld)
1152{ 1159{
1153 Evas_Object *bg, *bx, *tb, *menu; 1160 Evas_Object *bg;
1154 Elm_Object_Item *tb_it, *menu_it; 1161//, *bx, *tb, *menu;
1162// Elm_Object_Item *tb_it, *menu_it;
1155 1163
1156 // There many are reasons for this window. 1164 // There many are reasons for this window.
1157 // The first is to cover the GL and provide something to click on to change focus. 1165 // The first is to cover the GL and provide something to click on to change focus.
@@ -1229,9 +1237,10 @@ static void chat_add(GLData *gld)
1229 1237
1230static void woMan_add(GLData *gld) 1238static void woMan_add(GLData *gld)
1231{ 1239{
1232 Evas_Object *win, *bg, *bx, *ic, *bb, *av, *en, *bt, *nf, *tab, *tb, *gridList, *viewerList, *menu; 1240// Evas_Object *win, *bg, *bx, *ic, *bb, *av, *en, *bt, *nf, *tab, *tb, *gridList, *viewerList, *menu;
1241 Evas_Object *win, *bx, *bt, *nf, *tab, *tb, *gridList, *viewerList, *menu;
1233 Elm_Object_Item *tb_it, *menu_it, *tab_it; 1242 Elm_Object_Item *tb_it, *menu_it, *tab_it;
1234 char buf[PATH_MAX]; 1243// char buf[PATH_MAX];
1235 int i; 1244 int i;
1236 1245
1237 win = fang_win_add(gld); 1246 win = fang_win_add(gld);
@@ -1374,15 +1383,17 @@ static void woMan_add(GLData *gld)
1374 1383
1375EAPI_MAIN int elm_main(int argc, char **argv) 1384EAPI_MAIN int elm_main(int argc, char **argv)
1376{ 1385{
1377 Evas_Object *bg, *menu, *bt, *tb; 1386// Evas_Object *bg, *menu, *bt, *tb;
1378 Elm_Object_Item *tb_it, *menu_it; 1387 Evas_Object *menu, *tb;
1388 Elm_Object_Item *tb_it;
1389//, *menu_it;
1379 EPhysics_Body *boundary; 1390 EPhysics_Body *boundary;
1380 EPhysics_World *world; 1391 EPhysics_World *world;
1381 EPhysics_Body *box_body1, *box_body2; 1392 EPhysics_Body *box_body1, *box_body2;
1382 Evas_Object *box1, *box2; 1393 Evas_Object *box1, *box2;
1383 GLData *gld = NULL; 1394 GLData *gld = NULL;
1384 char buf[PATH_MAX]; 1395// char buf[PATH_MAX];
1385 int i; 1396// int i;
1386// Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't. 1397// Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't.
1387 1398
1388 _log_domain = eina_log_domain_register("extantz", NULL); 1399 _log_domain = eina_log_domain_register("extantz", NULL);
@@ -1403,7 +1414,7 @@ EAPI_MAIN int elm_main(int argc, char **argv)
1403 elm_config_scale_set(1.0); 1414 elm_config_scale_set(1.0);
1404 1415
1405 // alloc a data struct to hold our relevant gl info in 1416 // alloc a data struct to hold our relevant gl info in
1406 if (!(gld = calloc(1, sizeof(GLData)))) return; 1417 if (!(gld = calloc(1, sizeof(GLData)))) return 1;
1407 gldata_init(gld); 1418 gldata_init(gld);
1408 1419
1409 // Set the engine to opengl_x11, then open our window. 1420 // Set the engine to opengl_x11, then open our window.
@@ -1462,25 +1473,25 @@ EAPI_MAIN int elm_main(int argc, char **argv)
1462 1473
1463 // Menus. 1474 // Menus.
1464 menu = _toolbar_menu_add(gld->win, tb, "file"); 1475 menu = _toolbar_menu_add(gld->win, tb, "file");
1465 elm_menu_item_add(menu, menu_it, NULL, "quit", _on_done, gld); 1476 elm_menu_item_add(menu, NULL, NULL, "quit", _on_done, gld);
1466 1477
1467 menu = _toolbar_menu_add(gld->win, tb, "edit"); 1478 menu = _toolbar_menu_add(gld->win, tb, "edit");
1468 elm_menu_item_add(menu, menu_it, NULL, "preferences", NULL, NULL); 1479 elm_menu_item_add(menu, NULL, NULL, "preferences", NULL, NULL);
1469 1480
1470 menu = _toolbar_menu_add(gld->win, tb, "view"); 1481 menu = _toolbar_menu_add(gld->win, tb, "view");
1471 menu = _toolbar_menu_add(gld->win, tb, "world"); 1482 menu = _toolbar_menu_add(gld->win, tb, "world");
1472 menu = _toolbar_menu_add(gld->win, tb, "tools"); 1483 menu = _toolbar_menu_add(gld->win, tb, "tools");
1473 1484
1474 menu = _toolbar_menu_add(gld->win, tb, "help"); 1485 menu = _toolbar_menu_add(gld->win, tb, "help");
1475 elm_menu_item_add(menu, menu_it, NULL, "grid help", NULL, NULL); 1486 elm_menu_item_add(menu, NULL, NULL, "grid help", NULL, NULL);
1476 elm_menu_item_separator_add(menu, menu_it); 1487 elm_menu_item_separator_add(menu, NULL);
1477 elm_menu_item_add(menu, menu_it, NULL, "extantz blogs", NULL, NULL); 1488 elm_menu_item_add(menu, NULL, NULL, "extantz blogs", NULL, NULL);
1478 elm_menu_item_add(menu, menu_it, NULL, "extantz forum", NULL, NULL); 1489 elm_menu_item_add(menu, NULL, NULL, "extantz forum", NULL, NULL);
1479 elm_menu_item_separator_add(menu, menu_it); 1490 elm_menu_item_separator_add(menu, NULL);
1480 elm_menu_item_add(menu, menu_it, NULL, "about extantz", NULL, NULL); 1491 elm_menu_item_add(menu, NULL, NULL, "about extantz", NULL, NULL);
1481 1492
1482 menu = _toolbar_menu_add(gld->win, tb, "advanced"); 1493 menu = _toolbar_menu_add(gld->win, tb, "advanced");
1483 elm_menu_item_add(menu, menu_it, NULL, "debug settings", NULL, NULL); 1494 elm_menu_item_add(menu, NULL, NULL, "debug settings", NULL, NULL);
1484 1495
1485 menu = _toolbar_menu_add(gld->win, tb, "god"); 1496 menu = _toolbar_menu_add(gld->win, tb, "god");
1486 1497