summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_program.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/edje/edje_program.c')
-rw-r--r--src/lib/edje/edje_program.c103
1 files changed, 65 insertions, 38 deletions
diff --git a/src/lib/edje/edje_program.c b/src/lib/edje/edje_program.c
index 99ac484..3aa1a76 100644
--- a/src/lib/edje/edje_program.c
+++ b/src/lib/edje/edje_program.c
@@ -1074,79 +1074,106 @@ low_mem_current:
1074 1074
1075#ifdef HAVE_EPHYSICS 1075#ifdef HAVE_EPHYSICS
1076 case EDJE_ACTION_TYPE_PHYSICS_IMPULSE: 1076 case EDJE_ACTION_TYPE_PHYSICS_IMPULSE:
1077 if (!_edje_physics_action_set(ed, pr, ephysics_body_central_impulse_apply)) 1077 if (EPH_LOAD())
1078 goto break_prog; 1078 {
1079 if (!_edje_physics_action_set(ed, pr, EPH_CALL(ephysics_body_central_impulse_apply)))
1080 goto break_prog;
1081 }
1079 break; 1082 break;
1080 1083
1081 case EDJE_ACTION_TYPE_PHYSICS_TORQUE_IMPULSE: 1084 case EDJE_ACTION_TYPE_PHYSICS_TORQUE_IMPULSE:
1082 if (!_edje_physics_action_set(ed, pr, ephysics_body_torque_impulse_apply)) 1085 if (EPH_LOAD())
1083 goto break_prog; 1086 {
1087 if (!_edje_physics_action_set(ed, pr, EPH_CALL(ephysics_body_torque_impulse_apply)))
1088 goto break_prog;
1089 }
1084 break; 1090 break;
1085 1091
1086 case EDJE_ACTION_TYPE_PHYSICS_FORCE: 1092 case EDJE_ACTION_TYPE_PHYSICS_FORCE:
1087 if (!_edje_physics_action_set(ed, pr, ephysics_body_central_force_apply)) 1093 if (EPH_LOAD())
1088 goto break_prog; 1094 {
1095 if (!_edje_physics_action_set(ed, pr, EPH_CALL(ephysics_body_central_force_apply)))
1096 goto break_prog;
1097 }
1089 break; 1098 break;
1090 1099
1091 case EDJE_ACTION_TYPE_PHYSICS_TORQUE: 1100 case EDJE_ACTION_TYPE_PHYSICS_TORQUE:
1092 if (!_edje_physics_action_set(ed, pr, ephysics_body_torque_apply)) 1101 if (EPH_LOAD())
1093 goto break_prog; 1102 {
1103 if (!_edje_physics_action_set(ed, pr, EPH_CALL(ephysics_body_torque_apply)))
1104 goto break_prog;
1105 }
1094 break; 1106 break;
1095 1107
1096 case EDJE_ACTION_TYPE_PHYSICS_FORCES_CLEAR: 1108 case EDJE_ACTION_TYPE_PHYSICS_FORCES_CLEAR:
1097 if (_edje_block_break(ed)) 1109 if (EPH_LOAD())
1098 goto break_prog;
1099 EINA_LIST_FOREACH(pr->targets, l, pt)
1100 { 1110 {
1101 if (pt->id >= 0) 1111 if (_edje_block_break(ed))
1112 goto break_prog;
1113 EINA_LIST_FOREACH(pr->targets, l, pt)
1102 { 1114 {
1103 rp = ed->table_parts[pt->id % ed->table_parts_size]; 1115 if (pt->id >= 0)
1104 if ((rp) && (rp->body)) 1116 {
1105 ephysics_body_forces_clear(rp->body); 1117 rp = ed->table_parts[pt->id % ed->table_parts_size];
1118 if ((rp) && (rp->body))
1119 EPH_CALL(ephysics_body_forces_clear)(rp->body);
1120 }
1106 } 1121 }
1107 } 1122 }
1108 break; 1123 break;
1109 1124
1110 case EDJE_ACTION_TYPE_PHYSICS_VEL_SET: 1125 case EDJE_ACTION_TYPE_PHYSICS_VEL_SET:
1111 if (!_edje_physics_action_set(ed, pr, ephysics_body_linear_velocity_set)) 1126 if (EPH_LOAD())
1112 goto break_prog; 1127 {
1128 if (!_edje_physics_action_set(ed, pr, EPH_CALL(ephysics_body_linear_velocity_set)))
1129 goto break_prog;
1130 }
1113 break; 1131 break;
1114 1132
1115 case EDJE_ACTION_TYPE_PHYSICS_ANG_VEL_SET: 1133 case EDJE_ACTION_TYPE_PHYSICS_ANG_VEL_SET:
1116 if (!_edje_physics_action_set(ed, pr, ephysics_body_angular_velocity_set)) 1134 if (EPH_LOAD())
1117 goto break_prog; 1135 {
1136 if (!_edje_physics_action_set(ed, pr, EPH_CALL(ephysics_body_angular_velocity_set)))
1137 goto break_prog;
1138 }
1118 break; 1139 break;
1119 1140
1120 case EDJE_ACTION_TYPE_PHYSICS_STOP: 1141 case EDJE_ACTION_TYPE_PHYSICS_STOP:
1121 if (_edje_block_break(ed)) 1142 if (EPH_LOAD())
1122 goto break_prog;
1123 EINA_LIST_FOREACH(pr->targets, l, pt)
1124 { 1143 {
1125 if (pt->id >= 0) 1144 if (_edje_block_break(ed))
1145 goto break_prog;
1146 EINA_LIST_FOREACH(pr->targets, l, pt)
1126 { 1147 {
1127 rp = ed->table_parts[pt->id % ed->table_parts_size]; 1148 if (pt->id >= 0)
1128 if ((rp) && (rp->body)) 1149 {
1129 ephysics_body_stop(rp->body); 1150 rp = ed->table_parts[pt->id % ed->table_parts_size];
1151 if ((rp) && (rp->body))
1152 EPH_CALL(ephysics_body_stop)(rp->body);
1153 }
1130 } 1154 }
1131 } 1155 }
1132 break; 1156 break;
1133 1157
1134 case EDJE_ACTION_TYPE_PHYSICS_ROT_SET: 1158 case EDJE_ACTION_TYPE_PHYSICS_ROT_SET:
1135 if (_edje_block_break(ed)) 1159 if (EPH_LOAD())
1136 goto break_prog;
1137 EINA_LIST_FOREACH(pr->targets, l, pt)
1138 { 1160 {
1139 if (pt->id >= 0) 1161 if (_edje_block_break(ed))
1162 goto break_prog;
1163 EINA_LIST_FOREACH(pr->targets, l, pt)
1140 { 1164 {
1141 rp = ed->table_parts[pt->id % ed->table_parts_size]; 1165 if (pt->id >= 0)
1142 if ((rp) && (rp->body))
1143 { 1166 {
1144 EPhysics_Quaternion quat; 1167 rp = ed->table_parts[pt->id % ed->table_parts_size];
1145 ephysics_quaternion_set(&quat, pr->physics.x, 1168 if ((rp) && (rp->body))
1146 pr->physics.y, pr->physics.z, 1169 {
1147 pr->physics.w); 1170 EPhysics_Quaternion quat;
1148 ephysics_quaternion_normalize(&quat); 1171 EPH_CALL(ephysics_quaternion_set)(&quat, pr->physics.x,
1149 ephysics_body_rotation_set(rp->body, &quat); 1172 pr->physics.y, pr->physics.z,
1173 pr->physics.w);
1174 EPH_CALL(ephysics_quaternion_normalize)(&quat);
1175 EPH_CALL(ephysics_body_rotation_set)(rp->body, &quat);
1176 }
1150 } 1177 }
1151 } 1178 }
1152 } 1179 }