From f030154fe727e25a2afe1f78b3998c2d2dba95e4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 18 Aug 2009 09:24:15 +0000 Subject: astyle cleanup, corrects not loading of material textures --- src/model/model.cc | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'src/model/model.cc') diff --git a/src/model/model.cc b/src/model/model.cc index 2b3ec7a..85bf609 100644 --- a/src/model/model.cc +++ b/src/model/model.cc @@ -17,14 +17,14 @@ namespace model Model::Registry Model::model_registry; Model::Model(const std::string & name) : - model_enginecolor(1.0f, 0.0f, 0.0f), - model_name(name) - + model_enginecolor(1.0f, 0.0f, 0.0f), + model_name(name) + { model_radius = 0.5f; model_enginesound = 0; model_impulsesound = 0; - + model_tris_detail_count = 0; model_tris_count = 0; model_quad_detail_count = 0; @@ -35,28 +35,28 @@ Model::~Model() { // delete all fragment groups for (Groups::iterator git = model_groups.begin(); git != model_groups.end(); git++) { - delete (*git); + delete(*git); } model_groups.clear(); - + // delete all docks for (Docks::iterator dit = model_docks.begin(); dit != model_docks.end(); dit++) { - delete (*dit); + delete(*dit); } model_docks.clear(); // delete all particle systems for (Model::ParticleSystems::iterator pit = model_particles.begin(); pit != model_particles.end(); pit++) { - delete (*pit); + delete(*pit); } model_particles.clear(); - + // delete all lights for (Lights::iterator lit = model_lights.begin(); lit != model_lights.end(); lit++) { delete(*lit); } model_lights.clear(); - + // delete all flares for (Flares::iterator flit = model_flares.begin(); flit != model_flares.end(); flit++) { delete(*flit); @@ -115,18 +115,18 @@ Model *Model::load(const std::string & name) // try loading the .map model model = MapFile::load(name); } - + if (!model) { // if it can't be found, try the ase model model = ASEFile::load(name); } - - if (!model) { + + if (!model) { con_warn << "Could not open model " << name << std::endl; } else { model_registry[model->name()] = model; } - + return model; } @@ -137,7 +137,7 @@ void Model::clear() delete(*mit).second; } model_registry.clear(); - + // clear the vertex array if (VertexArray::instance()) VertexArray::instance()->clear(); @@ -159,18 +159,18 @@ void Model::list() { for (Registry::iterator mit = model_registry.begin(); mit != model_registry.end(); mit++) { list_model((*mit).second); - + } - + con_print << model_registry.size() << " registered models" << std::endl; if (VertexArray::instance()) { - + con_print << "vertex array " - << VertexArray::instance()->index() * 3 * sizeof(float) / (1024*1024) << "/" - << VertexArray::instance()->size() * 3 * sizeof(float) / (1024*1024) << "Mb " - << VertexArray::instance()->index() / 3 << "/" << VertexArray::instance()->size() / 3 << " verts " - << (VertexArray::instance()->index() * 100 / VertexArray::instance()->size())<< "% used" - << std::endl; + << VertexArray::instance()->index() * 3 * sizeof(float) / (1024*1024) << "/" + << VertexArray::instance()->size() * 3 * sizeof(float) / (1024*1024) << "Mb " + << VertexArray::instance()->index() / 3 << "/" << VertexArray::instance()->size() / 3 << " verts " + << (VertexArray::instance()->index() * 100 / VertexArray::instance()->size()) << "% used" + << std::endl; } } -- cgit v1.2.3