cerr -> nout

This commit is contained in:
David Rose 2003-04-11 19:14:40 +00:00
parent dcc8130031
commit 3be7a57292
6 changed files with 21 additions and 29 deletions

View File

@ -74,7 +74,7 @@ post_command_line() {
void EggCrop::
run() {
int num_removed = strip_prims(&_data);
cerr << "Removed " << num_removed << " primitives.\n";
nout << "Removed " << num_removed << " primitives.\n";
_data.remove_unused_vertices();
write_egg_file();

View File

@ -263,14 +263,6 @@ extract_ancillary(FltRecordReader &reader) {
}
_transform_steps.push_back(DCAST(FltTransformRecord, step));
/*
cerr << "Added transform step: " << step->get_type() << "\n";
cerr << "Net matrix is:\n";
_transform.write(cerr, 2);
cerr << "Step is:\n";
step->get_matrix().write(cerr, 2);
*/
return true;
}

View File

@ -24,24 +24,24 @@ int
main(int argc, char *argv[]) {
init_liblwo();
if (argc != 2) {
cerr << "test_lwo file.lwo\n";
nout << "test_lwo file.lwo\n";
exit(1);
}
LwoInputFile in;
if (!in.open_read(argv[1])) {
cerr << "Unable to open " << argv[1] << "\n";
nout << "Unable to open " << argv[1] << "\n";
exit(1);
}
PT(IffChunk) chunk = in.get_chunk();
while (chunk != (IffChunk *)NULL) {
cerr << "Got chunk type " << chunk->get_type() << ":\n";
chunk->write(cerr, 2);
nout << "Got chunk type " << chunk->get_type() << ":\n";
chunk->write(nout, 2);
chunk = in.get_chunk();
}
cerr << "EOF = " << in.is_eof() << "\n";
nout << "EOF = " << in.is_eof() << "\n";
return (0);
}

View File

@ -93,11 +93,11 @@ doIt(const MArgList &) {
framework.get_models().instance_to(window->get_render());
if (!convert(framework.get_models())) {
cerr << "failure in conversion.\n";
nout << "failure in conversion.\n";
return MS::kFailure;
}
cerr << "successfully converted.\n";
nout << "successfully converted.\n";
loading_np.remove_node();
window->center_trackball(framework.get_models());

View File

@ -263,7 +263,7 @@ read_material_data(const Datagram &raw_data) {
_has_material = true;
if (di.get_remaining_size() != 0) {
cerr << "Ignoring " << di.get_remaining_size()
nout << "Ignoring " << di.get_remaining_size()
<< " trailing MeshMaterial.\n";
}
@ -287,7 +287,7 @@ read_texture_data(const Datagram &raw_data) {
_has_texture = true;
if (di.get_remaining_size() != 0) {
cerr << "Ignoring " << di.get_remaining_size()
nout << "Ignoring " << di.get_remaining_size()
<< " trailing MeshMaterial.\n";
}
return true;

View File

@ -275,7 +275,7 @@ create_polygons(EggGroupNode *egg_parent, XFileToEggConverter *converter) {
int vertex_index = (*vi)._vertex_index;
int normal_index = (*vi)._normal_index;
if (vertex_index < 0 || vertex_index >= (int)_vertices.size()) {
cerr << "Vertex index out of range in Mesh.\n";
nout << "Vertex index out of range in Mesh.\n";
return false;
}
XFileVertex *vertex = _vertices[vertex_index];
@ -556,7 +556,7 @@ read_mesh_data(const Datagram &raw_data) {
}
if (di.get_remaining_size() != 0) {
cerr << "Ignoring " << di.get_remaining_size() << " trailing Mesh.\n";
nout << "Ignoring " << di.get_remaining_size() << " trailing Mesh.\n";
}
return true;
@ -586,7 +586,7 @@ read_normal_data(const Datagram &raw_data) {
int num_faces = di.get_int32();
if (num_faces != _faces.size()) {
cerr << "Incorrect number of faces in MeshNormals.\n";
nout << "Incorrect number of faces in MeshNormals.\n";
return false;
}
@ -594,7 +594,7 @@ read_normal_data(const Datagram &raw_data) {
XFileFace *face = _faces[i];
int num_vertices = di.get_int32();
if (num_vertices != face->_vertices.size()) {
cerr << "Incorrect number of vertices for face in MeshNormals.\n";
nout << "Incorrect number of vertices for face in MeshNormals.\n";
return false;
}
for (int j = 0; j < num_vertices; j++) {
@ -603,7 +603,7 @@ read_normal_data(const Datagram &raw_data) {
}
if (di.get_remaining_size() != 0) {
cerr << "Ignoring " << di.get_remaining_size()
nout << "Ignoring " << di.get_remaining_size()
<< " trailing MeshNormals.\n";
}
@ -625,7 +625,7 @@ read_color_data(const Datagram &raw_data) {
for (i = 0; i < num_colors; i++) {
unsigned int vertex_index = di.get_int32();
if (vertex_index < 0 || vertex_index >= _vertices.size()) {
cerr << "Vertex index out of range in MeshVertexColors.\n";
nout << "Vertex index out of range in MeshVertexColors.\n";
return false;
}
XFileVertex *vertex = _vertices[vertex_index];
@ -637,7 +637,7 @@ read_color_data(const Datagram &raw_data) {
}
if (di.get_remaining_size() != 0) {
cerr << "Ignoring " << di.get_remaining_size()
nout << "Ignoring " << di.get_remaining_size()
<< " trailing MeshVertexColors.\n";
}
@ -656,7 +656,7 @@ read_uv_data(const Datagram &raw_data) {
int num_vertices = di.get_int32();
if (num_vertices != _vertices.size()) {
cerr << "Wrong number of vertices in MeshTextureCoords.\n";
nout << "Wrong number of vertices in MeshTextureCoords.\n";
return false;
}
@ -669,7 +669,7 @@ read_uv_data(const Datagram &raw_data) {
}
if (di.get_remaining_size() != 0) {
cerr << "Ignoring " << di.get_remaining_size()
nout << "Ignoring " << di.get_remaining_size()
<< " trailing MeshTextureCoords.\n";
}
@ -690,7 +690,7 @@ read_material_list_data(const Datagram &raw_data) {
unsigned int num_faces = di.get_int32();
if (num_faces > _faces.size()) {
cerr << "Too many faces in MaterialList.\n";
nout << "Too many faces in MaterialList.\n";
return false;
}
@ -712,7 +712,7 @@ read_material_list_data(const Datagram &raw_data) {
}
if (di.get_remaining_size() != 0) {
cerr << "Ignoring " << di.get_remaining_size()
nout << "Ignoring " << di.get_remaining_size()
<< " trailing MeshMaterialList.\n";
}