diff --git a/code/ImporterRegistry.cpp b/code/ImporterRegistry.cpp index bc0e59f56..e301804e2 100644 --- a/code/ImporterRegistry.cpp +++ b/code/ImporterRegistry.cpp @@ -140,7 +140,7 @@ corresponding preprocessor flag to selectively disable formats. # include "LWSLoader.h" #endif #ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER -# include "OgreImporter.hpp" +# include "OgreImporter.h" #endif #ifndef ASSIMP_BUILD_NO_MS3D_IMPORTER # include "MS3DLoader.h" diff --git a/code/OgreImporter.cpp b/code/OgreImporter.cpp index bcc49c9ea..c67cf4998 100644 --- a/code/OgreImporter.cpp +++ b/code/OgreImporter.cpp @@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -#include "OgreImporter.hpp" +#include "OgreImporter.h" #include "TinyFormatter.h" #include "irrXMLWrapper.h" @@ -74,7 +74,8 @@ bool OgreImporter::CanRead(const std::string &pFile, Assimp::IOSystem *pIOHandle { string ext = "mesh.xml"; int len = ext.length(); - return (ASSIMP_stricmp(pFile.substr(pFile.length()-len, len), ext) == 0); + string fileExt = ToLower(pFile.substr(pFile.length()-len, len)); + return (ASSIMP_stricmp(fileExt, ext) == 0); } const char* tokens[] = {""}; return BaseImporter::SearchFileHeaderForToken(pIOHandler, pFile, tokens, 1); diff --git a/code/OgreImporter.h b/code/OgreImporter.h index d41e77230..27d03b85d 100644 --- a/code/OgreImporter.h +++ b/code/OgreImporter.h @@ -1,4 +1,9 @@ +#ifndef AI_OGREIMPORTER_H_INC +#define AI_OGREIMPORTER_H_INC + +#ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER + #include "BaseImporter.h" #include "irrXMLWrapper.h" #include "OgreParsingUtils.h" @@ -224,3 +229,6 @@ struct Animation }//namespace Ogre }//namespace Assimp + +#endif // ASSIMP_BUILD_NO_OGRE_IMPORTER +#endif // AI_OGREIMPORTER_H_INC diff --git a/code/OgreMesh.cpp b/code/OgreMesh.cpp index bd67d3add..c5d8e822e 100644 --- a/code/OgreMesh.cpp +++ b/code/OgreMesh.cpp @@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER -#include "OgreImporter.hpp" +#include "OgreImporter.h" #include "TinyFormatter.h" using namespace std; diff --git a/code/OgreParsingUtils.h b/code/OgreParsingUtils.h index d287f451b..a6a8faa8e 100644 --- a/code/OgreParsingUtils.h +++ b/code/OgreParsingUtils.h @@ -1,4 +1,9 @@ +#ifndef AI_OGREPARSINGUTILS_H_INC +#define AI_OGREPARSINGUTILS_H_INC + +#ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER + #include "ParsingUtils.h" #include "irrXMLWrapper.h" #include "fast_atof.h" @@ -143,3 +148,6 @@ static inline std::string &Trim(std::string &s, bool newlines = true) } // Ogre } // Assimp + +#endif // ASSIMP_BUILD_NO_OGRE_IMPORTER +#endif // AI_OGREPARSINGUTILS_H_INC diff --git a/code/OgreSkeleton.cpp b/code/OgreSkeleton.cpp index f231cc465..fe247afe5 100644 --- a/code/OgreSkeleton.cpp +++ b/code/OgreSkeleton.cpp @@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER -#include "OgreImporter.hpp" +#include "OgreImporter.h" #include "TinyFormatter.h" using namespace std;