aboutsummaryrefslogtreecommitdiff
path: root/src/poser.c
diff options
context:
space:
mode:
authorCNLohr <charles@cnlohr.com>2018-03-26 17:22:59 -0400
committerGitHub <noreply@github.com>2018-03-26 17:22:59 -0400
commit325f8f01b7cdae59ee481fe5e04e8b6b85ee8838 (patch)
tree6598f0185c010dc3d48067060a6303d9e58ce74f /src/poser.c
parent18e717642be3af3b9f72b630dcad68ca17c32dc9 (diff)
parent4c373617220aca69a4acb7a32c12457a057f4e48 (diff)
downloadlibsurvive-325f8f01b7cdae59ee481fe5e04e8b6b85ee8838.tar.gz
libsurvive-325f8f01b7cdae59ee481fe5e04e8b6b85ee8838.tar.bz2
Merge pull request #118 from dpeter99/master
Fixed the Windows build
Diffstat (limited to 'src/poser.c')
-rw-r--r--src/poser.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/poser.c b/src/poser.c
index ea5812e..9a0de24 100644
--- a/src/poser.c
+++ b/src/poser.c
@@ -4,6 +4,9 @@
#include <stdio.h>
#include <survive.h>
+#define _USE_MATH_DEFINES // for C
+#include <math.h>
+
void PoserData_poser_raw_pose_func(PoserData *poser_data, SurviveObject *so, uint8_t lighthouse, SurvivePose *pose) {
if (poser_data->rawposeproc) {
poser_data->rawposeproc(so, lighthouse, pose, poser_data->userdata);
@@ -51,7 +54,7 @@ void PoserData_lighthouse_pose_func(PoserData *poser_data, SurviveObject *so, ui
ApplyPoseToPose(&lighthouse2obj, &arb2object, &lighthouse2arb);
// Now find the space with the same origin, but rotated so that gravity is up
- SurvivePose lighthouse2objUp = {}, object2objUp = {};
+ SurvivePose lighthouse2objUp = {0}, object2objUp = {0};
if (quatmagnitude(so->activations.accel)) {
quatfrom2vectors(object2objUp.Rot, so->activations.accel, up);
} else {