aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/ephysics/src/lib
diff options
context:
space:
mode:
authorLeandro Dorileo <dorileo@profusion.mobi>2012-11-23 21:50:02 +0000
committerBruno Dilly <bdilly@profusion.mobi>2012-11-23 21:50:02 +0000
commit0951154f9c47a68407d57316eaef1a6e0a5c6bc6 (patch)
tree89d7511220d0b1bff9f84cee528ba8ae1d0c5ab6 /legacy/ephysics/src/lib
parent6f743c6978aa7121c9a0dc09663b2cdc29e2d539 (diff)
downloadefl-0951154f9c47a68407d57316eaef1a6e0a5c6bc6.tar.gz
efl-0951154f9c47a68407d57316eaef1a6e0a5c6bc6.tar.xz
efl-0951154f9c47a68407d57316eaef1a6e0a5c6bc6.zip
EPhysics: slice_init doesn't know about
body->evas_object anymore So we can use the same functions to initialize the slices in case of face slicing. Patch by: Leandro Dorileo <dorileo@profusion.mobi> SVN revision: 79598
Diffstat (limited to 'legacy/ephysics/src/lib')
-rw-r--r--legacy/ephysics/src/lib/ephysics_body.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/legacy/ephysics/src/lib/ephysics_body.cpp b/legacy/ephysics/src/lib/ephysics_body.cpp
index aebd29799..b0bad5d78 100644
--- a/legacy/ephysics/src/lib/ephysics_body.cpp
+++ b/legacy/ephysics/src/lib/ephysics_body.cpp
@@ -206,7 +206,7 @@ _ephysics_body_soft_body_slice_new(EPhysics_Body *body, double delta, double max
}
static void
-_ephysics_body_soft_body_slices_init(EPhysics_Body *body, Eina_List *slices)
+_ephysics_body_soft_body_slices_init(EPhysics_Body *body, Evas_Object *obj, Eina_List *slices)
{
EPhysics_Body_Soft_Body_Slice *slice = NULL;
btVector3 p0, p1, p2;
@@ -215,16 +215,16 @@ _ephysics_body_soft_body_slices_init(EPhysics_Body *body, Eina_List *slices)
Eina_List *l;
Evas *evas;
- evas = evas_object_evas_get(body->evas_obj);
- evas_object_geometry_get(body->evas_obj, NULL, NULL, &w, &h);
+ evas = evas_object_evas_get(obj);
+ evas_object_geometry_get(obj, NULL, NULL, &w, &h);
EINA_LIST_FOREACH(slices, l, slice_data)
{
slice = (EPhysics_Body_Soft_Body_Slice *) slice_data;
slice->evas_obj = evas_object_image_filled_add(evas);
evas_object_layer_set(slice->evas_obj,
- evas_object_layer_get(body->evas_obj));
- evas_object_image_source_set(slice->evas_obj, body->evas_obj);
+ evas_object_layer_get(obj));
+ evas_object_image_source_set(slice->evas_obj, obj);
evas_object_image_source_events_set(slice->evas_obj, EINA_TRUE);
evas_object_resize(slice->evas_obj, w, h);
evas_object_show(slice->evas_obj);
@@ -2796,7 +2796,8 @@ ephysics_body_evas_object_set(EPhysics_Body *body, Evas_Object *evas_obj, Eina_B
{
evas_object_event_callback_add(body->evas_obj, EVAS_CALLBACK_RESTACK,
_ephysics_body_soft_body_evas_restack_cb, body);
- _ephysics_body_soft_body_slices_init(body, body->default_face->slices);
+ _ephysics_body_soft_body_slices_init(body, body->evas_obj,
+ body->default_face->slices);
}
if (!use_obj_pos)