diff -Nur a/trunk/libraries/source/fcollada/src/FCollada/FCDocument/FCDGeometryPolygonsTools.cpp b/trunk/libraries/source/fcollada/src/FCollada/FCDocument/FCDGeometryPolygonsTools.cpp
a
|
b
|
|
910 | 910 | # pragma warning(disable : 4127) // conditional expression constant |
911 | 911 | # pragma warning(disable : 4244) // conversion from 'const float' to 'uint8' |
912 | 912 | #endif |
913 | | |
| 913 | |
914 | 914 | #define INVALID_VTX_IDX (uint16(~0)) // This value is the default (invalid) value in the vtx data map |
915 | 915 | |
916 | 916 | template<class VAL, bool translateValue, bool isColor> |
… |
… |
|
1032 | 1032 | |
1033 | 1033 | void RevertUniqueIndices(const FCDGeometryPolygonsInput& inPInput, FCDGeometryPolygonsInput& outPInput, const FCDGeometryIndexTranslationMap& translationMap) |
1034 | 1034 | { |
1035 | | FUFail("NOT_TESTED"); |
| 1035 | FUFail() //NOT TESTED |
1036 | 1036 | size_t tmSize = translationMap.size(); |
1037 | 1037 | uint32 largest = 0; |
1038 | 1038 | for (FCDGeometryIndexTranslationMap::const_iterator it = translationMap.begin(), itEnd = translationMap.end(); it != itEnd; ++it) |
diff -Nur a/trunk/libraries/source/fcollada/src/FCollada/FCDocument/FCDLibrary.cpp b/trunk/libraries/source/fcollada/src/FCollada/FCDocument/FCDLibrary.cpp
a
|
b
|
|
138 | 138 | bool b = l1->IsEmpty(); |
139 | 139 | if (b) { ptr = l1->FindDaeId(emptyCharString); } |
140 | 140 | ptr = l1->GetEntity(23); |
141 | | const T* cptr = ((const FCDLibrary<T>*)l1)->GetEntity(0); |
142 | | cptr = ptr; |
| 141 | ((const FCDLibrary<T>*)l1)->GetEntity(0); |
143 | 142 | FCDAsset* asset = l1->GetAsset(); |
144 | 143 | asset->SetFlag(11); |
145 | 144 | } |
diff -Nur a/trunk/libraries/source/fcollada/src/FCollada/FUtils/FUDebug.cpp b/trunk/libraries/source/fcollada/src/FCollada/FUtils/FUDebug.cpp
a
|
b
|
|
6 | 6 | MIT License: http://www.opensource.org/licenses/mit-license.php |
7 | 7 | */ |
8 | 8 | |
| 9 | #define __STDC_FORMAT_MACROS |
| 10 | #include <inttypes.h> |
| 11 | |
9 | 12 | #include "StdAfx.h" |
10 | 13 | #include "FUDebug.h" |
11 | 14 | #include "FULogFile.h" |
… |
… |
|
70 | 73 | void FUDebug::DebugOutV(uint8 verbosity, const char* filename, uint32 line, const char* message, va_list& vars) |
71 | 74 | { |
72 | 75 | char buffer[256]; |
73 | | snprintf(buffer, 256, "[%s@%lu] ", filename, line); |
| 76 | snprintf(buffer, 256, "[%s@%" PRIu32 "] ", filename, line); |
74 | 77 | buffer[255] = 0; |
75 | 78 | DebugString(buffer); |
76 | 79 | |
diff -Nur a/trunk/libraries/source/fcollada/src/FCollada/FUtils/FUFileManager.cpp b/trunk/libraries/source/fcollada/src/FCollada/FUtils/FUFileManager.cpp
a
|
b
|
|
93 | 93 | #else |
94 | 94 | // Push on the stack the original root path |
95 | 95 | char fullPath[MAX_PATH]; |
96 | | _getcwd(fullPath, MAX_PATH); |
97 | | size_t length = strlen(fullPath); |
98 | | if (length < MAX_PATH - 2 && fullPath[length-1] != '/' && fullPath[length-1] != '\\') |
| 96 | if (_getcwd(fullPath, MAX_PATH)) |
99 | 97 | { |
100 | | fullPath[length] = '/'; |
101 | | fullPath[length + 1] = 0; |
| 98 | size_t length = strlen(fullPath); |
| 99 | if (length < MAX_PATH - 2 && fullPath[length-1] != '/' && fullPath[length-1] != '\\') |
| 100 | { |
| 101 | fullPath[length] = '/'; |
| 102 | fullPath[length + 1] = 0; |
| 103 | } |
| 104 | pathStack.push_back(TO_FSTRING((const char*) fullPath)); |
102 | 105 | } |
103 | | pathStack.push_back(TO_FSTRING((const char*) fullPath)); |
104 | 106 | #endif // __PPU__ |
105 | 107 | |
106 | 108 | forceAbsolute = false; |
diff -Nur a/trunk/libraries/source/fcollada/src/FCollada/FUtils/FUStringConversion.cpp b/trunk/libraries/source/fcollada/src/FCollada/FUtils/FUStringConversion.cpp
a
|
b
|
|
275 | 275 | FUStringBuilder fbuilder; |
276 | 276 | const char* c = emptyCharString; |
277 | 277 | const fchar* fc = emptyFCharString; |
278 | | float f = FUStringConversion::ToFloat(&c); |
279 | | f = FUStringConversion::ToFloat(&fc); |
280 | | bool b = FUStringConversion::ToBoolean(c); |
281 | | b = FUStringConversion::ToBoolean(fc); |
282 | | int32 i32 = FUStringConversion::ToInt32(&c); |
283 | | i32 = FUStringConversion::ToInt32(&fc); |
284 | | uint32 u32 = FUStringConversion::ToUInt32(&c); |
285 | | u32 = FUStringConversion::ToUInt32(&fc); |
286 | | u32 = FUStringConversion::HexToUInt32(&c); |
287 | | u32 = FUStringConversion::HexToUInt32(&fc); |
| 278 | FUStringConversion::ToFloat(&c); |
| 279 | FUStringConversion::ToFloat(&fc); |
| 280 | FUStringConversion::ToBoolean(c); |
| 281 | FUStringConversion::ToBoolean(fc); |
| 282 | FUStringConversion::ToInt32(&c); |
| 283 | FUStringConversion::ToInt32(&fc); |
| 284 | FUStringConversion::ToUInt32(&c); |
| 285 | FUStringConversion::ToUInt32(&fc); |
| 286 | FUStringConversion::HexToUInt32(&c); |
| 287 | FUStringConversion::HexToUInt32(&fc); |
288 | 288 | FMMatrix44 m44; |
289 | 289 | FUStringConversion::ToMatrix(&c, m44); |
290 | 290 | FUStringConversion::ToMatrix(&fc, m44); |
diff -Nur a/trunk/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.cpp b/trunk/libraries/source/fcollada/src/FColladaPlugins/FArchiveXML/FArchiveXML.cpp
a
|
b
|
|
418 | 418 | { |
419 | 419 | fcdocument->SetFileUrl(fstring(filePath)); |
420 | 420 | |
421 | | fm::string textBuffer; |
422 | | const xmlChar* text = (const xmlChar*) contents; |
423 | | if (length != 0) |
424 | | { |
425 | | textBuffer = fm::string((const char*)contents, length); |
426 | | text = (const xmlChar*) textBuffer.c_str(); |
427 | | } |
428 | | |
429 | 421 | // Parse the document into a XML tree |
430 | 422 | FUXmlDocument daeDocument((const char*) contents, length); |
431 | 423 | xmlNode* rootNode = daeDocument.GetRootNode(); |
… |
… |
|
523 | 515 | xmlOutputBufferPtr buf = xmlAllocOutputBuffer(NULL); |
524 | 516 | xmlNodeDumpOutput(buf, rootNode->doc, rootNode, 0, 0, NULL); |
525 | 517 | |
526 | | #ifdef LIBXML2_NEW_BUFFER |
527 | | outData.resize(xmlOutputBufferGetSize(buf) * sizeof(xmlChar)); |
528 | | memcpy(outData.begin(), xmlOutputBufferGetContent(buf), outData.size()); |
529 | | #else |
530 | | outData.resize(buf->buffer->use * sizeof(xmlChar)); |
531 | | memcpy(outData.begin(), buf->buffer->content, outData.size()); |
532 | | #endif |
| 518 | #ifdef LIBXML2_NEW_BUFFER |
| 519 | outData.resize(xmlOutputBufferGetSize(buf) * sizeof(xmlChar)); |
| 520 | memcpy(outData.begin(), xmlOutputBufferGetContent(buf), outData.size()); |
| 521 | #else |
| 522 | outData.resize(buf->buffer->use * sizeof(xmlChar)); |
| 523 | memcpy(outData.begin(), buf->buffer->content, outData.size()); |
| 524 | #endif |
533 | 525 | |
534 | 526 | xmlOutputBufferClose(buf); |
535 | 527 | daeDocument.ReleaseXmlData(); |