Commit 909ae75f authored by hybrid's avatar hybrid

Fix debug messages in 3ds loader.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3719 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 2d3422d0
...@@ -134,7 +134,6 @@ C3DSMeshFileLoader::C3DSMeshFileLoader(ISceneManager* smgr, io::IFileSystem* fs) ...@@ -134,7 +134,6 @@ C3DSMeshFileLoader::C3DSMeshFileLoader(ISceneManager* smgr, io::IFileSystem* fs)
setDebugName("C3DSMeshFileLoader"); setDebugName("C3DSMeshFileLoader");
#endif #endif
TransformationMatrix.makeIdentity();
if (FileSystem) if (FileSystem)
FileSystem->grab(); FileSystem->grab();
} }
...@@ -237,7 +236,7 @@ bool C3DSMeshFileLoader::readPercentageChunk(io::IReadFile* file, ...@@ -237,7 +236,7 @@ bool C3DSMeshFileLoader::readPercentageChunk(io::IReadFile* file,
ChunkData* chunk, f32& percentage) ChunkData* chunk, f32& percentage)
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load percentage chunk."); os::Printer::log("Load percentage chunk.", ELL_DEBUG);
#endif #endif
ChunkData data; ChunkData data;
...@@ -289,7 +288,7 @@ bool C3DSMeshFileLoader::readColorChunk(io::IReadFile* file, ChunkData* chunk, ...@@ -289,7 +288,7 @@ bool C3DSMeshFileLoader::readColorChunk(io::IReadFile* file, ChunkData* chunk,
video::SColor& out) video::SColor& out)
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load color chunk."); os::Printer::log("Load color chunk.", ELL_DEBUG);
#endif #endif
ChunkData data; ChunkData data;
readChunkData(file, data); readChunkData(file, data);
...@@ -340,7 +339,7 @@ bool C3DSMeshFileLoader::readColorChunk(io::IReadFile* file, ChunkData* chunk, ...@@ -340,7 +339,7 @@ bool C3DSMeshFileLoader::readColorChunk(io::IReadFile* file, ChunkData* chunk,
bool C3DSMeshFileLoader::readMaterialChunk(io::IReadFile* file, ChunkData* parent) bool C3DSMeshFileLoader::readMaterialChunk(io::IReadFile* file, ChunkData* parent)
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load material chunk."); os::Printer::log("Load material chunk.", ELL_DEBUG);
#endif #endif
u16 matSection=0; u16 matSection=0;
...@@ -551,7 +550,7 @@ bool C3DSMeshFileLoader::readTrackChunk(io::IReadFile* file, ChunkData& data, ...@@ -551,7 +550,7 @@ bool C3DSMeshFileLoader::readTrackChunk(io::IReadFile* file, ChunkData& data,
IMeshBuffer* mb, const core::vector3df& pivot) IMeshBuffer* mb, const core::vector3df& pivot)
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load track chunk."); os::Printer::log("Load track chunk.", ELL_DEBUG);
#endif #endif
u16 flags; u16 flags;
u32 flags2; u32 flags2;
...@@ -634,7 +633,7 @@ bool C3DSMeshFileLoader::readTrackChunk(io::IReadFile* file, ChunkData& data, ...@@ -634,7 +633,7 @@ bool C3DSMeshFileLoader::readTrackChunk(io::IReadFile* file, ChunkData& data,
bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent) bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent)
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load frame chunk."); os::Printer::log("Load frame chunk.", ELL_DEBUG);
#endif #endif
ChunkData data; ChunkData data;
...@@ -645,7 +644,7 @@ bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent) ...@@ -645,7 +644,7 @@ bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent)
else else
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load keyframe header."); os::Printer::log("Load keyframe header.", ELL_DEBUG);
#endif #endif
u16 version; u16 version;
file->read(&version, 2); file->read(&version, 2);
...@@ -676,7 +675,7 @@ bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent) ...@@ -676,7 +675,7 @@ bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent)
case C3DS_OBJECT_TAG: case C3DS_OBJECT_TAG:
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load object tag."); os::Printer::log("Load object tag.", ELL_DEBUG);
#endif #endif
mb=0; mb=0;
pivot.set(0.0f, 0.0f, 0.0f); pivot.set(0.0f, 0.0f, 0.0f);
...@@ -685,7 +684,7 @@ bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent) ...@@ -685,7 +684,7 @@ bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent)
case C3DS_KF_SEG: case C3DS_KF_SEG:
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load keyframe segment."); os::Printer::log("Load keyframe segment.", ELL_DEBUG);
#endif #endif
u32 flags; u32 flags;
file->read(&flags, 4); file->read(&flags, 4);
...@@ -702,7 +701,7 @@ bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent) ...@@ -702,7 +701,7 @@ bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent)
case C3DS_KF_NODE_HDR: case C3DS_KF_NODE_HDR:
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load keyframe node header."); os::Printer::log("Load keyframe node header.", ELL_DEBUG);
#endif #endif
s16 flags; s16 flags;
c8* c = new c8[data.header.length - data.read-6]; c8* c = new c8[data.header.length - data.read-6];
...@@ -737,7 +736,7 @@ bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent) ...@@ -737,7 +736,7 @@ bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent)
case C3DS_KF_CURTIME: case C3DS_KF_CURTIME:
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load keyframe current time."); os::Printer::log("Load keyframe current time.", ELL_DEBUG);
#endif #endif
u32 flags; u32 flags;
file->read(&flags, 4); file->read(&flags, 4);
...@@ -750,7 +749,7 @@ bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent) ...@@ -750,7 +749,7 @@ bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent)
case C3DS_NODE_ID: case C3DS_NODE_ID:
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load node ID."); os::Printer::log("Load node ID.", ELL_DEBUG);
#endif #endif
u16 flags; u16 flags;
file->read(&flags, 2); file->read(&flags, 2);
...@@ -763,7 +762,7 @@ bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent) ...@@ -763,7 +762,7 @@ bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent)
case C3DS_PIVOTPOINT: case C3DS_PIVOTPOINT:
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load pivot point."); os::Printer::log("Load pivot point.", ELL_DEBUG);
#endif #endif
file->read(&pivot.X, sizeof(f32)); file->read(&pivot.X, sizeof(f32));
file->read(&pivot.Y, sizeof(f32)); file->read(&pivot.Y, sizeof(f32));
...@@ -779,7 +778,7 @@ bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent) ...@@ -779,7 +778,7 @@ bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent)
case C3DS_BOUNDBOX: case C3DS_BOUNDBOX:
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load bounding box."); os::Printer::log("Load bounding box.", ELL_DEBUG);
#endif #endif
core::aabbox3df bbox; core::aabbox3df bbox;
// abuse bboxCenter as temporary variable // abuse bboxCenter as temporary variable
...@@ -808,7 +807,7 @@ bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent) ...@@ -808,7 +807,7 @@ bool C3DSMeshFileLoader::readFrameChunk(io::IReadFile* file, ChunkData* parent)
case C3DS_MORPH_SMOOTH: case C3DS_MORPH_SMOOTH:
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load morph smooth."); os::Printer::log("Load morph smooth.", ELL_DEBUG);
#endif #endif
f32 flag; f32 flag;
file->read(&flag, 4); file->read(&flag, 4);
...@@ -903,7 +902,7 @@ bool C3DSMeshFileLoader::readChunk(io::IReadFile* file, ChunkData* parent) ...@@ -903,7 +902,7 @@ bool C3DSMeshFileLoader::readChunk(io::IReadFile* file, ChunkData* parent)
bool C3DSMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData* parent) bool C3DSMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData* parent)
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load object chunk."); os::Printer::log("Load object chunk.", ELL_DEBUG);
#endif #endif
while(parent->read < parent->header.length) while(parent->read < parent->header.length)
{ {
...@@ -1004,6 +1003,9 @@ bool C3DSMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData* parent) ...@@ -1004,6 +1003,9 @@ bool C3DSMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData* parent)
void C3DSMeshFileLoader::composeObject(io::IReadFile* file, const core::stringc& name) void C3DSMeshFileLoader::composeObject(io::IReadFile* file, const core::stringc& name)
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Compose object.", ELL_DEBUG);
#endif
if (Mesh->getMeshBufferCount() != Materials.size()) if (Mesh->getMeshBufferCount() != Materials.size())
loadMaterials(file); loadMaterials(file);
...@@ -1254,7 +1256,7 @@ void C3DSMeshFileLoader::cleanUp() ...@@ -1254,7 +1256,7 @@ void C3DSMeshFileLoader::cleanUp()
void C3DSMeshFileLoader::readTextureCoords(io::IReadFile* file, ChunkData& data) void C3DSMeshFileLoader::readTextureCoords(io::IReadFile* file, ChunkData& data)
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load texture coords."); os::Printer::log("Load texture coords.", ELL_DEBUG);
#endif #endif
file->read(&CountTCoords, sizeof(CountTCoords)); file->read(&CountTCoords, sizeof(CountTCoords));
#ifdef __BIG_ENDIAN__ #ifdef __BIG_ENDIAN__
...@@ -1282,7 +1284,7 @@ void C3DSMeshFileLoader::readTextureCoords(io::IReadFile* file, ChunkData& data) ...@@ -1282,7 +1284,7 @@ void C3DSMeshFileLoader::readTextureCoords(io::IReadFile* file, ChunkData& data)
void C3DSMeshFileLoader::readMaterialGroup(io::IReadFile* file, ChunkData& data) void C3DSMeshFileLoader::readMaterialGroup(io::IReadFile* file, ChunkData& data)
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load material group."); os::Printer::log("Load material group.", ELL_DEBUG);
#endif #endif
SMaterialGroup group; SMaterialGroup group;
...@@ -1310,7 +1312,7 @@ void C3DSMeshFileLoader::readMaterialGroup(io::IReadFile* file, ChunkData& data) ...@@ -1310,7 +1312,7 @@ void C3DSMeshFileLoader::readMaterialGroup(io::IReadFile* file, ChunkData& data)
void C3DSMeshFileLoader::readIndices(io::IReadFile* file, ChunkData& data) void C3DSMeshFileLoader::readIndices(io::IReadFile* file, ChunkData& data)
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load indices."); os::Printer::log("Load indices.", ELL_DEBUG);
#endif #endif
file->read(&CountFaces, sizeof(CountFaces)); file->read(&CountFaces, sizeof(CountFaces));
#ifdef __BIG_ENDIAN__ #ifdef __BIG_ENDIAN__
...@@ -1335,7 +1337,7 @@ void C3DSMeshFileLoader::readIndices(io::IReadFile* file, ChunkData& data) ...@@ -1335,7 +1337,7 @@ void C3DSMeshFileLoader::readIndices(io::IReadFile* file, ChunkData& data)
void C3DSMeshFileLoader::readVertices(io::IReadFile* file, ChunkData& data) void C3DSMeshFileLoader::readVertices(io::IReadFile* file, ChunkData& data)
{ {
#ifdef _IRR_DEBUG_3DS_LOADER_ #ifdef _IRR_DEBUG_3DS_LOADER_
os::Printer::log("Load vertices."); os::Printer::log("Load vertices.", ELL_DEBUG);
#endif #endif
file->read(&CountVertices, sizeof(CountVertices)); file->read(&CountVertices, sizeof(CountVertices));
#ifdef __BIG_ENDIAN__ #ifdef __BIG_ENDIAN__
......
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