From 183f0f0b905715f0d89b38174fdfd44641c1a79c Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 12 Aug 2009 12:03:18 +0000 Subject: src/model filenames cleanup, parse .map texture coordinates, early loading of material textures --- src/model/asefile.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/model/asefile.cc') diff --git a/src/model/asefile.cc b/src/model/asefile.cc index 28c84cf..67be531 100644 --- a/src/model/asefile.cc +++ b/src/model/asefile.cc @@ -89,7 +89,7 @@ bool ASEFile::read_mesh_vertex_list(std::istream &is) line >> firstword; if (firstword.compare("}") == 0) { - con_debug << " " << count << " mesh vertices" << std::endl; + //con_debug << " " << count << " mesh vertices" << std::endl; return true; @@ -130,7 +130,7 @@ bool ASEFile::read_mesh_face_list(std::istream &is) line >> word; if (word.compare("}") == 0) { - con_debug << " " << count << " mesh faces" << std::endl; + //con_debug << " " << count << " mesh faces" << std::endl; return true; } else if ( word.compare("*MESH_FACE") == 0) { @@ -178,7 +178,7 @@ bool ASEFile::read_mesh_normals(std::istream &is) line >> firstword; if (firstword.compare("}") == 0) { - con_debug << " " << count << " face normals" << std::endl; + //con_debug << " " << count << " face normals" << std::endl; return true; } else if ( firstword.compare("*MESH_FACENORMAL") == 0) { @@ -188,7 +188,7 @@ bool ASEFile::read_mesh_normals(std::istream &is) (*it).second->normal().assign(x, y, z); count++; } else { - con_debug << " could not find face " << index << std::endl; + con_warn << " could not find face " << index << std::endl; } vertindex = 0; } else { @@ -227,7 +227,7 @@ bool ASEFile::read_mesh_tvertex_list(std::istream &is) line >> firstword; if (firstword.compare("}") == 0) { - con_debug << " " << count << " texture vertices" << std::endl; + //con_debug << " " << count << " texture vertices" << std::endl; return true; } else if ( firstword.compare("*MESH_TVERT") == 0) { @@ -258,7 +258,7 @@ size_t count = 0; line >> firstword; if (firstword.compare("}") == 0) { - con_debug << " " << count << " face texture coordinates" << std::endl; + //con_debug << " " << count << " face texture coordinates" << std::endl; return true; } else if ( firstword.compare("*MESH_TFACE") == 0) { @@ -300,31 +300,31 @@ bool ASEFile::read_mesh(std::istream &is) if ((level == 1 ) && (word.compare("*MESH_VERTEX_LIST") == 0)) { if ((line >> word) && (word.compare("{") == 0)) { - con_debug << " " << name() << " *MESH_VERTEX_LIST" << std::endl; + //con_debug << " " << name() << " *MESH_VERTEX_LIST" << std::endl; read_mesh_vertex_list(is); } } else if ((level == 1 ) && (word.compare("*MESH_FACE_LIST") == 0)) { if ((line >> word) && (word.compare("{") == 0)) { - con_debug << " " << name() << " *MESH_FACE_LIST" << std::endl; + //con_debug << " " << name() << " *MESH_FACE_LIST" << std::endl; read_mesh_face_list(is); } } else if ((level == 1 ) && (word.compare("*MESH_NORMALS") == 0)) { if ((line >> word) && (word.compare("{") == 0)) { - con_debug << " " << name() << " *MESH_NORMALS" << std::endl; + //con_debug << " " << name() << " *MESH_NORMALS" << std::endl; read_mesh_normals(is); } } else if ((level == 1 ) && (word.compare("*MESH_TVERTLIST") == 0)) { if ((line >> word) && (word.compare("{") == 0)) { - con_debug << " " << name() << " *MESH_TVERTLIST" << std::endl; + //con_debug << " " << name() << " *MESH_TVERTLIST" << std::endl; read_mesh_tvertex_list(is); } } else if ((level == 1 ) && (word.compare("*MESH_TFACELIST") == 0)) { if ((line >> word) && (word.compare("{") == 0)) { - con_debug << " " << name() << " *MESH_TFACELIST" << std::endl; + //con_debug << " " << name() << " *MESH_TFACELIST" << std::endl; read_mesh_tface_list(is); } @@ -360,7 +360,7 @@ bool ASEFile::read_geom(std::istream &is) if ((level == 1 ) && (word.compare("*MESH") == 0)) { if ((line >> word) && (word.compare("{") == 0)) { - con_debug << " " << name() << " " << "*MESH" << std::endl; + //con_debug << " " << name() << " " << "*MESH" << std::endl; read_mesh(is); } @@ -400,7 +400,7 @@ bool ASEFile::read() if (word.compare("*GEOMOBJECT") == 0) { if ((line >> word) && (word.compare("{") == 0)) { - con_debug << " " << name() << " " << "*GEOMOBJECT" << std::endl; + //con_debug << " " << name() << " " << "*GEOMOBJECT" << std::endl; read_geom(asefile_ifs); } } -- cgit v1.2.3