diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-17 08:04:59 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-17 08:04:59 +0200 |
commit | b15ec9f185e600e45213b5727e9b2a28c104940f (patch) | |
tree | f2a310685aff70bf8446dbcbc1c76b2c979ccb58 | |
parent | 383c832723691506351b02b5ccac7e9cd26f4583 (diff) |
fix win32 build breakage
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
-rw-r--r-- | ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp | 2 | ||||
-rw-r--r-- | ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.h | 2 | ||||
-rw-r--r-- | ftnoir_protocol_ft/ftnoir_protocol_ft.cpp | 55 | ||||
-rw-r--r-- | ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp | 2 | ||||
-rw-r--r-- | ftnoir_protocol_mouse/ftnoir_protocol_mouse.h | 2 | ||||
-rw-r--r-- | ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 2 | ||||
-rw-r--r-- | ftnoir_protocol_sc/ftnoir_protocol_sc.h | 2 | ||||
-rw-r--r-- | ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp | 2 | ||||
-rw-r--r-- | ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h | 2 |
9 files changed, 30 insertions, 41 deletions
diff --git a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp index df25e9ed..986ccc65 100644 --- a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp +++ b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp @@ -87,7 +87,7 @@ void FTNoIR_Protocol::loadSettings() { // // Update Headpose in Game. // -void FTNoIR_Protocol::sendHeadposeToGame(double *headpose, double *rawheadpose ) { +void FTNoIR_Protocol::sendHeadposeToGame(const double *headpose ) { DWORD result; TFSState pitch; TFSState yaw; diff --git a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.h b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.h index d901b63e..52b2cd98 100644 --- a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.h +++ b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.h @@ -61,7 +61,7 @@ public: FTNoIR_Protocol(); ~FTNoIR_Protocol(); bool checkServerInstallationOK(); - void sendHeadposeToGame( double *headpose, double *rawheadpose ); + void sendHeadposeToGame(const double* headpose); QString getGameName() { return "Microsoft Flight Simulator X"; } diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp index 47e99d31..186562cf 100644 --- a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp +++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp @@ -92,39 +92,28 @@ void FTNoIR_Protocol::loadSettings() { // // Update Headpose in Game. // -void FTNoIR_Protocol::sendHeadposeToGame(double *headpose, double *rawheadpose ) { -float virtPosX; -float virtPosY; -float virtPosZ; - -float virtRotX; -float virtRotY; -float virtRotZ; - -float headPosX; -float headPosY; -float headPosZ; - -float headRotX; -float headRotY; -float headRotZ; - - // - // Scale the Raw measurements to the client measurements. - // - headRotX = getRadsFromDegrees(rawheadpose[Pitch]); - headRotY = getRadsFromDegrees(rawheadpose[Yaw]); - headRotZ = getRadsFromDegrees(rawheadpose[Roll]); - headPosX = rawheadpose[TX] * 10; - headPosY = rawheadpose[TY] * 10; - headPosZ = rawheadpose[TZ] * 10; - - virtRotX = getRadsFromDegrees(headpose[Pitch]); - virtRotY = getRadsFromDegrees(headpose[Yaw]); - virtRotZ = getRadsFromDegrees(headpose[Roll]); - virtPosX = headpose[TX] * 10; - virtPosY = headpose[TY] * 10; - virtPosZ = headpose[TZ] * 10; +void FTNoIR_Protocol::sendHeadposeToGame(const double* headpose) { + float virtPosX; + float virtPosY; + float virtPosZ; + + float virtRotX; + float virtRotY; + float virtRotZ; + + float headPosX; + float headPosY; + float headPosZ; + + float headRotX; + float headRotY; + float headRotZ; + headRotX = virtRotX = getRadsFromDegrees(headpose[Pitch]); + headRotY = virtRotY = getRadsFromDegrees(headpose[Yaw]); + headRotZ = virtRotZ = getRadsFromDegrees(headpose[Roll]); + headPosX = virtPosX = headpose[TX] * 10; + headPosY = virtPosY = headpose[TY] * 10; + headPosZ = virtPosZ = headpose[TZ] * 10; shm.lock(); diff --git a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp index 8601bdfd..64e010a8 100644 --- a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp +++ b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp @@ -58,7 +58,7 @@ void FTNoIR_Protocol::loadSettings() { // // Update Headpose in Game. // -void FTNoIR_Protocol::sendHeadposeToGame(double *headpose, double *rawheadpose ) { +void FTNoIR_Protocol::sendHeadposeToGame(const double *headpose ) { float fMouse_X = 0; float fMouse_Y = 0; diff --git a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h index 5aad9c01..1eb80b12 100644 --- a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h +++ b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h @@ -60,7 +60,7 @@ public: FTNoIR_Protocol(); ~FTNoIR_Protocol(); bool checkServerInstallationOK(); - void sendHeadposeToGame( double *headpose, double *rawheadpose ); + void sendHeadposeToGame( const double *headpose); QString getGameName() { return "Mouse tracker"; } diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index ca07fbf6..8a60f8fb 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -82,7 +82,7 @@ void FTNoIR_Protocol::loadSettings() { // // Update Headpose in Game. // -void FTNoIR_Protocol::sendHeadposeToGame( double *headpose, double *rawheadpose ) { +void FTNoIR_Protocol::sendHeadposeToGame( const double *headpose ) { PDWORD_PTR MsgResult = 0; diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.h b/ftnoir_protocol_sc/ftnoir_protocol_sc.h index b24eb0cf..9ac56b30 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.h +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.h @@ -83,7 +83,7 @@ public: FTNoIR_Protocol(); ~FTNoIR_Protocol(); bool checkServerInstallationOK(); - void sendHeadposeToGame( double *headpose, double *rawheadpose ); + void sendHeadposeToGame(const double* headpose); QString getGameName() { return "FS2004/FSX"; } diff --git a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp index 50a7bf97..76767c3b 100644 --- a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp +++ b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp @@ -14,7 +14,7 @@ FTNoIR_Protocol::~FTNoIR_Protocol() VJoy_Shutdown(); } -void FTNoIR_Protocol::sendHeadposeToGame( double *headpose, double *rawheadpose ) { +void FTNoIR_Protocol::sendHeadposeToGame( const double *headpose ) { JOYSTICK_STATE state[2] = { 0 }; state[0].XAxis = std::min<int>(VJOY_AXIS_MAX, std::max<int>(VJOY_AXIS_MIN, headpose[Yaw] * VJOY_AXIS_MAX / 180.0)); diff --git a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h index 5a1d30fb..2fe53669 100644 --- a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h +++ b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h @@ -46,7 +46,7 @@ public: bool checkServerInstallationOK() { return true; } - void sendHeadposeToGame( double *headpose, double *rawheadpose ); + void sendHeadposeToGame( const double *headpose ); QString getGameName() { return "Virtual joystick"; } |