Fixed VS 2012 compilation.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14296 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
489ac88ff1
commit
d157d175e7
@ -64,7 +64,7 @@ void calculate_orientation(struct accel_t* ac, struct vec3b_t* accel, struct ori
|
||||
*/
|
||||
|
||||
/* yaw - set to 0, IR will take care of it if it's enabled */
|
||||
orient->yaw = 0.0f;
|
||||
//orient->yaw = 0.0f;
|
||||
|
||||
/* find out how much it has to move to be 1g */
|
||||
xg = (float)ac->cal_g.x;
|
||||
@ -110,6 +110,12 @@ void calculate_orientation(struct accel_t* ac, struct vec3b_t* accel, struct ori
|
||||
orient->a_pitch = y;
|
||||
}
|
||||
|
||||
if (abs(accel->z - ac->cal_zero.z) <= ac->cal_g.z) {
|
||||
z = RAD_TO_DEGREE(atan2f(x, y));
|
||||
|
||||
orient->yaw = z;
|
||||
}
|
||||
|
||||
/* smooth the angles if enabled */
|
||||
if (smooth) {
|
||||
apply_smoothing(ac, orient, SMOOTH_ROLL);
|
||||
|
@ -201,10 +201,6 @@
|
||||
RelativePath="..\io.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\io_nix.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\ir.c"
|
||||
>
|
||||
@ -233,10 +229,6 @@
|
||||
RelativePath="..\os.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\os_nix.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\os_win.c"
|
||||
>
|
||||
|
@ -102,11 +102,17 @@ typedef uint64_t uint_least64_t;
|
||||
|
||||
// 7.18.1.3 Fastest minimum-width integer types
|
||||
typedef int8_t int_fast8_t;
|
||||
// Redefinition with different type on VS 2012
|
||||
#if (_MSC_VER < 1700)
|
||||
typedef int16_t int_fast16_t;
|
||||
#endif
|
||||
typedef int32_t int_fast32_t;
|
||||
typedef int64_t int_fast64_t;
|
||||
typedef uint8_t uint_fast8_t;
|
||||
// Redefinition with different type on VS 2012
|
||||
#if (_MSC_VER < 1700)
|
||||
typedef uint16_t uint_fast16_t;
|
||||
#endif
|
||||
typedef uint32_t uint_fast32_t;
|
||||
typedef uint64_t uint_fast64_t;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user