Fix FCollada compile issues on Windows

This commit is contained in:
rdb 2015-02-27 14:18:17 +01:00
parent db87bc7914
commit 413162110b
4 changed files with 10 additions and 3 deletions

View File

@ -320,7 +320,7 @@ build_table(EggTable *parent, FCDSceneNode* node, const pset<float> &keys) {
} }
// Quantize the FPS, otherwise Panda complains about FPS mismatches. // Quantize the FPS, otherwise Panda complains about FPS mismatches.
float fps = round(((keys.size() - 1) / timing_total) * 100) * 0.01f; float fps = cfloor(((keys.size() - 1) / timing_total) * 100 + 0.5f) * 0.01f;
xform->set_fps(fps); xform->set_fps(fps);
// Loop through the children joints // Loop through the children joints

View File

@ -45,7 +45,7 @@ public:
_bind_pose(LMatrix4d::ident_mat()) {} _bind_pose(LMatrix4d::ident_mat()) {}
LMatrix4d _bind_pose; LMatrix4d _bind_pose;
const PT(EggGroup) _group; PT(EggGroup) _group;
const FCDSceneNode *_scene_node; const FCDSceneNode *_scene_node;
DaeCharacter *_character; DaeCharacter *_character;
}; };

View File

@ -228,7 +228,7 @@ convert_file(const Filename &filename) {
Characters::iterator it; Characters::iterator it;
DaeCharacter *character; DaeCharacter *character;
for (it = _characters.begin(); it != _characters.end(); ++it) { for (it = _characters.begin(); it != _characters.end(); ++it) {
DaeCharacter *character = *it; character = *it;
// Collect key frame timings. // Collect key frame timings.
if (get_animation_convert() == AC_both || if (get_animation_convert() == AC_both ||

View File

@ -22,6 +22,13 @@
#error You must include pre_fcollada_include.h before including FCollada.h! #error You must include pre_fcollada_include.h before including FCollada.h!
#endif #endif
#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
#include <winsock2.h>
#endif
// FCollada expects LINUX to be defined on linux // FCollada expects LINUX to be defined on linux
#ifdef IS_LINUX #ifdef IS_LINUX
#ifndef LINUX #ifndef LINUX