Commit b3552d3c authored by hybrid's avatar hybrid

Remove stray whitespace

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3646 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 20b9be8f
...@@ -213,20 +213,20 @@ namespace scene ...@@ -213,20 +213,20 @@ namespace scene
//! holds a associative list of named quaternions //! holds a associative list of named quaternions
struct SMD3QuaternionTagList struct SMD3QuaternionTagList
{ {
SMD3QuaternionTagList () SMD3QuaternionTagList()
{ {
Container.setAllocStrategy ( core::ALLOC_STRATEGY_SAFE ); Container.setAllocStrategy(core::ALLOC_STRATEGY_SAFE);
} }
// construct copy constructor // construct copy constructor
SMD3QuaternionTagList( const SMD3QuaternionTagList & copyMe ) SMD3QuaternionTagList(const SMD3QuaternionTagList& copyMe)
{ {
*this = copyMe; *this = copyMe;
} }
virtual ~SMD3QuaternionTagList () {} virtual ~SMD3QuaternionTagList() {}
SMD3QuaternionTag* get ( const core::stringc& name ) SMD3QuaternionTag* get(const core::stringc& name)
{ {
SMD3QuaternionTag search ( name ); SMD3QuaternionTag search ( name );
s32 index = Container.linear_search ( search ); s32 index = Container.linear_search ( search );
...@@ -240,14 +240,14 @@ namespace scene ...@@ -240,14 +240,14 @@ namespace scene
return Container.size(); return Container.size();
} }
void set_used ( u32 new_size) void set_used(u32 new_size)
{ {
s32 diff = (s32) new_size - (s32) Container.allocated_size (); s32 diff = (s32) new_size - (s32) Container.allocated_size();
if ( diff > 0 ) if ( diff > 0 )
{ {
SMD3QuaternionTag e ( "" ); SMD3QuaternionTag e("");
for ( s32 i = 0; i < diff; ++i ) for ( s32 i = 0; i < diff; ++i )
Container.push_back ( e ); Container.push_back(e);
} }
} }
...@@ -261,9 +261,9 @@ namespace scene ...@@ -261,9 +261,9 @@ namespace scene
return Container[index]; return Container[index];
} }
void push_back ( const SMD3QuaternionTag& other ) void push_back(const SMD3QuaternionTag& other)
{ {
Container.push_back ( other ); Container.push_back(other);
} }
SMD3QuaternionTagList& operator = (const SMD3QuaternionTagList & copyMe) SMD3QuaternionTagList& operator = (const SMD3QuaternionTagList & copyMe)
...@@ -292,7 +292,7 @@ namespace scene ...@@ -292,7 +292,7 @@ namespace scene
} }
core::stringc Name; core::stringc Name;
core::array < SMD3MeshBuffer * > Buffer; core::array<SMD3MeshBuffer*> Buffer;
SMD3QuaternionTagList TagList; SMD3QuaternionTagList TagList;
SMD3Header MD3Header; SMD3Header MD3Header;
}; };
...@@ -304,13 +304,13 @@ namespace scene ...@@ -304,13 +304,13 @@ namespace scene
public: public:
//! tune how many frames you want to render inbetween. //! tune how many frames you want to render inbetween.
virtual void setInterpolationShift ( u32 shift, u32 loopMode ) = 0; virtual void setInterpolationShift(u32 shift, u32 loopMode) =0;
//! get the tag list of the mesh. //! get the tag list of the mesh.
virtual SMD3QuaternionTagList *getTagList(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop) = 0; virtual SMD3QuaternionTagList* getTagList(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop) =0;
//! get the original md3 mesh. //! get the original md3 mesh.
virtual SMD3Mesh * getOriginalMesh () = 0; virtual SMD3Mesh* getOriginalMesh() =0;
}; };
} // end namespace scene } // end namespace scene
......
...@@ -63,7 +63,7 @@ struct SMD3Shader ...@@ -63,7 +63,7 @@ struct SMD3Shader
//! Constructor //! Constructor
CAnimatedMeshMD3::CAnimatedMeshMD3() CAnimatedMeshMD3::CAnimatedMeshMD3()
:Mesh(0), IPolShift(0), LoopMode(0), Scaling(1.f) :Mesh(0), IPolShift(0), LoopMode(0), Scaling(1.f), FramesPerSecond(25.f)
{ {
#ifdef _DEBUG #ifdef _DEBUG
setDebugName("CAnimatedMeshMD3"); setDebugName("CAnimatedMeshMD3");
...@@ -71,7 +71,7 @@ CAnimatedMeshMD3::CAnimatedMeshMD3() ...@@ -71,7 +71,7 @@ CAnimatedMeshMD3::CAnimatedMeshMD3()
Mesh = new SMD3Mesh(); Mesh = new SMD3Mesh();
setInterpolationShift ( 0, 0 ); setInterpolationShift(0, 0);
} }
...@@ -119,7 +119,7 @@ SMD3QuaternionTagList *CAnimatedMeshMD3::getTagList(s32 frame, s32 detailLevel, ...@@ -119,7 +119,7 @@ SMD3QuaternionTagList *CAnimatedMeshMD3::getTagList(s32 frame, s32 detailLevel,
if ( 0 == Mesh ) if ( 0 == Mesh )
return 0; return 0;
getMesh ( frame, detailLevel, startFrameLoop, endFrameLoop ); getMesh(frame, detailLevel, startFrameLoop, endFrameLoop);
return &TagListIPol; return &TagListIPol;
} }
...@@ -130,8 +130,6 @@ IMesh* CAnimatedMeshMD3::getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop, ...@@ -130,8 +130,6 @@ IMesh* CAnimatedMeshMD3::getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop,
if ( 0 == Mesh ) if ( 0 == Mesh )
return 0; return 0;
u32 i;
//! check if we have the mesh in our private cache //! check if we have the mesh in our private cache
SCacheInfo candidate ( frame, startFrameLoop, endFrameLoop ); SCacheInfo candidate ( frame, startFrameLoop, endFrameLoop );
if ( candidate == Current ) if ( candidate == Current )
...@@ -173,12 +171,11 @@ IMesh* CAnimatedMeshMD3::getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop, ...@@ -173,12 +171,11 @@ IMesh* CAnimatedMeshMD3::getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop,
} }
// build current vertex // build current vertex
for ( i = 0; i!= Mesh->Buffer.size (); ++i ) for (u32 i = 0; i!= Mesh->Buffer.size (); ++i)
{ {
buildVertexArray(frameA, frameB, iPol, buildVertexArray(frameA, frameB, iPol,
Mesh->Buffer[i], Mesh->Buffer[i],
(SMeshBufferLightMap*) MeshIPol.getMeshBuffer(i) (SMeshBufferLightMap*) MeshIPol.getMeshBuffer(i));
);
} }
MeshIPol.recalculateBoundingBox(); MeshIPol.recalculateBoundingBox();
...@@ -192,7 +189,7 @@ IMesh* CAnimatedMeshMD3::getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop, ...@@ -192,7 +189,7 @@ IMesh* CAnimatedMeshMD3::getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop,
//! create a Irrlicht MeshBuffer for a MD3 MeshBuffer //! create a Irrlicht MeshBuffer for a MD3 MeshBuffer
IMeshBuffer * CAnimatedMeshMD3::createMeshBuffer(const SMD3MeshBuffer* source, IMeshBuffer * CAnimatedMeshMD3::createMeshBuffer(const SMD3MeshBuffer* source,
io::IFileSystem* fs, video::IVideoDriver * driver) io::IFileSystem* fs, video::IVideoDriver * driver)
{ {
SMeshBufferLightMap * dest = new SMeshBufferLightMap(); SMeshBufferLightMap * dest = new SMeshBufferLightMap();
dest->Vertices.set_used( source->MeshHeader.numVertices ); dest->Vertices.set_used( source->MeshHeader.numVertices );
...@@ -203,9 +200,9 @@ IMeshBuffer * CAnimatedMeshMD3::createMeshBuffer(const SMD3MeshBuffer* source, ...@@ -203,9 +200,9 @@ IMeshBuffer * CAnimatedMeshMD3::createMeshBuffer(const SMD3MeshBuffer* source,
// fill in static face info // fill in static face info
for ( i = 0; i < source->Indices.size(); i += 3 ) for ( i = 0; i < source->Indices.size(); i += 3 )
{ {
dest->Indices[i + 0 ] = (u16) source->Indices[i + 0]; dest->Indices[i + 0] = (u16) source->Indices[i + 0];
dest->Indices[i + 1 ] = (u16) source->Indices[i + 1]; dest->Indices[i + 1] = (u16) source->Indices[i + 1];
dest->Indices[i + 2 ] = (u16) source->Indices[i + 2]; dest->Indices[i + 2] = (u16) source->Indices[i + 2];
} }
// fill in static vertex info // fill in static vertex info
...@@ -294,7 +291,7 @@ void CAnimatedMeshMD3::buildTagArray ( u32 frameA, u32 frameB, f32 interpolate ) ...@@ -294,7 +291,7 @@ void CAnimatedMeshMD3::buildTagArray ( u32 frameA, u32 frameB, f32 interpolate )
loads a model loads a model
*/ */
bool CAnimatedMeshMD3::loadModelFile( u32 modelIndex, io::IReadFile* file, bool CAnimatedMeshMD3::loadModelFile( u32 modelIndex, io::IReadFile* file,
io::IFileSystem* fs, video::IVideoDriver * driver) io::IFileSystem* fs, video::IVideoDriver * driver)
{ {
if (!file) if (!file)
return false; return false;
...@@ -448,4 +445,3 @@ E_ANIMATED_MESH_TYPE CAnimatedMeshMD3::getMeshType() const ...@@ -448,4 +445,3 @@ E_ANIMATED_MESH_TYPE CAnimatedMeshMD3::getMeshType() const
} // end namespace irr } // end namespace irr
#endif // _IRR_COMPILE_WITH_MD3_LOADER_ #endif // _IRR_COMPILE_WITH_MD3_LOADER_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment