Merge branch 'master' into master
commit
41e594f7b1
|
@ -30,6 +30,9 @@ env:
|
||||||
- secure: "lZ7pHQvl5dpZWzBQAaIMf0wqrvtcZ4wiZKeIZjf83TEsflW8+z0uTpIuN30ZV6Glth/Sq1OhLnTP5+N57fZU/1ebA5twHdvP4bS5CIUUg71/CXQZNl36xeaqvxsG/xRrdpKOsPdjAOsQ9KPTQulsX43XDLS7CasMiLvYOpqKcPc="
|
- secure: "lZ7pHQvl5dpZWzBQAaIMf0wqrvtcZ4wiZKeIZjf83TEsflW8+z0uTpIuN30ZV6Glth/Sq1OhLnTP5+N57fZU/1ebA5twHdvP4bS5CIUUg71/CXQZNl36xeaqvxsG/xRrdpKOsPdjAOsQ9KPTQulsX43XDLS7CasMiLvYOpqKcPc="
|
||||||
- PV=r8e PLATF=linux-x86_64 NDK_HOME=${TRAVIS_BUILD_DIR}/android-ndk-${PV} PATH=${PATH}:${NDK_HOME}
|
- PV=r8e PLATF=linux-x86_64 NDK_HOME=${TRAVIS_BUILD_DIR}/android-ndk-${PV} PATH=${PATH}:${NDK_HOME}
|
||||||
|
|
||||||
|
git:
|
||||||
|
depth: 1
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: linux
|
- os: linux
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
# clone directory
|
# clone directory
|
||||||
clone_folder: c:\projects\assimp
|
clone_folder: c:\projects\assimp
|
||||||
|
|
||||||
|
clone_depth: 1
|
||||||
|
|
||||||
# branches to build
|
# branches to build
|
||||||
branches:
|
branches:
|
||||||
# whitelist
|
# whitelist
|
||||||
|
@ -52,11 +54,11 @@ cache:
|
||||||
- bin\.mtime_cache
|
- bin\.mtime_cache
|
||||||
|
|
||||||
before_build:
|
before_build:
|
||||||
|
- echo NUMBER_OF_PROCESSORS=%NUMBER_OF_PROCESSORS%
|
||||||
- ruby scripts\AppVeyor\mtime_cache -g scripts\AppVeyor\cacheglobs.txt -c bin\.mtime_cache\cache.json
|
- ruby scripts\AppVeyor\mtime_cache -g scripts\AppVeyor\cacheglobs.txt -c bin\.mtime_cache\cache.json
|
||||||
|
|
||||||
build:
|
build_script:
|
||||||
parallel: true
|
cmake --build . --config Release -- /maxcpucount:2
|
||||||
project: Assimp.sln
|
|
||||||
|
|
||||||
after_build:
|
after_build:
|
||||||
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" (
|
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" (
|
||||||
|
|
|
@ -179,12 +179,23 @@ void MDLImporter::InternReadFile( const std::string& pFile,
|
||||||
}
|
}
|
||||||
|
|
||||||
// This should work for all other types of MDL files, too ...
|
// This should work for all other types of MDL files, too ...
|
||||||
// the quake header is one of the smallest, afaik
|
// the HL1 sequence group header is one of the smallest, afaik
|
||||||
iFileSize = (unsigned int)file->FileSize();
|
iFileSize = (unsigned int)file->FileSize();
|
||||||
if( iFileSize < sizeof(MDL::Header)) {
|
if( iFileSize < sizeof(MDL::HalfLife::SequenceHeader_HL1)) {
|
||||||
throw DeadlyImportError( "MDL File is too small.");
|
throw DeadlyImportError( "MDL File is too small.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// delete the file buffer and cleanup.
|
||||||
|
auto DeleteBufferAndCleanup = [&]() {
|
||||||
|
if (mBuffer) {
|
||||||
|
delete [] mBuffer;
|
||||||
|
mBuffer = nullptr;
|
||||||
|
}
|
||||||
|
AI_DEBUG_INVALIDATE_PTR(pIOHandler);
|
||||||
|
AI_DEBUG_INVALIDATE_PTR(pScene);
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
// Allocate storage and copy the contents of the file to a memory buffer
|
// Allocate storage and copy the contents of the file to a memory buffer
|
||||||
mBuffer = new unsigned char[iFileSize+1];
|
mBuffer = new unsigned char[iFileSize+1];
|
||||||
file->Read( (void*)mBuffer, 1, iFileSize);
|
file->Read( (void*)mBuffer, 1, iFileSize);
|
||||||
|
@ -261,11 +272,11 @@ void MDLImporter::InternReadFile( const std::string& pFile,
|
||||||
pScene->mRootNode->mTransformation = aiMatrix4x4(1.f,0.f,0.f,0.f,
|
pScene->mRootNode->mTransformation = aiMatrix4x4(1.f,0.f,0.f,0.f,
|
||||||
0.f,0.f,1.f,0.f,0.f,-1.f,0.f,0.f,0.f,0.f,0.f,1.f);
|
0.f,0.f,1.f,0.f,0.f,-1.f,0.f,0.f,0.f,0.f,0.f,1.f);
|
||||||
|
|
||||||
// delete the file buffer and cleanup
|
DeleteBufferAndCleanup();
|
||||||
delete [] mBuffer;
|
} catch(...) {
|
||||||
mBuffer= nullptr;
|
DeleteBufferAndCleanup();
|
||||||
AI_DEBUG_INVALIDATE_PTR(pIOHandler);
|
throw;
|
||||||
AI_DEBUG_INVALIDATE_PTR(pScene);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue