diff --git a/legacy/ephysics/src/bin/ephysics_sandbox.c b/legacy/ephysics/src/bin/ephysics_sandbox.c index 935af2e586..edea23d1a1 100644 --- a/legacy/ephysics/src/bin/ephysics_sandbox.c +++ b/legacy/ephysics/src/bin/ephysics_sandbox.c @@ -846,12 +846,11 @@ _sandie_world_add(Evas_Object *win) world = ephysics_world_new(); ephysics_world_render_geometry_set(world, 80, 80, (int) WIDTH * 0.7 - 160, HEIGHT - 160); - evas_object_data_set(win, "top", ephysics_body_top_boundary_add(world, 10)); + evas_object_data_set(win, "top", ephysics_body_top_boundary_add(world)); evas_object_data_set(win, "bottom", - ephysics_body_bottom_boundary_add(world, 10)); - evas_object_data_set(win, "left", ephysics_body_left_boundary_add(world, 10)); - evas_object_data_set(win, "right", ephysics_body_right_boundary_add(world, - 10)); + ephysics_body_bottom_boundary_add(world)); + evas_object_data_set(win, "left", ephysics_body_left_boundary_add(world)); + evas_object_data_set(win, "right", ephysics_body_right_boundary_add(world)); return world; } diff --git a/legacy/ephysics/src/bin/test_bouncing_3d.c b/legacy/ephysics/src/bin/test_bouncing_3d.c index decc62e6aa..4eeb773867 100644 --- a/legacy/ephysics/src/bin/test_bouncing_3d.c +++ b/legacy/ephysics/src/bin/test_bouncing_3d.c @@ -125,19 +125,19 @@ test_bouncing_3d(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.65); ephysics_body_friction_set(boundary, 4); - boundary = ephysics_body_right_boundary_add(test_data->world, 10); + boundary = ephysics_body_right_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.4); ephysics_body_friction_set(boundary, 3); - boundary = ephysics_body_left_boundary_add(test_data->world, 10); + boundary = ephysics_body_left_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.4); ephysics_body_friction_set(boundary, 3); - ephysics_body_top_boundary_add(test_data->world, 10); + ephysics_body_top_boundary_add(test_data->world); _world_populate(test_data); elm_object_event_callback_add(test_data->win, _on_keydown, test_data->data); diff --git a/legacy/ephysics/src/bin/test_bouncing_ball.c b/legacy/ephysics/src/bin/test_bouncing_ball.c index aa56f8e1b6..7ba51b0680 100644 --- a/legacy/ephysics/src/bin/test_bouncing_ball.c +++ b/legacy/ephysics/src/bin/test_bouncing_ball.c @@ -91,19 +91,19 @@ test_bouncing_ball(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *eve ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.65); ephysics_body_friction_set(boundary, 4); - boundary = ephysics_body_right_boundary_add(test_data->world, 10); + boundary = ephysics_body_right_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.4); ephysics_body_friction_set(boundary, 3); - boundary = ephysics_body_left_boundary_add(test_data->world, 10); + boundary = ephysics_body_left_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.4); ephysics_body_friction_set(boundary, 3); - ephysics_body_top_boundary_add(test_data->world, 10); + ephysics_body_top_boundary_add(test_data->world); _world_populate(test_data); elm_object_event_callback_add(test_data->win, _on_keydown, test_data->data); diff --git a/legacy/ephysics/src/bin/test_bouncing_text.c b/legacy/ephysics/src/bin/test_bouncing_text.c index 166d118907..6170c8834d 100644 --- a/legacy/ephysics/src/bin/test_bouncing_text.c +++ b/legacy/ephysics/src/bin/test_bouncing_text.c @@ -58,7 +58,7 @@ test_bouncing_text(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *eve ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.65); ephysics_body_friction_set(boundary, 2); diff --git a/legacy/ephysics/src/bin/test_colliding_balls.c b/legacy/ephysics/src/bin/test_colliding_balls.c index e27e4c21e3..44b4723b74 100644 --- a/legacy/ephysics/src/bin/test_colliding_balls.c +++ b/legacy/ephysics/src/bin/test_colliding_balls.c @@ -77,13 +77,13 @@ test_colliding_balls(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *e ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.65); ephysics_body_friction_set(boundary, 2); - ephysics_body_top_boundary_add(test_data->world, 10); - ephysics_body_left_boundary_add(test_data->world, 10); - ephysics_body_right_boundary_add(test_data->world, 10); + ephysics_body_top_boundary_add(test_data->world); + ephysics_body_left_boundary_add(test_data->world); + ephysics_body_right_boundary_add(test_data->world); _world_populate(test_data); } diff --git a/legacy/ephysics/src/bin/test_collision_detection.c b/legacy/ephysics/src/bin/test_collision_detection.c index 7b7122e875..b5a4359640 100644 --- a/legacy/ephysics/src/bin/test_collision_detection.c +++ b/legacy/ephysics/src/bin/test_collision_detection.c @@ -168,15 +168,15 @@ test_collision(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); collision_data->base.world = world; - boundary = ephysics_body_bottom_boundary_add(collision_data->base.world, 10); + boundary = ephysics_body_bottom_boundary_add(collision_data->base.world); ephysics_body_restitution_set(boundary, 0); ephysics_body_friction_set(boundary, 20); - boundary = ephysics_body_right_boundary_add(collision_data->base.world, 10); + boundary = ephysics_body_right_boundary_add(collision_data->base.world); ephysics_body_restitution_set(boundary, 0.8); - ephysics_body_left_boundary_add(collision_data->base.world, 10); - ephysics_body_top_boundary_add(collision_data->base.world, 10); + ephysics_body_left_boundary_add(collision_data->base.world); + ephysics_body_top_boundary_add(collision_data->base.world); _world_populate(collision_data); diff --git a/legacy/ephysics/src/bin/test_collision_filter.c b/legacy/ephysics/src/bin/test_collision_filter.c index 5b5302ca88..4759b6103f 100644 --- a/legacy/ephysics/src/bin/test_collision_filter.c +++ b/legacy/ephysics/src/bin/test_collision_filter.c @@ -70,7 +70,7 @@ test_collision_filter(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void * ephysics_world_render_geometry_set(world, 60, 40, WIDTH - 120, FLOOR_Y - 32); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 30); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.65); ephysics_body_friction_set(boundary, 2); @@ -82,9 +82,9 @@ test_collision_filter(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void * ephysics_body_mass_set(boundary, 0); ephysics_body_collision_group_add(boundary, "blue-ball"); - ephysics_body_top_boundary_add(test_data->world, 30); - ephysics_body_left_boundary_add(test_data->world, 30); - ephysics_body_right_boundary_add(test_data->world, 30); + ephysics_body_top_boundary_add(test_data->world); + ephysics_body_left_boundary_add(test_data->world); + ephysics_body_right_boundary_add(test_data->world); _world_populate(test_data); } diff --git a/legacy/ephysics/src/bin/test_collision_speed.c b/legacy/ephysics/src/bin/test_collision_speed.c index a788cf5d5b..6c4ce25a4b 100644 --- a/legacy/ephysics/src/bin/test_collision_speed.c +++ b/legacy/ephysics/src/bin/test_collision_speed.c @@ -130,19 +130,19 @@ test_collision_speed(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *e ephysics_world_simulation_set(world, 1/260.f, 5); speed_data->base.world = world; - boundary = ephysics_body_bottom_boundary_add(world, 10); + boundary = ephysics_body_bottom_boundary_add(world); ephysics_body_restitution_set(boundary, 0.65); ephysics_body_friction_set(boundary, 4); - boundary = ephysics_body_right_boundary_add(world, 10); + boundary = ephysics_body_right_boundary_add(world); ephysics_body_restitution_set(boundary, 0.4); ephysics_body_friction_set(boundary, 3); - boundary = ephysics_body_left_boundary_add(world, 10); + boundary = ephysics_body_left_boundary_add(world); ephysics_body_restitution_set(boundary, 0.4); ephysics_body_friction_set(boundary, 3); - ephysics_body_top_boundary_add(world, 10); + ephysics_body_top_boundary_add(world); _world_populate(speed_data); } diff --git a/legacy/ephysics/src/bin/test_constraint.c b/legacy/ephysics/src/bin/test_constraint.c index c484111bbf..946d4943ac 100644 --- a/legacy/ephysics/src/bin/test_constraint.c +++ b/legacy/ephysics/src/bin/test_constraint.c @@ -96,7 +96,7 @@ test_constraint(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_ ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.65); ephysics_body_friction_set(boundary, 3); diff --git a/legacy/ephysics/src/bin/test_delete.c b/legacy/ephysics/src/bin/test_delete.c index dadd8f65ac..781910bb32 100644 --- a/legacy/ephysics/src/bin/test_delete.c +++ b/legacy/ephysics/src/bin/test_delete.c @@ -176,12 +176,12 @@ test_delete(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); collision_data->base.world = world; - boundary = ephysics_body_bottom_boundary_add(collision_data->base.world, 10); + boundary = ephysics_body_bottom_boundary_add(collision_data->base.world); ephysics_body_restitution_set(boundary, 0); ephysics_body_friction_set(boundary, 20); - ephysics_body_left_boundary_add(collision_data->base.world, 10); - ephysics_body_right_boundary_add(collision_data->base.world, 10); + ephysics_body_left_boundary_add(collision_data->base.world); + ephysics_body_right_boundary_add(collision_data->base.world); _world_populate(collision_data); diff --git a/legacy/ephysics/src/bin/test_falling_letters.c b/legacy/ephysics/src/bin/test_falling_letters.c index e45107d2ea..3fb8c3da89 100644 --- a/legacy/ephysics/src/bin/test_falling_letters.c +++ b/legacy/ephysics/src/bin/test_falling_letters.c @@ -67,7 +67,7 @@ test_falling_letters(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *e ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.3); _world_populate(test_data); diff --git a/legacy/ephysics/src/bin/test_flag.c b/legacy/ephysics/src/bin/test_flag.c index a6cca69ffe..85fd728086 100644 --- a/legacy/ephysics/src/bin/test_flag.c +++ b/legacy/ephysics/src/bin/test_flag.c @@ -77,18 +77,18 @@ test_flag(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info _ ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.65); ephysics_body_friction_set(boundary, 4); - boundary = ephysics_body_right_boundary_add(test_data->world, 10); + boundary = ephysics_body_right_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.4); ephysics_body_friction_set(boundary, 3); - boundary = ephysics_body_left_boundary_add(test_data->world, 10); + boundary = ephysics_body_left_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.4); ephysics_body_friction_set(boundary, 3); - ephysics_body_top_boundary_add(test_data->world, 10); + ephysics_body_top_boundary_add(test_data->world); _world_populate(test_data); } diff --git a/legacy/ephysics/src/bin/test_forces.c b/legacy/ephysics/src/bin/test_forces.c index 87dd10e241..d5628c1a82 100644 --- a/legacy/ephysics/src/bin/test_forces.c +++ b/legacy/ephysics/src/bin/test_forces.c @@ -91,19 +91,19 @@ test_forces(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 1); ephysics_body_friction_set(boundary, 0); - boundary = ephysics_body_top_boundary_add(test_data->world, 10); + boundary = ephysics_body_top_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 1); ephysics_body_friction_set(boundary, 0); - boundary = ephysics_body_left_boundary_add(test_data->world, 10); + boundary = ephysics_body_left_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 1); ephysics_body_friction_set(boundary, 0); - boundary = ephysics_body_right_boundary_add(test_data->world, 10); + boundary = ephysics_body_right_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 1); ephysics_body_friction_set(boundary, 0); diff --git a/legacy/ephysics/src/bin/test_grab.c b/legacy/ephysics/src/bin/test_grab.c index 8968179573..8da3da3cd1 100644 --- a/legacy/ephysics/src/bin/test_grab.c +++ b/legacy/ephysics/src/bin/test_grab.c @@ -156,19 +156,19 @@ test_grab(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info _ ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.65); ephysics_body_friction_set(boundary, 4); - boundary = ephysics_body_right_boundary_add(test_data->world, 10); + boundary = ephysics_body_right_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.4); ephysics_body_friction_set(boundary, 3); - boundary = ephysics_body_left_boundary_add(test_data->world, 10); + boundary = ephysics_body_left_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.4); ephysics_body_friction_set(boundary, 3); - ephysics_body_top_boundary_add(test_data->world, 10); + ephysics_body_top_boundary_add(test_data->world); _world_populate(test_data); } diff --git a/legacy/ephysics/src/bin/test_growing_balls.c b/legacy/ephysics/src/bin/test_growing_balls.c index 9c54a35611..cc246ad605 100644 --- a/legacy/ephysics/src/bin/test_growing_balls.c +++ b/legacy/ephysics/src/bin/test_growing_balls.c @@ -107,14 +107,14 @@ test_growing_balls(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *eve ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.8); - boundary = ephysics_body_top_boundary_add(test_data->world, 10); + boundary = ephysics_body_top_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.8); - boundary = ephysics_body_left_boundary_add(test_data->world, 10); + boundary = ephysics_body_left_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.8); - boundary = ephysics_body_right_boundary_add(test_data->world, 10); + boundary = ephysics_body_right_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.8); _world_populate(test_data); diff --git a/legacy/ephysics/src/bin/test_heavy.c b/legacy/ephysics/src/bin/test_heavy.c index 6622929448..ad90b9fd1f 100644 --- a/legacy/ephysics/src/bin/test_heavy.c +++ b/legacy/ephysics/src/bin/test_heavy.c @@ -62,12 +62,12 @@ test_heavy(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 1); - ephysics_body_top_boundary_add(test_data->world, 10); - ephysics_body_left_boundary_add(test_data->world, 10); - ephysics_body_right_boundary_add(test_data->world, 10); + ephysics_body_top_boundary_add(test_data->world); + ephysics_body_left_boundary_add(test_data->world); + ephysics_body_right_boundary_add(test_data->world); _world_populate(test_data); } diff --git a/legacy/ephysics/src/bin/test_jumping_balls.c b/legacy/ephysics/src/bin/test_jumping_balls.c index 7236d90a38..0bd15f7495 100644 --- a/legacy/ephysics/src/bin/test_jumping_balls.c +++ b/legacy/ephysics/src/bin/test_jumping_balls.c @@ -130,13 +130,13 @@ test_jumping_balls(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *eve ephysics_world_event_callback_add(world, EPHYSICS_CALLBACK_WORLD_STOPPED, _world_stopped_cb, bt); - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.65); ephysics_body_friction_set(boundary, 2); - ephysics_body_top_boundary_add(test_data->world, 10); - ephysics_body_left_boundary_add(test_data->world, 10); - ephysics_body_right_boundary_add(test_data->world, 10); + ephysics_body_top_boundary_add(test_data->world); + ephysics_body_left_boundary_add(test_data->world); + ephysics_body_right_boundary_add(test_data->world); _world_populate(test_data); } diff --git a/legacy/ephysics/src/bin/test_light.c b/legacy/ephysics/src/bin/test_light.c index b0a829a9a1..655adbd0e3 100644 --- a/legacy/ephysics/src/bin/test_light.c +++ b/legacy/ephysics/src/bin/test_light.c @@ -70,7 +70,7 @@ test_light(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.65); ephysics_body_friction_set(boundary, 4); diff --git a/legacy/ephysics/src/bin/test_material.c b/legacy/ephysics/src/bin/test_material.c index ae96d62446..7b2c3fc295 100644 --- a/legacy/ephysics/src/bin/test_material.c +++ b/legacy/ephysics/src/bin/test_material.c @@ -114,7 +114,7 @@ test_material(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 1); _world_populate(test_data); diff --git a/legacy/ephysics/src/bin/test_no_gravity.c b/legacy/ephysics/src/bin/test_no_gravity.c index 365edd55d5..b659ea0963 100644 --- a/legacy/ephysics/src/bin/test_no_gravity.c +++ b/legacy/ephysics/src/bin/test_no_gravity.c @@ -111,19 +111,19 @@ test_no_gravity(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_ ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 1); ephysics_body_friction_set(boundary, 0); - boundary = ephysics_body_top_boundary_add(test_data->world, 10); + boundary = ephysics_body_top_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 1); ephysics_body_friction_set(boundary, 0); - boundary = ephysics_body_left_boundary_add(test_data->world, 10); + boundary = ephysics_body_left_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 1); ephysics_body_friction_set(boundary, 0); - boundary = ephysics_body_right_boundary_add(test_data->world, 10); + boundary = ephysics_body_right_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 1); ephysics_body_friction_set(boundary, 0); diff --git a/legacy/ephysics/src/bin/test_rotate.c b/legacy/ephysics/src/bin/test_rotate.c index 310deb46fb..53f6436ab9 100644 --- a/legacy/ephysics/src/bin/test_rotate.c +++ b/legacy/ephysics/src/bin/test_rotate.c @@ -90,7 +90,7 @@ test_rotate(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.65); ephysics_body_friction_set(boundary, 3); diff --git a/legacy/ephysics/src/bin/test_shapes.c b/legacy/ephysics/src/bin/test_shapes.c index 453f53d044..5af0fa549c 100644 --- a/legacy/ephysics/src/bin/test_shapes.c +++ b/legacy/ephysics/src/bin/test_shapes.c @@ -98,12 +98,12 @@ test_shapes(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.65); - ephysics_body_top_boundary_add(test_data->world, 10); - ephysics_body_left_boundary_add(test_data->world, 10); - ephysics_body_right_boundary_add(test_data->world, 10); + ephysics_body_top_boundary_add(test_data->world); + ephysics_body_left_boundary_add(test_data->world); + ephysics_body_right_boundary_add(test_data->world); _world_populate(test_data); } diff --git a/legacy/ephysics/src/bin/test_sleeping_threshold.c b/legacy/ephysics/src/bin/test_sleeping_threshold.c index 5526632a32..c78d642cee 100644 --- a/legacy/ephysics/src/bin/test_sleeping_threshold.c +++ b/legacy/ephysics/src/bin/test_sleeping_threshold.c @@ -104,15 +104,15 @@ test_sleeping(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in test_data->world = world; ephysics_world_max_sleeping_time_set(world, 0.3); - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0); ephysics_body_friction_set(boundary, 20); - boundary = ephysics_body_right_boundary_add(test_data->world, 10); + boundary = ephysics_body_right_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.8); - ephysics_body_left_boundary_add(test_data->world, 10); - ephysics_body_top_boundary_add(test_data->world, 10); + ephysics_body_left_boundary_add(test_data->world); + ephysics_body_top_boundary_add(test_data->world); _world_populate(test_data); } diff --git a/legacy/ephysics/src/bin/test_slider.c b/legacy/ephysics/src/bin/test_slider.c index b90222553a..3dea4a0bf0 100644 --- a/legacy/ephysics/src/bin/test_slider.c +++ b/legacy/ephysics/src/bin/test_slider.c @@ -160,11 +160,11 @@ test_slider(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.65); ephysics_body_friction_set(boundary, 3); - ephysics_body_left_boundary_add(test_data->world, 10); + ephysics_body_left_boundary_add(test_data->world); _world_populate(test_data); } diff --git a/legacy/ephysics/src/bin/test_soft_body.c b/legacy/ephysics/src/bin/test_soft_body.c index e3d50b9cf1..83798255bf 100644 --- a/legacy/ephysics/src/bin/test_soft_body.c +++ b/legacy/ephysics/src/bin/test_soft_body.c @@ -146,19 +146,19 @@ test_soft_body(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.65); ephysics_body_friction_set(boundary, 4); - boundary = ephysics_body_right_boundary_add(test_data->world, 10); + boundary = ephysics_body_right_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.4); ephysics_body_friction_set(boundary, 3); - boundary = ephysics_body_left_boundary_add(test_data->world, 10); + boundary = ephysics_body_left_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 0.4); ephysics_body_friction_set(boundary, 3); - ephysics_body_top_boundary_add(test_data->world, 10); + ephysics_body_top_boundary_add(test_data->world); _world_populate(test_data); } diff --git a/legacy/ephysics/src/bin/test_velocity.c b/legacy/ephysics/src/bin/test_velocity.c index de6d9d34d4..e2149d7834 100644 --- a/legacy/ephysics/src/bin/test_velocity.c +++ b/legacy/ephysics/src/bin/test_velocity.c @@ -184,19 +184,19 @@ test_velocity(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); velocity_data->base.world = world; - boundary = ephysics_body_bottom_boundary_add(velocity_data->base.world, 10); + boundary = ephysics_body_bottom_boundary_add(velocity_data->base.world); ephysics_body_restitution_set(boundary, 0.65); ephysics_body_friction_set(boundary, 4); - boundary = ephysics_body_right_boundary_add(velocity_data->base.world, 10); + boundary = ephysics_body_right_boundary_add(velocity_data->base.world); ephysics_body_restitution_set(boundary, 0.4); ephysics_body_friction_set(boundary, 3); - boundary = ephysics_body_left_boundary_add(velocity_data->base.world, 10); + boundary = ephysics_body_left_boundary_add(velocity_data->base.world); ephysics_body_restitution_set(boundary, 0.4); ephysics_body_friction_set(boundary, 3); - ephysics_body_top_boundary_add(velocity_data->base.world, 10); + ephysics_body_top_boundary_add(velocity_data->base.world); _world_populate(velocity_data); elm_object_event_callback_add(velocity_data->base.win, _on_keydown, diff --git a/legacy/ephysics/src/bin/test_win_resize.c b/legacy/ephysics/src/bin/test_win_resize.c index 1ed5528353..a1462f4558 100644 --- a/legacy/ephysics/src/bin/test_win_resize.c +++ b/legacy/ephysics/src/bin/test_win_resize.c @@ -182,16 +182,16 @@ test_win_resize(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_ ephysics_world_render_geometry_set(world, 50, 40, WIDTH - 100, FLOOR_Y - 40); test_data->world = world; - boundary = ephysics_body_bottom_boundary_add(test_data->world, 10); + boundary = ephysics_body_bottom_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 1.0); - boundary = ephysics_body_right_boundary_add(test_data->world, 10); + boundary = ephysics_body_right_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 1.0); - boundary = ephysics_body_left_boundary_add(test_data->world, 10); + boundary = ephysics_body_left_boundary_add(test_data->world); ephysics_body_restitution_set(boundary, 1.0); - ephysics_body_top_boundary_add(test_data->world, 10); + ephysics_body_top_boundary_add(test_data->world); _world_populate(test_data); } diff --git a/legacy/ephysics/src/lib/EPhysics.h b/legacy/ephysics/src/lib/EPhysics.h index cc0de9056e..efc7fe2925 100644 --- a/legacy/ephysics/src/lib/EPhysics.h +++ b/legacy/ephysics/src/lib/EPhysics.h @@ -1908,13 +1908,12 @@ EAPI EPhysics_Body *ephysics_body_shape_add(EPhysics_World *world, EPhysics_Shap * @ref ephysics_world_render_geometry_set(). * * @param world The world this body will belong to. - * @param d The boundary depth, in pixels. * @return a new body or @c NULL, on erros. * @see ephysics_world_render_geometry_set() * * @ingroup EPhysics_Body */ -EAPI EPhysics_Body *ephysics_body_top_boundary_add(EPhysics_World *world, Evas_Coord d); +EAPI EPhysics_Body *ephysics_body_top_boundary_add(EPhysics_World *world); /** * @brief @@ -1925,13 +1924,12 @@ EAPI EPhysics_Body *ephysics_body_top_boundary_add(EPhysics_World *world, Evas_C * @ref ephysics_world_render_geometry_set(). * * @param world The world this body will belong to. - * @param d The boundary depth, in pixels. * @return a new body or @c NULL, on erros. * @see ephysics_world_render_geometry_set() * * @ingroup EPhysics_Body */ -EAPI EPhysics_Body *ephysics_body_bottom_boundary_add(EPhysics_World *world, Evas_Coord d); +EAPI EPhysics_Body *ephysics_body_bottom_boundary_add(EPhysics_World *world); /** * @brief @@ -1942,13 +1940,12 @@ EAPI EPhysics_Body *ephysics_body_bottom_boundary_add(EPhysics_World *world, Eva * @ref ephysics_world_render_geometry_set(). * * @param world The world this body will belong to. - * @param d The boundary depth, in pixels. * @return a new body or @c NULL, on erros. * @see ephysics_world_render_geometry_set() * * @ingroup EPhysics_Body */ -EAPI EPhysics_Body *ephysics_body_left_boundary_add(EPhysics_World *world, Evas_Coord d); +EAPI EPhysics_Body *ephysics_body_left_boundary_add(EPhysics_World *world); /** * @brief @@ -1959,13 +1956,12 @@ EAPI EPhysics_Body *ephysics_body_left_boundary_add(EPhysics_World *world, Evas_ * @ref ephysics_world_render_geometry_set(). * * @param world The world this body will belong to. - * @param d The boundary depth, in pixels. * @return a new body or @c NULL, on erros. * @see ephysics_world_render_geometry_set() * * @ingroup EPhysics_Body */ -EAPI EPhysics_Body *ephysics_body_right_boundary_add(EPhysics_World *world, Evas_Coord d); +EAPI EPhysics_Body *ephysics_body_right_boundary_add(EPhysics_World *world); /** * @brief diff --git a/legacy/ephysics/src/lib/ephysics_body.cpp b/legacy/ephysics/src/lib/ephysics_body.cpp index 28e7d76993..258d88c473 100644 --- a/legacy/ephysics/src/lib/ephysics_body.cpp +++ b/legacy/ephysics/src/lib/ephysics_body.cpp @@ -1784,7 +1784,7 @@ ephysics_body_world_boundaries_resize(EPhysics_World *world) } static EPhysics_Body * -_ephysics_body_boundary_add(EPhysics_World *world, EPhysics_World_Boundary boundary, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Coord d) +_ephysics_body_boundary_add(EPhysics_World *world, EPhysics_World_Boundary boundary, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) { EPhysics_Body *body; @@ -1804,56 +1804,56 @@ _ephysics_body_boundary_add(EPhysics_World *world, EPhysics_World_Boundary bound ephysics_body_mass_set(body, 0); ephysics_world_boundary_set(world, boundary, body); - ephysics_body_geometry_set(body, x, y, -20, w, h, - d * ephysics_world_rate_get(body->world)); + ephysics_body_geometry_set(body, x, y, -5, w, h, 10); + return body; } EAPI EPhysics_Body * -ephysics_body_top_boundary_add(EPhysics_World *world, Evas_Coord d) +ephysics_body_top_boundary_add(EPhysics_World *world) { EPhysics_Body *body; Evas_Coord x, y, w; ephysics_world_render_geometry_get(world, &x, &y, &w, NULL); body = _ephysics_body_boundary_add(world, EPHYSICS_WORLD_BOUNDARY_TOP, - 0, y - 10, x + w, 10, d); + 0, y - 10, x + w, 10); return body; } EAPI EPhysics_Body * -ephysics_body_bottom_boundary_add(EPhysics_World *world, Evas_Coord d) +ephysics_body_bottom_boundary_add(EPhysics_World *world) { Evas_Coord x, y, w, h; EPhysics_Body *body; ephysics_world_render_geometry_get(world, &x, &y, &w, &h); body = _ephysics_body_boundary_add(world, EPHYSICS_WORLD_BOUNDARY_BOTTOM, - x, y + h, w, 10, d); + x, y + h, w, 10); return body; } EAPI EPhysics_Body * -ephysics_body_left_boundary_add(EPhysics_World *world, Evas_Coord d) +ephysics_body_left_boundary_add(EPhysics_World *world) { EPhysics_Body *body; Evas_Coord x, y, h; ephysics_world_render_geometry_get(world, &x, &y, NULL, &h); body = _ephysics_body_boundary_add(world, EPHYSICS_WORLD_BOUNDARY_LEFT, - x - 10, 0, 10, y + h, d); + x - 10, 0, 10, y + h); return body; } EAPI EPhysics_Body * -ephysics_body_right_boundary_add(EPhysics_World *world, Evas_Coord d) +ephysics_body_right_boundary_add(EPhysics_World *world) { Evas_Coord x, y, w, h; EPhysics_Body *body; ephysics_world_render_geometry_get(world, &x, &y, &w, &h); body = _ephysics_body_boundary_add(world, EPHYSICS_WORLD_BOUNDARY_RIGHT, - x + w, 0, 10, y + h, d); + x + w, 0, 10, y + h); return body; }