mirror of
https://github.com/minetest/irrlicht.git
synced 2024-12-25 23:47:30 +01:00
Drop unused dependency on FileSystem in mesh loaders
This commit is contained in:
parent
25a7074c9a
commit
5a1565072a
@ -24,23 +24,18 @@ namespace scene
|
||||
#endif
|
||||
|
||||
//! Constructor
|
||||
COBJMeshFileLoader::COBJMeshFileLoader(scene::ISceneManager* smgr, io::IFileSystem* fs)
|
||||
: SceneManager(smgr), FileSystem(fs)
|
||||
COBJMeshFileLoader::COBJMeshFileLoader(scene::ISceneManager* smgr)
|
||||
: SceneManager(smgr)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
setDebugName("COBJMeshFileLoader");
|
||||
#endif
|
||||
|
||||
if (FileSystem)
|
||||
FileSystem->grab();
|
||||
}
|
||||
|
||||
|
||||
//! destructor
|
||||
COBJMeshFileLoader::~COBJMeshFileLoader()
|
||||
{
|
||||
if (FileSystem)
|
||||
FileSystem->drop();
|
||||
}
|
||||
|
||||
|
||||
@ -76,7 +71,6 @@ IAnimatedMesh* COBJMeshFileLoader::createMesh(io::IReadFile* file)
|
||||
u32 smoothingGroup=0;
|
||||
|
||||
const io::path fullName = file->getFileName();
|
||||
const io::path relPath = FileSystem->getFileDir(fullName)+"/";
|
||||
|
||||
c8* buf = new c8[filesize];
|
||||
memset(buf, 0, filesize);
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
#include <map>
|
||||
#include "IMeshLoader.h"
|
||||
#include "IFileSystem.h"
|
||||
#include "ISceneManager.h"
|
||||
#include "irrString.h"
|
||||
#include "SMeshBuffer.h"
|
||||
@ -23,7 +22,7 @@ class COBJMeshFileLoader : public IMeshLoader
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
COBJMeshFileLoader(scene::ISceneManager* smgr, io::IFileSystem* fs);
|
||||
COBJMeshFileLoader(scene::ISceneManager* smgr);
|
||||
|
||||
//! destructor
|
||||
virtual ~COBJMeshFileLoader();
|
||||
@ -104,7 +103,6 @@ private:
|
||||
void cleanUp();
|
||||
|
||||
scene::ISceneManager* SceneManager;
|
||||
io::IFileSystem* FileSystem;
|
||||
|
||||
core::array<SObjMtl*> Materials;
|
||||
};
|
||||
|
@ -79,8 +79,8 @@ CSceneManager::CSceneManager(video::IVideoDriver* driver, io::IFileSystem* fs,
|
||||
// TODO: now that we have multiple scene managers, these should be
|
||||
// shallow copies from the previous manager if there is one.
|
||||
|
||||
MeshLoaderList.push_back(new CXMeshFileLoader(this, FileSystem));
|
||||
MeshLoaderList.push_back(new COBJMeshFileLoader(this, FileSystem));
|
||||
MeshLoaderList.push_back(new CXMeshFileLoader(this));
|
||||
MeshLoaderList.push_back(new COBJMeshFileLoader(this));
|
||||
MeshLoaderList.push_back(new CB3DMeshFileLoader(this));
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "coreutil.h"
|
||||
#include "ISceneManager.h"
|
||||
#include "IVideoDriver.h"
|
||||
#include "IFileSystem.h"
|
||||
#include "IReadFile.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
@ -24,7 +23,7 @@ namespace scene
|
||||
{
|
||||
|
||||
//! Constructor
|
||||
CXMeshFileLoader::CXMeshFileLoader(scene::ISceneManager* smgr, io::IFileSystem* fs)
|
||||
CXMeshFileLoader::CXMeshFileLoader(scene::ISceneManager* smgr)
|
||||
: AnimatedMesh(0), Buffer(0), P(0), End(0), BinaryNumCount(0), Line(0),
|
||||
CurFrame(0), MajorVersion(0), MinorVersion(0), BinaryFormat(false), FloatSize(0)
|
||||
{
|
||||
|
@ -14,7 +14,6 @@ namespace irr
|
||||
{
|
||||
namespace io
|
||||
{
|
||||
class IFileSystem;
|
||||
class IReadFile;
|
||||
} // end namespace io
|
||||
namespace scene
|
||||
@ -27,7 +26,7 @@ class CXMeshFileLoader : public IMeshLoader
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CXMeshFileLoader(scene::ISceneManager* smgr, io::IFileSystem* fs);
|
||||
CXMeshFileLoader(scene::ISceneManager* smgr);
|
||||
|
||||
//! returns true if the file maybe is able to be loaded by this class
|
||||
//! based on the file extension (e.g. ".cob")
|
||||
|
Loading…
Reference in New Issue
Block a user