OgreImporter: Forgot to rebuild after filename changes so broke the build. Fix includes, add include guards and ASSIMP_BUILD_NO_OGRE_IMPORTER to missing places.

pull/266/head
Jonne Nauha 2014-05-01 17:19:03 +03:00
parent fcb97bb595
commit 45715df263
6 changed files with 22 additions and 5 deletions

View File

@ -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"

View File

@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <vector>
#include <sstream>
#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[] = {"<mesh>"};
return BaseImporter::SearchFileHeaderForToken(pIOHandler, pFile, tokens, 1);

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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;