Changeset View
Changeset View
Standalone View
Standalone View
src/examples/ephysics/test_no_gravity.c
1 | #ifdef HAVE_CONFIG_H | 1 | #ifdef HAVE_CONFIG_H | ||
---|---|---|---|---|---|
2 | # include <config.h> | 2 | # include <config.h> | ||
3 | #endif | 3 | #endif | ||
4 | 4 | | |||
5 | #include "ephysics_test.h" | 5 | #include "ephysics_test.h" | ||
6 | 6 | | |||
7 | static void | 7 | static void | ||
8 | _stop(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) | 8 | _stop(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) | ||
9 | { | 9 | { | ||
10 | Test_Data *test_data = data; | 10 | Test_Data *test_data = data; | ||
11 | EPhysics_Body *body = test_data->data; | 11 | EPhysics_Body *body = test_data->data; | ||
12 | 12 | | |||
13 | ephysics_body_stop(body); | 13 | ephysics_body_stop(body); | ||
14 | INF("Stop purple cube"); | 14 | INF("Stop purple cube"); | ||
15 | } | 15 | } | ||
16 | 16 | | |||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | 19 | { | |||
71 | ephysics_body_linear_velocity_set(box_body2, 40, -30, 0); | 71 | ephysics_body_linear_velocity_set(box_body2, 40, -30, 0); | ||
72 | ephysics_body_angular_velocity_set(box_body2, 0, 0, 36); | 72 | ephysics_body_angular_velocity_set(box_body2, 0, 0, 36); | ||
73 | ephysics_body_sleeping_threshold_set(box_body2, 0.1, 0.1); | 73 | ephysics_body_sleeping_threshold_set(box_body2, 0.1, 0.1); | ||
74 | test_data->bodies = eina_list_append(test_data->bodies, box_body2); | 74 | test_data->bodies = eina_list_append(test_data->bodies, box_body2); | ||
75 | test_data->data = box_body2; | 75 | test_data->data = box_body2; | ||
76 | } | 76 | } | ||
77 | 77 | | |||
78 | static void | 78 | static void | ||
79 | _restart(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__) | 79 | _restart(void *data, Evas_Object *obj EINA_UNUSED, const char *emission EINA_UNUSED, const char *source EINA_UNUSED) | ||
80 | { | 80 | { | ||
81 | Test_Data *test_data = data; | 81 | Test_Data *test_data = data; | ||
82 | 82 | | |||
83 | DBG("Restart pressed"); | 83 | DBG("Restart pressed"); | ||
84 | test_clean(test_data); | 84 | test_clean(test_data); | ||
85 | _world_populate(test_data); | 85 | _world_populate(test_data); | ||
86 | } | 86 | } | ||
87 | 87 | | |||
88 | void | 88 | void | ||
89 | test_no_gravity(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) | 89 | test_no_gravity(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) | ||
90 | { | 90 | { | ||
91 | EPhysics_Body *boundary; | 91 | EPhysics_Body *boundary; | ||
92 | EPhysics_World *world; | 92 | EPhysics_World *world; | ||
93 | Test_Data *test_data; | 93 | Test_Data *test_data; | ||
94 | Evas_Object *bt; | 94 | Evas_Object *bt; | ||
95 | 95 | | |||
96 | if (!ephysics_init()) | 96 | if (!ephysics_init()) | ||
97 | return; | 97 | return; | ||
Show All 36 Lines |