Remove BSP support
This commit is contained in:
parent
65f6f0259e
commit
2c82f8d4b0
@ -40,7 +40,6 @@ source/Irrlicht/CVideoModeList.cpp
|
||||
source/Irrlicht/CDefaultGUIElementFactory.cpp
|
||||
source/Irrlicht/CCubeSceneNode.cpp
|
||||
source/Irrlicht/CGUIMeshViewer.cpp
|
||||
source/Irrlicht/CBSPMeshFileLoader.cpp
|
||||
source/Irrlicht/CParticleSphereEmitter.cpp
|
||||
source/Irrlicht/CParticleAnimatedMeshSceneNodeEmitter.cpp
|
||||
source/Irrlicht/CGUITabControl.cpp
|
||||
@ -211,7 +210,6 @@ source/Irrlicht/Octree.h
|
||||
source/Irrlicht/os.h
|
||||
source/Irrlicht/CDefaultGUIElementFactory.h
|
||||
source/Irrlicht/CSceneNodeAnimatorFlyCircle.h
|
||||
source/Irrlicht/CBSPMeshFileLoader.h
|
||||
source/Irrlicht/CTriangleBBSelector.h
|
||||
source/Irrlicht/S2DVertex.h
|
||||
source/Irrlicht/CDefaultSceneNodeAnimatorFactory.h
|
||||
|
@ -317,11 +317,6 @@ B3D, MS3D or X meshes */
|
||||
#ifdef NO_IRR_COMPILE_WITH_MD3_LOADER_
|
||||
#undef _IRR_COMPILE_WITH_MD3_LOADER_
|
||||
#endif
|
||||
//! Define _IRR_COMPILE_WITH_BSP_LOADER_ if you want to load Quake 3 BSP files
|
||||
#define _IRR_COMPILE_WITH_BSP_LOADER_
|
||||
#ifdef NO_IRR_COMPILE_WITH_BSP_LOADER_
|
||||
#undef _IRR_COMPILE_WITH_BSP_LOADER_
|
||||
#endif
|
||||
//! Define _IRR_COMPILE_WITH_OBJ_LOADER_ if you want to load Wavefront OBJ files
|
||||
#define _IRR_COMPILE_WITH_OBJ_LOADER_
|
||||
#ifdef NO_IRR_COMPILE_WITH_OBJ_LOADER_
|
||||
|
@ -1,107 +0,0 @@
|
||||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#include "IrrCompileConfig.h"
|
||||
#ifdef _IRR_COMPILE_WITH_BSP_LOADER_
|
||||
|
||||
#include "CBSPMeshFileLoader.h"
|
||||
#include "CQ3LevelMesh.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace scene
|
||||
{
|
||||
|
||||
//! Constructor
|
||||
CBSPMeshFileLoader::CBSPMeshFileLoader(scene::ISceneManager* smgr,
|
||||
io::IFileSystem* fs)
|
||||
: FileSystem(fs), SceneManager(smgr)
|
||||
{
|
||||
|
||||
#ifdef _DEBUG
|
||||
setDebugName("CBSPMeshFileLoader");
|
||||
#endif
|
||||
|
||||
if (FileSystem)
|
||||
FileSystem->grab();
|
||||
}
|
||||
|
||||
|
||||
//! destructor
|
||||
CBSPMeshFileLoader::~CBSPMeshFileLoader()
|
||||
{
|
||||
if (FileSystem)
|
||||
FileSystem->drop();
|
||||
}
|
||||
|
||||
|
||||
//! returns true if the file maybe is able to be loaded by this class
|
||||
//! based on the file extension (e.g. ".bsp")
|
||||
bool CBSPMeshFileLoader::isALoadableFileExtension(const io::path& filename) const
|
||||
{
|
||||
return core::hasFileExtension ( filename, "bsp", "shader", "cfg" );
|
||||
}
|
||||
|
||||
|
||||
//! creates/loads an animated mesh from the file.
|
||||
//! \return Pointer to the created mesh. Returns 0 if loading failed.
|
||||
//! If you no longer need the mesh, you should call IAnimatedMesh::drop().
|
||||
//! See IReferenceCounted::drop() for more information.
|
||||
IAnimatedMesh* CBSPMeshFileLoader::createMesh(io::IReadFile* file)
|
||||
{
|
||||
s32 type = core::isFileExtension ( file->getFileName(), "bsp", "shader", "cfg" );
|
||||
CQ3LevelMesh* q = 0;
|
||||
|
||||
switch ( type )
|
||||
{
|
||||
case 1:
|
||||
q = new CQ3LevelMesh(FileSystem, SceneManager, LoadParam);
|
||||
|
||||
// determine real shaders in LoadParam
|
||||
if ( 0 == LoadParam.loadAllShaders )
|
||||
{
|
||||
q->getShader("scripts/common.shader");
|
||||
q->getShader("scripts/sfx.shader");
|
||||
q->getShader("scripts/gfx.shader");
|
||||
q->getShader("scripts/liquid.shader");
|
||||
q->getShader("scripts/models.shader");
|
||||
q->getShader("scripts/walls.shader");
|
||||
//q->getShader("scripts/sky.shader");
|
||||
}
|
||||
|
||||
if ( q->loadFile(file) )
|
||||
return q;
|
||||
|
||||
q->drop();
|
||||
break;
|
||||
|
||||
case 2:
|
||||
q = new CQ3LevelMesh(FileSystem, SceneManager,LoadParam);
|
||||
q->getShader( file );
|
||||
return q;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
// load quake 3 loading parameter
|
||||
if ( file->getFileName() == "levelparameter.cfg" )
|
||||
{
|
||||
file->read ( &LoadParam, sizeof ( LoadParam ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
q = new CQ3LevelMesh(FileSystem, SceneManager,LoadParam);
|
||||
q->getConfiguration( file );
|
||||
return q;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // end namespace scene
|
||||
} // end namespace irr
|
||||
|
||||
#endif // _IRR_COMPILE_WITH_BSP_LOADER_
|
||||
|
@ -1,52 +0,0 @@
|
||||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __C_BSP_MESH_FILE_LOADER_H_INCLUDED__
|
||||
#define __C_BSP_MESH_FILE_LOADER_H_INCLUDED__
|
||||
|
||||
#include "IMeshLoader.h"
|
||||
#include "IFileSystem.h"
|
||||
#include "IVideoDriver.h"
|
||||
#include "ISceneManager.h"
|
||||
#include "IQ3Shader.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace scene
|
||||
{
|
||||
|
||||
//! Meshloader capable of loading Quake 3 BSP files and shaders
|
||||
class CBSPMeshFileLoader : public IMeshLoader
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CBSPMeshFileLoader(scene::ISceneManager* smgr, io::IFileSystem* fs);
|
||||
|
||||
//! destructor
|
||||
virtual ~CBSPMeshFileLoader();
|
||||
|
||||
//! returns true if the file maybe is able to be loaded by this class
|
||||
//! based on the file extension (e.g. ".bsp")
|
||||
virtual bool isALoadableFileExtension(const io::path& filename) const;
|
||||
|
||||
//! creates/loads an animated mesh from the file.
|
||||
//! \return Pointer to the created mesh. Returns 0 if loading failed.
|
||||
//! If you no longer need the mesh, you should call IAnimatedMesh::drop().
|
||||
//! See IReferenceCounted::drop() for more information.
|
||||
virtual IAnimatedMesh* createMesh(io::IReadFile* file);
|
||||
|
||||
private:
|
||||
|
||||
io::IFileSystem* FileSystem;
|
||||
scene::ISceneManager* SceneManager;
|
||||
|
||||
quake3::Q3LevelLoadParameter LoadParam;
|
||||
};
|
||||
|
||||
} // end namespace scene
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
||||
|
@ -28,10 +28,6 @@
|
||||
#include "CIrrMeshFileLoader.h"
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_BSP_LOADER_
|
||||
#include "CBSPMeshFileLoader.h"
|
||||
#endif
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_MD2_LOADER_
|
||||
#include "CMD2MeshFileLoader.h"
|
||||
#endif
|
||||
@ -208,9 +204,6 @@ CSceneManager::CSceneManager(video::IVideoDriver* driver, io::IFileSystem* fs,
|
||||
#ifdef _IRR_COMPILE_WITH_IRR_MESH_LOADER_
|
||||
MeshLoaderList.push_back(new CIrrMeshFileLoader(this, FileSystem));
|
||||
#endif
|
||||
#ifdef _IRR_COMPILE_WITH_BSP_LOADER_
|
||||
MeshLoaderList.push_back(new CBSPMeshFileLoader(this, FileSystem));
|
||||
#endif
|
||||
#ifdef _IRR_COMPILE_WITH_3DS_LOADER_
|
||||
MeshLoaderList.push_back(new C3DSMeshFileLoader(this, FileSystem));
|
||||
#endif
|
||||
@ -456,22 +449,7 @@ IMeshSceneNode* CSceneManager::addQuake3SceneNode(const IMeshBuffer* meshBuffer,
|
||||
const quake3::IShader * shader,
|
||||
ISceneNode* parent, s32 id )
|
||||
{
|
||||
#ifdef _IRR_COMPILE_WITH_BSP_LOADER_
|
||||
if (!shader)
|
||||
return 0;
|
||||
|
||||
if (!parent)
|
||||
parent = this;
|
||||
|
||||
CQuake3ShaderSceneNode* node = new CQuake3ShaderSceneNode( parent,
|
||||
this, id, FileSystem,
|
||||
meshBuffer, shader );
|
||||
node->drop();
|
||||
|
||||
return node;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user