aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2018-04-09 09:33:40 -0600
committerJustin Berger <j.david.berger@gmail.com>2018-04-09 09:33:40 -0600
commit7f4385538d6b19ea5dd3f00c4a0eb49385798031 (patch)
tree39ea05079277984042c8a8865382852f258a13cb /src
parent5985e89c8d7460f17ede727615bad795b3ab2c87 (diff)
downloadlibsurvive-7f4385538d6b19ea5dd3f00c4a0eb49385798031.tar.gz
libsurvive-7f4385538d6b19ea5dd3f00c4a0eb49385798031.tar.bz2
Made new posers work in windows
Diffstat (limited to 'src')
-rw-r--r--src/poser_epnp.c2
-rw-r--r--src/poser_general_optimizer.c3
-rw-r--r--src/poser_mpfit.c15
-rw-r--r--src/poser_sba.c2
-rw-r--r--src/survive.c2
5 files changed, 10 insertions, 14 deletions
diff --git a/src/poser_epnp.c b/src/poser_epnp.c
index 615c01c..851ce29 100644
--- a/src/poser_epnp.c
+++ b/src/poser_epnp.c
@@ -129,7 +129,7 @@ int PoserEPNP(SurviveObject *so, PoserData *pd) {
case POSERDATA_LIGHT: {
PoserDataLight *lightData = (PoserDataLight *)pd;
- SurvivePose posers[2] = {};
+ SurvivePose posers[2] = { 0 };
int meas[2] = {0, 0};
for (int lh = 0; lh < so->ctx->activeLighthouses; lh++) {
if (so->ctx->bsd[lh].PositionSet) {
diff --git a/src/poser_general_optimizer.c b/src/poser_general_optimizer.c
index 313e378..b3c4e65 100644
--- a/src/poser_general_optimizer.c
+++ b/src/poser_general_optimizer.c
@@ -1,6 +1,7 @@
#include "poser_general_optimizer.h"
#include "string.h"
-#include <alloca.h>
+
+#include <malloc.h>
#include <assert.h>
#include <stdio.h>
diff --git a/src/poser_mpfit.c b/src/poser_mpfit.c
index 03ef522..439d151 100644
--- a/src/poser_mpfit.c
+++ b/src/poser_mpfit.c
@@ -167,22 +167,15 @@ static double run_mpfit_find_3d_structure(MPFITData *d, PoserDataLight *pdl, Sur
}
failure_count = 0;
- SurvivePose soLocation = {};
+ SurvivePose soLocation = { 0 };
if (!general_optimizer_data_record_current_pose(&d->opt, &pdl->hdr, sizeof(*pdl), &soLocation)) {
return -1;
}
- mp_result result = {};
- mp_par pars[7] = {};
- pars[0].parname = "X";
- pars[1].parname = "Y";
- pars[2].parname = "Z";
- pars[3].parname = "w";
- pars[4].parname = "i";
- pars[5].parname = "j";
- pars[6].parname = "k";
-
+ mp_result result = { 0 };
+ mp_par pars[7] = { 0 };
+
const bool debug_jacobian = false;
if (d->use_jacobian_function) {
for (int i = 0; i < 7; i++) {
diff --git a/src/poser_sba.c b/src/poser_sba.c
index 4c7fcd1..5166951 100644
--- a/src/poser_sba.c
+++ b/src/poser_sba.c
@@ -230,7 +230,7 @@ static double run_sba_find_3d_structure(SBAData *d, PoserDataLight *pdl, Survive
}
failure_count = 0;
- SurvivePose soLocation = {};
+ SurvivePose soLocation = { 0 };
if (!general_optimizer_data_record_current_pose(&d->opt, &pdl->hdr, sizeof(*pdl), &soLocation)) {
return -1;
diff --git a/src/survive.c b/src/survive.c
index 9e750f9..1ab09da 100644
--- a/src/survive.c
+++ b/src/survive.c
@@ -114,6 +114,8 @@ SurviveContext *survive_init_internal(int argc, char *const *argv) {
MANUAL_DRIVER_REGISTRATION(PoserDummy)
MANUAL_DRIVER_REGISTRATION(PoserEPNP)
MANUAL_DRIVER_REGISTRATION(PoserSBA)
+ MANUAL_DRIVER_REGISTRATION(PoserCharlesRefine)
+ MANUAL_DRIVER_REGISTRATION(PoserMPFIT)
MANUAL_DRIVER_REGISTRATION(DriverRegHTCVive)
MANUAL_DRIVER_REGISTRATION(DriverRegPlayback)