]> git.lizzy.rs Git - irrlicht.git/blobdiff - source/Irrlicht/CB3DMeshFileLoader.cpp
Drop obsolete configuration macros
[irrlicht.git] / source / Irrlicht / CB3DMeshFileLoader.cpp
index 41498eaa808bdf1b0d43db642d664de8ef5a02a5..83ec373656166bb9f97a30926858d4ae1f602828 100644 (file)
@@ -7,8 +7,6 @@
 // declared public domain\r
 \r
 #include "IrrCompileConfig.h"\r
-#ifdef _IRR_COMPILE_WITH_B3D_LOADER_\r
-\r
 #include "CB3DMeshFileLoader.h"\r
 \r
 #include "IVideoDriver.h"\r
@@ -26,7 +24,7 @@ namespace scene
 \r
 //! Constructor\r
 CB3DMeshFileLoader::CB3DMeshFileLoader(scene::ISceneManager* smgr)\r
-: AnimatedMesh(0), B3DFile(0), NormalsInFile(false),\r
+: AnimatedMesh(0), B3DFile(0), VerticesStart(0), NormalsInFile(false),\r
        HasVertexColors(false), ShowWarning(true)\r
 {\r
        #ifdef _DEBUG\r
@@ -130,7 +128,8 @@ bool CB3DMeshFileLoader::load()
                else\r
                {\r
                        os::Printer::log("Unknown chunk found in mesh base - skipping");\r
-                       B3DFile->seek(B3dStack.getLast().startposition + B3dStack.getLast().length);\r
+                       if (!B3DFile->seek(B3dStack.getLast().startposition + B3dStack.getLast().length))\r
+                               return false;\r
                        B3dStack.erase(B3dStack.size()-1);\r
                }\r
        }\r
@@ -226,7 +225,8 @@ bool CB3DMeshFileLoader::readChunkNODE(CSkinnedMesh::SJoint *inJoint)
                else\r
                {\r
                        os::Printer::log("Unknown chunk found in node chunk - skipping");\r
-                       B3DFile->seek(B3dStack.getLast().startposition + B3dStack.getLast().length);\r
+                       if (!B3DFile->seek(B3dStack.getLast().startposition + B3dStack.getLast().length))\r
+                               return false;\r
                        B3dStack.erase(B3dStack.size()-1);\r
                }\r
        }\r
@@ -308,7 +308,8 @@ bool CB3DMeshFileLoader::readChunkMESH(CSkinnedMesh::SJoint *inJoint)
                else\r
                {\r
                        os::Printer::log("Unknown chunk found in mesh - skipping");\r
-                       B3DFile->seek(B3dStack.getLast().startposition + B3dStack.getLast().length);\r
+                       if (!B3DFile->seek(B3dStack.getLast().startposition + B3dStack.getLast().length))\r
+                               return false;\r
                        B3dStack.erase(B3dStack.size()-1);\r
                }\r
        }\r
@@ -1052,7 +1053,3 @@ void CB3DMeshFileLoader::readFloats(f32* vec, u32 count)
 \r
 } // end namespace scene\r
 } // end namespace irr\r
-\r
-\r
-#endif // _IRR_COMPILE_WITH_B3D_LOADER_\r
-\r