Explorar el Código

- manually pulled the three smaller change requests from Github.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1331 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
ulfjorensen hace 13 años
padre
commit
81aef90f4a
Se han modificado 3 ficheros con 7 adiciones y 6 borrados
  1. 1 1
      CMakeLists.txt
  2. 5 4
      code/Q3BSPFileImporter.cpp
  3. 1 1
      include/assimp/types.h

+ 1 - 1
CMakeLists.txt

@@ -82,7 +82,7 @@ ELSE ( ASSIMP_ENABLE_BOOST_WORKAROUND )
 		MESSAGE( FATAL_ERROR
 		MESSAGE( FATAL_ERROR
 			"Boost libraries (http://www.boost.org/) not found. "
 			"Boost libraries (http://www.boost.org/) not found. "
 			"You can build a non-boost version of Assimp with slightly reduced "
 			"You can build a non-boost version of Assimp with slightly reduced "
-			"functionality by specifying -DENABLE_BOOST_WORKAROUND=ON."
+      "functionality by specifying -DASSIMP_ENABLE_BOOST_WORKAROUND=ON."
 		)
 		)
 	ENDIF ( NOT Boost_FOUND )
 	ENDIF ( NOT Boost_FOUND )
 
 

+ 5 - 4
code/Q3BSPFileImporter.cpp

@@ -640,6 +640,7 @@ bool Q3BSPFileImporter::importTextureFromArchive( const Q3BSP::Q3BSPModel *pMode
 	std::vector<std::string> supportedExtensions;
 	std::vector<std::string> supportedExtensions;
 	supportedExtensions.push_back( ".jpg" );
 	supportedExtensions.push_back( ".jpg" );
 	supportedExtensions.push_back( ".png" );
 	supportedExtensions.push_back( ".png" );
+  supportedExtensions.push_back( ".tga" );
 	if ( NULL == pArchive || NULL == pArchive || NULL == pMatHelper )
 	if ( NULL == pArchive || NULL == pArchive || NULL == pMatHelper )
 	{
 	{
 		return false;
 		return false;
@@ -670,10 +671,10 @@ bool Q3BSPFileImporter::importTextureFromArchive( const Q3BSP::Q3BSPModel *pMode
 			(void)readSize;
 			(void)readSize;
 			ai_assert( readSize == pTexture->mWidth );
 			ai_assert( readSize == pTexture->mWidth );
 			pTexture->pcData = reinterpret_cast<aiTexel*>( pData );
 			pTexture->pcData = reinterpret_cast<aiTexel*>( pData );
-			pTexture->achFormatHint[ 0 ] = ext[ 0 ];
-			pTexture->achFormatHint[ 1 ] = ext[ 1 ];
-			pTexture->achFormatHint[ 2 ] = ext[ 2 ];
-			pTexture->achFormatHint[ 2 ] = '\0';
+			pTexture->achFormatHint[ 0 ] = ext[ 1 ];
+			pTexture->achFormatHint[ 1 ] = ext[ 2 ];
+			pTexture->achFormatHint[ 2 ] = ext[ 3 ];
+			pTexture->achFormatHint[ 3 ] = '\0';
 			res = true;
 			res = true;
 
 
 			aiString name;
 			aiString name;

+ 1 - 1
include/assimp/types.h

@@ -314,7 +314,7 @@ struct aiString
 
 
 	/** Append a string to the string */
 	/** Append a string to the string */
 	void Append (const char* app)	{
 	void Append (const char* app)	{
-		const size_t len = strlen(app);
+		const size_t len = ::strlen(app);
 		if (!len) {
 		if (!len) {
 			return;
 			return;
 		}
 		}