2 Commits

Author SHA1 Message Date
viktorljung d91ad72a34 Jump fix 2015-10-23 16:11:45 +02:00
viktorljung a4c120764a Ball rotation fix 2015-10-23 16:01:22 +02:00
16 changed files with 89 additions and 173 deletions
+17 -17
View File
@@ -5,8 +5,8 @@
<author>Blender User</author> <author>Blender User</author>
<authoring_tool>Blender 2.75.0 commit date:2015-07-07, commit time:14:56, hash:c27589e</authoring_tool> <authoring_tool>Blender 2.75.0 commit date:2015-07-07, commit time:14:56, hash:c27589e</authoring_tool>
</contributor> </contributor>
<created>2015-10-23T14:55:47</created> <created>2015-10-23T16:10:27</created>
<modified>2015-10-23T14:55:47</modified> <modified>2015-10-23T16:10:27</modified>
<unit name="meter" meter="1"/> <unit name="meter" meter="1"/>
<up_axis>Z_UP</up_axis> <up_axis>Z_UP</up_axis>
</asset> </asset>
@@ -157,7 +157,7 @@
</technique_common> </technique_common>
</source> </source>
<source id="Armature_002_Head_pose_matrix-output"> <source id="Armature_002_Head_pose_matrix-output">
<float_array id="Armature_002_Head_pose_matrix-output-array" count="32">2.8213e-7 0 -1 0 0 -0.8 0 -0.305899 -1 0 -2.8213e-7 0 0 0 0 1 2.8213e-7 0 -1 0 0 -0.9999999 0 -0.305899 -1 0 -2.8213e-7 0 0 0 0 1</float_array> <float_array id="Armature_002_Head_pose_matrix-output-array" count="32">2.8213e-7 0 -1 0 0 -0.9999999 0 -0.305899 -1 0 -2.8213e-7 0 0 0 0 1 2.8213e-7 0 -1 0 0 -0.6999999 0 -0.305899 -1 0 -2.8213e-7 0 0 0 0 1</float_array>
<technique_common> <technique_common>
<accessor source="#Armature_002_Head_pose_matrix-output-array" count="2" stride="16"> <accessor source="#Armature_002_Head_pose_matrix-output-array" count="2" stride="16">
<param name="TRANSFORM" type="float4x4"/> <param name="TRANSFORM" type="float4x4"/>
@@ -189,7 +189,7 @@
</technique_common> </technique_common>
</source> </source>
<source id="Armature_002_Ear_L_pose_matrix-output"> <source id="Armature_002_Ear_L_pose_matrix-output">
<float_array id="Armature_002_Ear_L_pose_matrix-output-array" count="32">-4.53842e-7 0.6170548 0.7869204 0.1847505 1.46037e-7 -0.7869205 0.6170546 1.127367 1 8.9407e-8 2.73509e-7 -0.002287612 0 0 0 1 -4.39136e-7 0.5461221 0.8377058 0.1847505 1.58507e-7 -0.8377059 0.5461219 1.127367 1 6.76434e-8 2.61131e-7 -0.002287612 0 0 0 1</float_array> <float_array id="Armature_002_Ear_L_pose_matrix-output-array" count="32">-4.53842e-7 0.6170548 0.7869204 0.1847505 1.46037e-7 -0.7869204 0.6170546 1.127367 1 8.9407e-8 2.73509e-7 -0.002287612 0 0 0 1 -4.39136e-7 0.5461221 0.8377058 0.1847505 1.58507e-7 -0.8377059 0.5461219 1.127367 1 6.76434e-8 2.61131e-7 -0.002287612 0 0 0 1</float_array>
<technique_common> <technique_common>
<accessor source="#Armature_002_Ear_L_pose_matrix-output-array" count="2" stride="16"> <accessor source="#Armature_002_Ear_L_pose_matrix-output-array" count="2" stride="16">
<param name="TRANSFORM" type="float4x4"/> <param name="TRANSFORM" type="float4x4"/>
@@ -221,7 +221,7 @@
</technique_common> </technique_common>
</source> </source>
<source id="Armature_002_Ear_H_pose_matrix-output"> <source id="Armature_002_Ear_H_pose_matrix-output">
<float_array id="Armature_002_Ear_H_pose_matrix-output-array" count="32">-6.18379e-7 -0.6170548 -0.7869204 -0.1847505 3.71728e-7 -0.7869205 0.6170546 1.127367 -1 -2.08617e-7 7.33482e-7 -0.0022877 0 0 0 1 -6.46627e-7 -0.5461221 -0.8377058 -0.1847505 3.06338e-7 -0.8377059 0.5461219 1.127367 -1 -2.01547e-7 7.00461e-7 -0.0022877 0 0 0 1</float_array> <float_array id="Armature_002_Ear_H_pose_matrix-output-array" count="32">-6.18379e-7 -0.6170548 -0.7869204 -0.1847505 3.71728e-7 -0.7869204 0.6170546 1.127367 -1 -2.08617e-7 7.33482e-7 -0.0022877 0 0 0 1 -6.46627e-7 -0.5461221 -0.8377058 -0.1847505 3.06338e-7 -0.8377059 0.5461219 1.127367 -1 -2.01547e-7 7.00461e-7 -0.0022877 0 0 0 1</float_array>
<technique_common> <technique_common>
<accessor source="#Armature_002_Ear_H_pose_matrix-output-array" count="2" stride="16"> <accessor source="#Armature_002_Ear_H_pose_matrix-output-array" count="2" stride="16">
<param name="TRANSFORM" type="float4x4"/> <param name="TRANSFORM" type="float4x4"/>
@@ -637,7 +637,7 @@
</technique_common> </technique_common>
</source> </source>
<source id="Armature_002_Arm1_L_pose_matrix-output"> <source id="Armature_002_Arm1_L_pose_matrix-output">
<float_array id="Armature_002_Arm1_L_pose_matrix-output-array" count="32">-4.37114e-8 0 -1 3.93099e-4 -6.29212e-8 0.9999999 7.10543e-15 -0.2065513 1 6.29212e-8 -4.37114e-8 -0.170607 0 0 0 1 -4.93163e-8 0.08715574 -0.9961947 3.93099e-4 -6.54522e-8 0.9961947 0.08715573 -0.2065513 1 6.95013e-8 -4.34241e-8 -0.170607 0 0 0 1</float_array> <float_array id="Armature_002_Arm1_L_pose_matrix-output-array" count="32">-3.13422e-8 6.23634e-9 -1 3.93099e-4 0.08979136 0.9959605 3.39689e-9 -0.2065513 0.9959606 -0.08979137 -3.17755e-8 -0.170607 0 0 0 1 -4.93163e-8 0.08715574 -0.9961947 3.93099e-4 -6.54522e-8 0.9961947 0.08715573 -0.2065513 1 6.95013e-8 -4.34241e-8 -0.170607 0 0 0 1</float_array>
<technique_common> <technique_common>
<accessor source="#Armature_002_Arm1_L_pose_matrix-output-array" count="2" stride="16"> <accessor source="#Armature_002_Arm1_L_pose_matrix-output-array" count="2" stride="16">
<param name="TRANSFORM" type="float4x4"/> <param name="TRANSFORM" type="float4x4"/>
@@ -669,7 +669,7 @@
</technique_common> </technique_common>
</source> </source>
<source id="Armature_002_Arm2_L_pose_matrix-output"> <source id="Armature_002_Arm2_L_pose_matrix-output">
<float_array id="Armature_002_Arm2_L_pose_matrix-output-array" count="32">1 -6.29212e-8 1.19209e-7 0 6.29212e-8 1 0 0.2368225 -1.19209e-7 0 1 3.72529e-9 0 0 0 1 1 -5.99114e-8 1.13846e-7 0 4.97611e-8 0.9961947 0.08715574 0.2368225 -1.18635e-7 -0.08715574 0.9961947 3.72529e-9 0 0 0 1</float_array> <float_array id="Armature_002_Arm2_L_pose_matrix-output-array" count="32">0.9647611 -0.2631273 1.49274e-7 0 0.2631273 0.9647611 4.47035e-8 0.2368225 -1.58325e-7 0 1 3.72529e-9 0 0 0 1 1 -5.99114e-8 1.13846e-7 0 4.97611e-8 0.9961947 0.08715574 0.2368225 -1.18635e-7 -0.08715574 0.9961947 3.72529e-9 0 0 0 1</float_array>
<technique_common> <technique_common>
<accessor source="#Armature_002_Arm2_L_pose_matrix-output-array" count="2" stride="16"> <accessor source="#Armature_002_Arm2_L_pose_matrix-output-array" count="2" stride="16">
<param name="TRANSFORM" type="float4x4"/> <param name="TRANSFORM" type="float4x4"/>
@@ -701,7 +701,7 @@
</technique_common> </technique_common>
</source> </source>
<source id="Armature_002_Arm3_L_pose_matrix-output"> <source id="Armature_002_Arm3_L_pose_matrix-output">
<float_array id="Armature_002_Arm3_L_pose_matrix-output-array" count="32">1 -6.29212e-8 6.29211e-8 1.49012e-8 6.29212e-8 0.9999999 0 0.2368225 -6.29211e-8 -1.49012e-8 0.9999999 -1.49012e-8 0 0 0 1 1 -4.9761e-8 6.34957e-8 1.49012e-8 4.40376e-8 0.9961946 0.08715574 0.2368225 -6.75911e-8 -0.08715576 0.9961947 -1.49012e-8 0 0 0 1</float_array> <float_array id="Armature_002_Arm3_L_pose_matrix-output-array" count="32">0.9018104 -0.432132 9.99244e-8 1.49012e-8 0.432132 0.9018103 1.04308e-7 0.2368225 -1.41561e-7 -4.47035e-8 0.9999999 -1.49012e-8 0 0 0 1 1 -4.9761e-8 6.34957e-8 1.49012e-8 4.40376e-8 0.9961946 0.08715574 0.2368225 -6.75911e-8 -0.08715576 0.9961947 -1.49012e-8 0 0 0 1</float_array>
<technique_common> <technique_common>
<accessor source="#Armature_002_Arm3_L_pose_matrix-output-array" count="2" stride="16"> <accessor source="#Armature_002_Arm3_L_pose_matrix-output-array" count="2" stride="16">
<param name="TRANSFORM" type="float4x4"/> <param name="TRANSFORM" type="float4x4"/>
@@ -733,7 +733,7 @@
</technique_common> </technique_common>
</source> </source>
<source id="Armature_002_Arm4_L_pose_matrix-output"> <source id="Armature_002_Arm4_L_pose_matrix-output">
<float_array id="Armature_002_Arm4_L_pose_matrix-output-array" count="32">1 5.68864e-8 -6.13071e-8 0 -6.29211e-8 1 2.98023e-8 0.2368228 6.29211e-8 0 1 1.49012e-8 0 0 0 1 1 9.28881e-8 -4.82035e-8 0 -8.91413e-8 0.9848078 0.1736482 0.2368228 6.52151e-8 -0.1736482 0.9848078 1.49012e-8 0 0 0 1</float_array> <float_array id="Armature_002_Arm4_L_pose_matrix-output-array" count="32">0.9406103 -0.3394882 -2.46615e-8 0 0.3394883 0.9406103 8.9407e-8 0.2368228 1.49012e-8 -8.9407e-8 1 1.49012e-8 0 0 0 1 1 9.28881e-8 -4.82035e-8 0 -8.91413e-8 0.9848078 0.1736482 0.2368228 6.52151e-8 -0.1736482 0.9848078 1.49012e-8 0 0 0 1</float_array>
<technique_common> <technique_common>
<accessor source="#Armature_002_Arm4_L_pose_matrix-output-array" count="2" stride="16"> <accessor source="#Armature_002_Arm4_L_pose_matrix-output-array" count="2" stride="16">
<param name="TRANSFORM" type="float4x4"/> <param name="TRANSFORM" type="float4x4"/>
@@ -765,7 +765,7 @@
</technique_common> </technique_common>
</source> </source>
<source id="Armature_002_UpperHand_L_pose_matrix-output"> <source id="Armature_002_UpperHand_L_pose_matrix-output">
<float_array id="Armature_002_UpperHand_L_pose_matrix-output-array" count="32">1 -1.08477e-8 -2.40456e-7 0 3.55271e-15 0.9999999 0 0.2368225 2.38419e-7 2.98023e-8 1 0 0 0 0 1 1 4.21468e-8 -2.34937e-7 0 2.99004e-8 0.9396926 0.3420201 0.2368225 2.33146e-7 -0.3420201 0.9396927 0 0 0 0 1</float_array> <float_array id="Armature_002_UpperHand_L_pose_matrix-output-array" count="32">0.9033983 -0.4288025 -1.74397e-7 0 0.4288025 0.9033982 -2.98023e-8 0.2368225 1.78814e-7 2.98023e-8 1 0 0 0 0 1 1 4.21468e-8 -2.34937e-7 0 2.99004e-8 0.9396926 0.3420201 0.2368225 2.33146e-7 -0.3420201 0.9396927 0 0 0 0 1</float_array>
<technique_common> <technique_common>
<accessor source="#Armature_002_UpperHand_L_pose_matrix-output-array" count="2" stride="16"> <accessor source="#Armature_002_UpperHand_L_pose_matrix-output-array" count="2" stride="16">
<param name="TRANSFORM" type="float4x4"/> <param name="TRANSFORM" type="float4x4"/>
@@ -797,7 +797,7 @@
</technique_common> </technique_common>
</source> </source>
<source id="Armature_002_LowerHand_L_pose_matrix-output"> <source id="Armature_002_LowerHand_L_pose_matrix-output">
<float_array id="Armature_002_LowerHand_L_pose_matrix-output-array" count="32">1 3.55271e-15 0 1.49012e-8 3.55271e-15 0.9999999 2.98023e-8 0.147557 3.55271e-15 0 1 5.96046e-8 0 0 0 1 1 -1.51808e-8 -1.32815e-9 1.49012e-8 1.51808e-8 0.9848077 0.1736482 0.147557 -1.32815e-9 -0.1736482 0.9848077 5.96046e-8 0 0 0 1</float_array> <float_array id="Armature_002_LowerHand_L_pose_matrix-output-array" count="32">0.8926221 -0.4508057 6.9957e-8 1.49012e-8 0.4508057 0.8926221 2.98023e-8 0.147557 -2.98023e-8 8.9407e-8 1 5.96046e-8 0 0 0 1 1 -1.51808e-8 -1.32815e-9 1.49012e-8 1.51808e-8 0.9848077 0.1736482 0.147557 -1.32815e-9 -0.1736482 0.9848077 5.96046e-8 0 0 0 1</float_array>
<technique_common> <technique_common>
<accessor source="#Armature_002_LowerHand_L_pose_matrix-output-array" count="2" stride="16"> <accessor source="#Armature_002_LowerHand_L_pose_matrix-output-array" count="2" stride="16">
<param name="TRANSFORM" type="float4x4"/> <param name="TRANSFORM" type="float4x4"/>
@@ -829,7 +829,7 @@
</technique_common> </technique_common>
</source> </source>
<source id="Armature_002_Arm1_R_pose_matrix-output"> <source id="Armature_002_Arm1_R_pose_matrix-output">
<float_array id="Armature_002_Arm1_R_pose_matrix-output-array" count="32">-2.8213e-7 0 -1 3.93073e-4 6.29212e-8 0.9999999 -2.13163e-14 -0.2065513 1 -6.29212e-8 -2.8213e-7 0.170607 0 0 0 1 -2.86828e-7 -0.08715574 -0.9961947 3.93073e-4 4.46726e-8 0.9961947 -0.08715573 -0.2065513 1 -6.95013e-8 -2.81843e-7 0.170607 0 0 0 1</float_array> <float_array id="Armature_002_Arm1_R_pose_matrix-output-array" count="32">-2.93183e-7 -2.30214e-8 -1 3.93073e-4 -0.08979136 0.9959605 3.39687e-9 -0.2065513 0.9959606 0.08979136 -2.94066e-7 0.170607 0 0 0 1 -2.86828e-7 -0.08715574 -0.9961947 3.93073e-4 4.46726e-8 0.9961947 -0.08715573 -0.2065513 1 -6.95013e-8 -2.81843e-7 0.170607 0 0 0 1</float_array>
<technique_common> <technique_common>
<accessor source="#Armature_002_Arm1_R_pose_matrix-output-array" count="2" stride="16"> <accessor source="#Armature_002_Arm1_R_pose_matrix-output-array" count="2" stride="16">
<param name="TRANSFORM" type="float4x4"/> <param name="TRANSFORM" type="float4x4"/>
@@ -861,7 +861,7 @@
</technique_common> </technique_common>
</source> </source>
<source id="Armature_002_Arm2_R_pose_matrix-output"> <source id="Armature_002_Arm2_R_pose_matrix-output">
<float_array id="Armature_002_Arm2_R_pose_matrix-output-array" count="32">1 6.29212e-8 3.57628e-7 0 -6.29212e-8 1 0 0.2368225 -3.57628e-7 0 1 0 0 0 0 1 1 8.0691e-8 3.51358e-7 0 -4.9761e-8 0.9961947 -0.08715574 0.2368225 -3.57053e-7 0.08715574 0.9961947 0 0 0 0 1</float_array> <float_array id="Armature_002_Arm2_R_pose_matrix-output-array" count="32">0.9647611 0.2631273 3.27563e-7 0 -0.2631273 0.9647611 4.47035e-8 0.2368225 -3.05474e-7 -1.3411e-7 1 0 0 0 0 1 1 8.0691e-8 3.51358e-7 0 -4.9761e-8 0.9961947 -0.08715574 0.2368225 -3.57053e-7 0.08715574 0.9961947 0 0 0 0 1</float_array>
<technique_common> <technique_common>
<accessor source="#Armature_002_Arm2_R_pose_matrix-output-array" count="2" stride="16"> <accessor source="#Armature_002_Arm2_R_pose_matrix-output-array" count="2" stride="16">
<param name="TRANSFORM" type="float4x4"/> <param name="TRANSFORM" type="float4x4"/>
@@ -893,7 +893,7 @@
</technique_common> </technique_common>
</source> </source>
<source id="Armature_002_Arm3_R_pose_matrix-output"> <source id="Armature_002_Arm3_R_pose_matrix-output">
<float_array id="Armature_002_Arm3_R_pose_matrix-output-array" count="32">1 6.29212e-8 -6.29212e-8 -1.49012e-8 -6.29212e-8 0.9999999 0 0.2368225 6.29212e-8 1.49012e-8 0.9999999 1.49012e-8 0 0 0 1 1 4.9761e-8 -6.23466e-8 -1.49012e-8 -5.50055e-8 0.9961946 -0.08715574 0.2368225 5.77724e-8 0.08715576 0.9961947 1.49012e-8 0 0 0 1</float_array> <float_array id="Armature_002_Arm3_R_pose_matrix-output-array" count="32">0.9018104 0.432132 -9.99244e-8 -1.49012e-8 -0.432132 0.9018103 8.9407e-8 0.2368225 1.11759e-7 -5.96046e-8 0.9999999 1.49012e-8 0 0 0 1 1 4.9761e-8 -6.23466e-8 -1.49012e-8 -5.50055e-8 0.9961946 -0.08715574 0.2368225 5.77724e-8 0.08715576 0.9961947 1.49012e-8 0 0 0 1</float_array>
<technique_common> <technique_common>
<accessor source="#Armature_002_Arm3_R_pose_matrix-output-array" count="2" stride="16"> <accessor source="#Armature_002_Arm3_R_pose_matrix-output-array" count="2" stride="16">
<param name="TRANSFORM" type="float4x4"/> <param name="TRANSFORM" type="float4x4"/>
@@ -925,7 +925,7 @@
</technique_common> </technique_common>
</source> </source>
<source id="Armature_002_Arm4_R_pose_matrix-output"> <source id="Armature_002_Arm4_R_pose_matrix-output">
<float_array id="Armature_002_Arm4_R_pose_matrix-output-array" count="32">1 -6.9213e-8 6.54104e-8 -1.49012e-8 6.29211e-8 1 -2.98023e-8 0.2368228 -6.29212e-8 -2.98023e-8 1 -5.96046e-8 0 0 0 1 1 -7.64089e-8 7.17683e-8 -1.49012e-8 7.60813e-8 0.9961948 -0.0871558 0.2368228 -6.23466e-8 0.08715571 0.9961948 -5.96046e-8 0 0 0 1</float_array> <float_array id="Armature_002_Arm4_R_pose_matrix-output-array" count="32">0.9406103 0.3394883 2.87647e-8 -1.49012e-8 -0.3394884 0.9406103 1.49012e-8 0.2368228 7.45058e-9 -7.45058e-8 1 -5.96046e-8 0 0 0 1 1 -7.64089e-8 7.17683e-8 -1.49012e-8 7.60813e-8 0.9961948 -0.0871558 0.2368228 -6.23466e-8 0.08715571 0.9961948 -5.96046e-8 0 0 0 1</float_array>
<technique_common> <technique_common>
<accessor source="#Armature_002_Arm4_R_pose_matrix-output-array" count="2" stride="16"> <accessor source="#Armature_002_Arm4_R_pose_matrix-output-array" count="2" stride="16">
<param name="TRANSFORM" type="float4x4"/> <param name="TRANSFORM" type="float4x4"/>
@@ -957,7 +957,7 @@
</technique_common> </technique_common>
</source> </source>
<source id="Armature_002_UpperHand_R_pose_matrix-output"> <source id="Armature_002_UpperHand_R_pose_matrix-output">
<float_array id="Armature_002_UpperHand_R_pose_matrix-output-array" count="32">1 1.01416e-8 -2.33831e-7 -1.49012e-8 -1.77636e-15 0.9999999 2.98023e-8 0.2368226 2.38419e-7 2.98023e-8 1 2.98023e-8 0 0 0 1 1 -2.65734e-9 -2.34158e-7 -1.49012e-8 -7.61939e-9 0.9961946 -0.0871557 0.2368226 2.38086e-7 0.08715576 0.9961948 2.98023e-8 0 0 0 1</float_array> <float_array id="Armature_002_UpperHand_R_pose_matrix-output-array" count="32">0.9033983 0.4288025 -2.9989e-7 -1.49012e-8 -0.4288025 0.9033982 0 0.2368226 2.5332e-7 1.49012e-7 1 2.98023e-8 0 0 0 1 1 -2.65734e-9 -2.34158e-7 -1.49012e-8 -7.61939e-9 0.9961946 -0.0871557 0.2368226 2.38086e-7 0.08715576 0.9961948 2.98023e-8 0 0 0 1</float_array>
<technique_common> <technique_common>
<accessor source="#Armature_002_UpperHand_R_pose_matrix-output-array" count="2" stride="16"> <accessor source="#Armature_002_UpperHand_R_pose_matrix-output-array" count="2" stride="16">
<param name="TRANSFORM" type="float4x4"/> <param name="TRANSFORM" type="float4x4"/>
@@ -989,7 +989,7 @@
</technique_common> </technique_common>
</source> </source>
<source id="Armature_002_LowerHand_R_pose_matrix-output"> <source id="Armature_002_LowerHand_R_pose_matrix-output">
<float_array id="Armature_002_LowerHand_R_pose_matrix-output-array" count="32">1 -7.00673e-10 -7.77575e-10 0 -3.55271e-15 1 -2.98023e-8 0.1475569 -1.77636e-15 2.98023e-8 1 2.98023e-8 0 0 0 1 1 1.43558e-8 -1.97223e-9 0 -1.51808e-8 0.9848078 -0.1736482 0.1475569 -1.32816e-9 0.1736482 0.9848077 2.98023e-8 0 0 0 1</float_array> <float_array id="Armature_002_LowerHand_R_pose_matrix-output-array" count="32">0.8926221 0.4508058 -7.07346e-8 0 -0.4508058 0.8926222 -5.96046e-8 0.1475569 4.47035e-8 8.9407e-8 1 2.98023e-8 0 0 0 1 1 1.43558e-8 -1.97223e-9 0 -1.51808e-8 0.9848078 -0.1736482 0.1475569 -1.32816e-9 0.1736482 0.9848077 2.98023e-8 0 0 0 1</float_array>
<technique_common> <technique_common>
<accessor source="#Armature_002_LowerHand_R_pose_matrix-output-array" count="2" stride="16"> <accessor source="#Armature_002_LowerHand_R_pose_matrix-output-array" count="2" stride="16">
<param name="TRANSFORM" type="float4x4"/> <param name="TRANSFORM" type="float4x4"/>
Binary file not shown.
+2 -8
View File
@@ -34,7 +34,6 @@
#include "CTemplate.h" #include "CTemplate.h"
#include "Core/ConfigFile.h" #include "Core/ConfigFile.h"
#include "Core/EventBroker.h" #include "Core/EventBroker.h"
#include "Input/InputSystem.h"
#include "Rendering/CModel.h" #include "Rendering/CModel.h"
#include "Rendering/CSprite.h" #include "Rendering/CSprite.h"
#include "Rendering/CPointLight.h" #include "Rendering/CPointLight.h"
@@ -177,9 +176,6 @@ public:
m_World->ComponentFactory.Register<Components::InkBlasterBrick>(); m_World->ComponentFactory.Register<Components::InkBlasterBrick>();
m_World->ComponentFactory.Register<Components::KrakenAttackBrick>(); m_World->ComponentFactory.Register<Components::KrakenAttackBrick>();
//m_World->SystemFactory.Register<Systems::InputSystem>(
// [this]() { return new Systems::InputSystem(m_World.get(), m_EventBroker); });
//m_World->AddSystem<Systems::InputSystem>();
m_World->SystemFactory.Register<Systems::LevelSystem>( m_World->SystemFactory.Register<Systems::LevelSystem>(
[this]() { return new Systems::LevelSystem(m_World.get(), m_EventBroker); }); [this]() { return new Systems::LevelSystem(m_World.get(), m_EventBroker); });
m_World->AddSystem<Systems::LevelSystem>(); m_World->AddSystem<Systems::LevelSystem>();
@@ -261,10 +257,9 @@ public:
m_LastTime = currentTime; m_LastTime = currentTime;
// Update input // Update input
m_EventBroker->Swap();
m_InputManager->Update(dt); m_InputManager->Update(dt);
//m_EventBroker->Process<Systems::InputSystem>(); // Swap event queues to get fresh input data in the read queue
m_EventBroker->Swap(); //m_EventBroker->Swap();
//ResourceManager::Update(); //ResourceManager::Update();
if (m_GameIsRunning) { if (m_GameIsRunning) {
@@ -289,7 +284,6 @@ public:
m_EventBroker->Process<Engine>(); m_EventBroker->Process<Engine>();
// Swap event queues // Swap event queues
m_EventBroker->Swap(); m_EventBroker->Swap();
m_EventBroker->Clear();
glfwPollEvents(); glfwPollEvents();
} }
-1
View File
@@ -121,7 +121,6 @@ public:
int Process(); int Process();
int Process(std::string contextTypeName); int Process(std::string contextTypeName);
void Swap(); void Swap();
void Clear();
void Unsubscribe(BaseEventRelay &relay); void Unsubscribe(BaseEventRelay &relay);
private: private:
-1
View File
@@ -103,7 +103,6 @@ private:
bool OnBrickGenerating(const dd::Events::BrickGenerating &event); bool OnBrickGenerating(const dd::Events::BrickGenerating &event);
bool OnArrivedAtNewStage(const dd::Events::ArrivedAtNewStage &event); bool OnArrivedAtNewStage(const dd::Events::ArrivedAtNewStage &event);
void GetBrickSet(); void GetBrickSet();
void CreateBloodEffect(glm::vec3);
}; };
} }
-5
View File
@@ -47,10 +47,6 @@ public:
private: private:
bool m_Pause = false; bool m_Pause = false;
EntityID m_Template; EntityID m_Template;
Events::Lifebuoy m_SavedEvent;
bool m_Lifebuoy = false;
float m_Timer;
float m_WaitingTime = 0.4;
dd::EventRelay<LifebuoySystem, dd::Events::Contact> m_EContact; dd::EventRelay<LifebuoySystem, dd::Events::Contact> m_EContact;
dd::EventRelay<LifebuoySystem, dd::Events::Pause> m_EPause; dd::EventRelay<LifebuoySystem, dd::Events::Pause> m_EPause;
@@ -62,7 +58,6 @@ private:
bool OnPause(const dd::Events::Pause &event); bool OnPause(const dd::Events::Pause &event);
bool OnResume(const dd::Events::Resume &event); bool OnResume(const dd::Events::Resume &event);
bool OnLifebuoy(const dd::Events::Lifebuoy &event); bool OnLifebuoy(const dd::Events::Lifebuoy &event);
bool Lifebuoy(const dd::Events::Lifebuoy &event);
bool OnLifebuoyHit(const dd::Events::LifebuoyHit &event); bool OnLifebuoyHit(const dd::Events::LifebuoyHit &event);
struct LifebuoyInfo struct LifebuoyInfo
-1
View File
@@ -22,7 +22,6 @@
#include "Physics/CPhysics.h" #include "Physics/CPhysics.h"
#include "Physics/CCircleShape.h" #include "Physics/CCircleShape.h"
#include "Physics/ESetImpulse.h" #include "Physics/ESetImpulse.h"
#include "Physics/ECreateParticleSequence.h"
#include "Rendering/CSprite.h" #include "Rendering/CSprite.h"
#include "Rendering/CModel.h" #include "Rendering/CModel.h"
-2
View File
@@ -26,8 +26,6 @@ struct ParticleEmitter : public Component
//values to interpolate between. //values to interpolate between.
std::vector<glm::vec3> ScaleValues; std::vector<glm::vec3> ScaleValues;
std::vector<float> AlphaValues; std::vector<float> AlphaValues;
std::vector<glm::vec3> VelocityValues;
//System variables //System variables
float GravityScale = 1.0f; float GravityScale = 1.0f;
@@ -29,7 +29,6 @@ struct CreateParticleSequence : public Event
bool DefaultScale = false; bool DefaultScale = false;
std::vector<glm::vec3> ScaleValues; std::vector<glm::vec3> ScaleValues;
std::vector<float> AlphaValues; std::vector<float> AlphaValues;
std::vector<glm::vec3> VelocityValues;
//Particle //Particle
std::string SpriteFile = ""; std::string SpriteFile = "";
+1 -4
View File
@@ -91,11 +91,8 @@ int dd::EventBroker::Process(std::string contextTypeName)
void dd::EventBroker::Swap() void dd::EventBroker::Swap()
{ {
std::swap(m_EventQueueRead, m_EventQueueWrite); std::swap(m_EventQueueRead, m_EventQueueWrite);
}
void dd::EventBroker::Clear()
{
m_EventQueueWrite->clear(); m_EventQueueWrite->clear();
} }
void dd::EventBroker::subscribeImmediate(dd::BaseEventRelay& relay) void dd::EventBroker::subscribeImmediate(dd::BaseEventRelay& relay)
+2 -1
View File
@@ -216,7 +216,8 @@ void dd::Systems::BallSystem::UpdateEntity(double dt, EntityID entity, EntityID
auto transform = m_World->GetComponent<Components::Transform>(entity); auto transform = m_World->GetComponent<Components::Transform>(entity);
glm::vec2 dir = glm::normalize(glm::vec2(transform->Velocity.x, transform->Velocity.y)); glm::vec2 dir = glm::normalize(glm::vec2(transform->Velocity.x, transform->Velocity.y));
glm::vec2 up = glm::vec2(0.f, 1.f); glm::vec2 up = glm::vec2(0.f, 1.f);
float angle = glm::acos(glm::dot<float>(dir, up)) * glm::sign(dir.x);
float angle = atan2(dir.x, dir.y);
transform->Orientation = glm::rotate(glm::quat(), angle, glm::vec3(0.f, 0.f, -1.f)); transform->Orientation = glm::rotate(glm::quat(), angle, glm::vec3(0.f, 0.f, -1.f));
} }
} }
+41 -67
View File
@@ -332,7 +332,47 @@ bool dd::Systems::KrakenSystem::OnKrakenHit(const dd::Events::KrakenHit &event)
m_KrakenCurrentSecondsToAction = m_KrakenMaxSecondsToAction - (modifier * timeDifferenceBetweenMaxAndMin); m_KrakenCurrentSecondsToAction = m_KrakenMaxSecondsToAction - (modifier * timeDifferenceBetweenMaxAndMin);
// If modifier is 1, MaxSeconds is 15, MinSeconds is 5, then... 15 - (1 * 10), meaning 5. // If modifier is 1, MaxSeconds is 15, MinSeconds is 5, then... 15 - (1 * 10), meaning 5.
CreateBloodEffect(transform->Position); auto ball = m_World->GetComponent<Components::Transform>(event.Hitter);
if (ball != nullptr) {
//Particle trail
Events::CreateParticleSequence trail;
trail.parent = event.Hitter;
trail.AlphaValues.push_back(1.f);
trail.AlphaValues.push_back(0.f);
trail.ScaleValues.push_back(glm::vec3(0.08f));
trail.ScaleValues.push_back(glm::vec3(0.f));
trail.RadiusDistribution = 2;
trail.EmitterLifeTime = 1.f;
trail.ParticleLifeTime = 1.f;
trail.ParticlesPerTick = 1;
trail.SpawnRate = 0.5f;
trail.Speed = 10.f;
trail.EmittingAngle = glm::half_pi<float>();
trail.SpriteFile = "Textures/Particles/FadeBall.png";
trail.Color = glm::vec4(1, 0, 0, 1);
//p.Spread = ...
EventBroker->Publish(trail);
}
//ParticlePoof
Events::CreateParticleSequence poof;
poof.EmitterLifeTime = 4;
poof.EmittingAngle = glm::half_pi<float>();
poof.Spread = 0.5f;
poof.NumberOfTicks = 1;
poof.ParticleLifeTime = 1.5f;
poof.ParticlesPerTick = 2;
poof.Position = transform->Position;
poof.ScaleValues.clear();
poof.ScaleValues.push_back(glm::vec3(0.5f));
poof.ScaleValues.push_back(glm::vec3(2.f, 2.f, 0.2f));
poof.SpriteFile = "Textures/Particles/Cloud_Particle.png";
poof.Color = glm::vec4(1, 0, 0, 1);
poof.AlphaValues.clear();
poof.AlphaValues.push_back(1.f);
poof.AlphaValues.push_back(0.f);
poof.Speed = 20;
EventBroker->Publish(poof);
//std::cout << kraken->Health << std::endl; //std::cout << kraken->Health << std::endl;
//kraken->Health = -1; //kraken->Health = -1;
@@ -450,69 +490,3 @@ bool dd::Systems::KrakenSystem::OnArrivedAtNewStage(const dd::Events::ArrivedAtN
} }
return true; return true;
} }
void dd::Systems::KrakenSystem::CreateBloodEffect(glm::vec3 pos)
{
//ParticlePoof
Events::CreateParticleSequence dust;
dust.EmitterLifeTime = 4;
dust.EmittingAngle = glm::half_pi<float>();
dust.Spread = 0.5f;
dust.NumberOfTicks = 1;
dust.ParticleLifeTime = 1.f;
dust.ParticlesPerTick = 1;
dust.Position = pos;
dust.ScaleValues.clear();
dust.ScaleValues.push_back(glm::vec3(0.5f));
dust.ScaleValues.push_back(glm::vec3(2.f, 2.f, 0.2f));
dust.SpriteFile = "Textures/Particles/Cloud_Particle.png";
dust.Color = glm::vec4(1, 0, 0, 1);
dust.AlphaValues.clear();
dust.AlphaValues.push_back(1.f);
dust.AlphaValues.push_back(0.f);
dust.Speed = 20;
EventBroker->Publish(dust);
std::uniform_real_distribution<float> dist(glm::pi<float>(), glm::two_pi<float>());
for (int i = 0; i < 3; i++) {
float angle = dist(m_RandomGenerator);
Events::CreateParticleSequence squirt;
squirt.EmitterLifeTime = 0.3f;
squirt.EmittingAngle = angle;
squirt.Spread = 0;
squirt.SpawnRate = 0.01f;
squirt.ParticleLifeTime = 0.5f;
squirt.ParticlesPerTick = 1;
squirt.Position = pos;
squirt.ScaleValues.clear();
squirt.ScaleValues.push_back(glm::vec3(0.09f));
squirt.SpriteFile = "Textures/Particles/FadeBall.png";
squirt.Color = glm::vec4(1, 0, 0, 1);
squirt.AlphaValues.clear();
squirt.AlphaValues.push_back(1.f);
squirt.AlphaValues.push_back(0.f);
squirt.Speed = 1000;
EventBroker->Publish(squirt);
}
Events::CreateParticleSequence drop;
drop.EmitterLifeTime = 7.f;
drop.SpawnRate = 0.1f;
//drop.EmittingAngle = glm::two_pi<float>() + glm::pi<float>();
drop.EmittingAngle = -glm::half_pi<float>();
drop.Spread = 0;
//drop.Spread = glm::two_pi<float>();
drop.ParticleLifeTime = 1.f;
drop.ParticlesPerTick = 2;
drop.Position = pos;
drop.ScaleValues.clear();
drop.ScaleValues.push_back(glm::vec3(.15f));
drop.ScaleValues.push_back(glm::vec3(0.1f));
drop.SpriteFile = "Textures/Particles/FadeBall.png";
drop.Color = glm::vec4(1, 0, 0, 1);
drop.AlphaValues.clear();
drop.AlphaValues.push_back(1.f);
drop.AlphaValues.push_back(0.f);
drop.GravityScale = 0;
drop.Speed = 300;
EventBroker->Publish(drop);
}
+2 -2
View File
@@ -792,7 +792,7 @@ void dd::Systems::LevelSystem::GetBrickSet(int set, int setCluster) // These are
if (set == 1) { if (set == 1) {
level = // The Butterfly level = // The Butterfly
{4, 0, 0, 1, 0, 0, 1, {4, 0, 0, 1, 0, 0, 1,
1, 6, 0, 1, 0, 1, 1, 1, 6, 0, 1, 0, 6, 1,
1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1,
1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1,
1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1,
@@ -841,7 +841,7 @@ void dd::Systems::LevelSystem::GetBrickSet(int set, int setCluster) // These are
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 6, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 3, 1, 1, 1, 1, 1 }; 1, 3, 1, 1, 1, 1, 5 };
color = color =
{m, m, m, m, m, m, m, {m, m, m, m, m, m, m,
m, m, m, m, m, m, m, m, m, m, m, m, m, m,
+1 -22
View File
@@ -76,19 +76,6 @@ void dd::Systems::LifebuoySystem::Update(double dt)
++it; ++it;
} }
} }
if (IsPaused()) {
return;
}
if (m_Lifebuoy) {
m_Timer += dt;
if (m_Timer > m_WaitingTime) {
m_Timer = 0;
m_Lifebuoy = false;
Lifebuoy(m_SavedEvent);
}
}
} }
void dd::Systems::LifebuoySystem::UpdateEntity(double dt, EntityID entity, EntityID parent) void dd::Systems::LifebuoySystem::UpdateEntity(double dt, EntityID entity, EntityID parent)
@@ -127,13 +114,6 @@ bool dd::Systems::LifebuoySystem::OnContact(const dd::Events::Contact &event)
} }
bool dd::Systems::LifebuoySystem::OnLifebuoy(const dd::Events::Lifebuoy &event) bool dd::Systems::LifebuoySystem::OnLifebuoy(const dd::Events::Lifebuoy &event)
{
m_Lifebuoy = true;
m_SavedEvent = event;
return true;
}
bool dd::Systems::LifebuoySystem::Lifebuoy(const dd::Events::Lifebuoy &event)
{ {
auto ent = m_World->CloneEntity(m_Template); auto ent = m_World->CloneEntity(m_Template);
m_World->SetProperty(ent, "Name", "Lifebuoy"); m_World->SetProperty(ent, "Name", "Lifebuoy");
@@ -141,8 +121,7 @@ bool dd::Systems::LifebuoySystem::Lifebuoy(const dd::Events::Lifebuoy &event)
auto transform = m_World->GetComponent<Components::Transform>(ent); auto transform = m_World->GetComponent<Components::Transform>(ent);
auto physics = m_World->GetComponent<Components::Physics>(ent); auto physics = m_World->GetComponent<Components::Physics>(ent);
physics->CollisionType = CollisionType::Type::Dynamic; physics->CollisionType = CollisionType::Type::Dynamic;
//transform->Position = glm::vec3(0.f, 0.f, -10.f); transform->Position = glm::vec3(0.f, 0.f, -10.f);
transform->Position = event.Transform->Position;
transform->Velocity = glm::vec3(20.f, 3.f, 0.f); transform->Velocity = glm::vec3(20.f, 3.f, 0.f);
LifebuoyInfo info; LifebuoyInfo info;
info.Entity = ent; info.Entity = ent;
+18 -35
View File
@@ -38,49 +38,32 @@ void dd::Systems::PadSystem::Initialize()
EVENT_SUBSCRIBE_MEMBER(m_EStickyPad, &PadSystem::OnStickyPad); EVENT_SUBSCRIBE_MEMBER(m_EStickyPad, &PadSystem::OnStickyPad);
EVENT_SUBSCRIBE_MEMBER(m_EStickyAttachedToPad, &PadSystem::OnStickyAttachedToPad); EVENT_SUBSCRIBE_MEMBER(m_EStickyAttachedToPad, &PadSystem::OnStickyAttachedToPad);
EVENT_SUBSCRIBE_MEMBER(m_EActionButton, &PadSystem::OnActionButton); EVENT_SUBSCRIBE_MEMBER(m_EActionButton, &PadSystem::OnActionButton);
//EVENT_SUBSCRIBE_MEMBER(m_EBindKey, &PadSystem::OnBindKey); //EVENT_SUBSCRIBE_MEMBER(m_EBindKey, &PadSystem::OnBindKey);
{ {
auto ent = m_World->CreateEntity(); auto ent = m_World->CreateEntity();
m_World->SetProperty(ent, "Name", "Pad"); m_World->SetProperty(ent, "Name", "Pad");
auto ctransform = m_World->AddComponent<Components::Transform>(ent); auto ctransform = m_World->AddComponent<Components::Transform>(ent);
ctransform->Position = glm::vec3(0.f, m_PadHeight, -10.f); ctransform->Position = glm::vec3(0.f, m_PadHeight, -10.f);
auto rectangleShape = m_World->AddComponent<Components::RectangleShape>(ent); auto rectangleShape = m_World->AddComponent<Components::RectangleShape>(ent);
rectangleShape->Dimensions = glm::vec2(1.f, 0.1f); rectangleShape->Dimensions = glm::vec2(1.f, 0.1f);
auto physics = m_World->AddComponent<Components::Physics>(ent); auto physics = m_World->AddComponent<Components::Physics>(ent);
physics->CollisionType = CollisionType::Type::Kinematic; physics->CollisionType = CollisionType::Type::Kinematic;
physics->Category = CollisionLayer::Type::Pad; physics->Category = CollisionLayer::Type::Pad;
physics->Mask = static_cast<CollisionLayer::Type>(CollisionLayer::Ball | CollisionLayer::PowerUp | CollisionLayer::LifeBuoy); physics->Mask = static_cast<CollisionLayer::Type>(CollisionLayer::Ball | CollisionLayer::PowerUp | CollisionLayer::LifeBuoy);
physics->Calculate = true; physics->Calculate = true;
auto cModel = m_World->AddComponent<Components::Model>(ent); auto cModel = m_World->AddComponent<Components::Model>(ent);
cModel->ModelFile = "Models/Ship/Ship.obj"; cModel->ModelFile = "Models/Ship/Ship.obj";
auto pad = m_World->AddComponent<Components::Pad>(ent); auto pad = m_World->AddComponent<Components::Pad>(ent);
pad->SlowdownModifier = 10.f; m_World->CommitEntity(ent);
m_World->CommitEntity(ent);
m_Edge = 3.2 - (ctransform->Scale.x / 2); m_Edge = 3.2 - (ctransform->Scale.x / 2);
m_PadEntity = ent; m_PadEntity = ent;
m_PadTransform = ctransform.get(); m_PadTransform = ctransform.get();
m_PadComponent = pad.get(); m_PadComponent = pad.get();
}
Events::CreateParticleSequence e;
e.SpriteFile = "Textures/Particles/FadeBall.png";
e.Color = glm::vec4(0, 0, 1, 1);
e.EmitterLifeTime = 9999999999;
e.EmittingAngle = glm::two_pi<float>();
e.ParticleLifeTime = 0.5f;
e.ParticlesPerTick = 2;
e.ScaleValues.push_back(glm::vec3(2));
e.AlphaValues.push_back(1.f);
e.SpawnRate = 0.1;
e.Spread = glm::half_pi<float>();
e.Speed = 10;
e.parent = m_PadEntity;
EventBroker->Publish(e);
}
//Stick //Stick
{ {
+1 -2
View File
@@ -592,7 +592,7 @@ void dd::Systems::PhysicsSystem::UpdateParticleEmitters(double dt)
//Random z-value //Random z-value
std::uniform_real_distribution<float> dist(0, 0.1); std::uniform_real_distribution<float> dist(0, 1);
float zDistribution = dist(gen); float zDistribution = dist(gen);
particleTransform->Position = glm::vec3(emitterTransform->Position.x, emitterTransform->Position.y, -9.5f + zDistribution); particleTransform->Position = glm::vec3(emitterTransform->Position.x, emitterTransform->Position.y, -9.5f + zDistribution);
particleTransform->Scale = particleTemplate->Scale; particleTransform->Scale = particleTemplate->Scale;
@@ -730,7 +730,6 @@ bool dd::Systems::PhysicsSystem::CreateParticleSequence(const Events::CreatePart
particleEmitter->RadiusDistribution = event.RadiusDistribution; particleEmitter->RadiusDistribution = event.RadiusDistribution;
particleEmitter->DefaultScale = event.DefaultScale; particleEmitter->DefaultScale = event.DefaultScale;
particleEmitter->ScaleValues = event.ScaleValues; particleEmitter->ScaleValues = event.ScaleValues;
particleEmitter->VelocityValues = event.VelocityValues;
{ {
//Creating Particle Template //Creating Particle Template
auto particle = m_World->CreateEntity(emitter); auto particle = m_World->CreateEntity(emitter);