From 82293065b52f5a4e5c4ccde5eade4ebae18014ca Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 3 May 2008 21:04:02 +0000 Subject: liibmodel --- src/render/draw.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/render/draw.cc') diff --git a/src/render/draw.cc b/src/render/draw.cc index 2938442..5627ac6 100644 --- a/src/render/draw.cc +++ b/src/render/draw.cc @@ -8,7 +8,7 @@ #include #include "core/core.h" -#include "core/model.h" +#include "model/model.h" #include "render/render.h" #include "render/textures.h" #include "render/draw.h" @@ -67,10 +67,10 @@ void draw_sphere(math::Color const & color, float radius) gl::color(color); size_t index = 0; - size_t count = (core::SPHERESEGMENTS+1)*2; + size_t count = (model::SPHERESEGMENTS+1)*2; // draw body - for (int j=0; j < core::SPHERESEGMENTS-1; j++) { + for (int j=0; j < model::SPHERESEGMENTS-1; j++) { glDrawArrays(gl::QuadStrip, index, count); index += count; Stats::quads += count/2-1; @@ -186,13 +186,13 @@ void draw_model_evertex(core::Entity *entity) void draw_model_engines(core::EntityControlable *entity) { - core::Model *model = entity->model(); + model::Model *model = entity->model(); if (model->model_engine.size() && entity->thrust()) { gl::color(1.0f, 0.0f ,0.0f, 1.0f); gl::begin(gl::Lines); - for (std::list::iterator eit = model->model_engine.begin(); eit != model->model_engine.end(); eit++) { + for (std::list::iterator eit = model->model_engine.begin(); eit != model->model_engine.end(); eit++) { math::Vector3f const & v = (*eit)->location(); gl::vertex(v); gl::vertex(v.x - 0.0625f*entity->thrust(), v.y, v.z); @@ -260,13 +260,13 @@ void pass_visibility() // load entity models if necessary if (!entity->model() && entity->modelname().size()) { - entity->entity_model = core::Model::get(entity->modelname()); + entity->entity_model = model::Model::get(entity->modelname()); if (!entity->model()) { entity->entity_modelname.clear(); } else { - for (std::list::iterator lit = entity->model()->model_light.begin(); lit != entity->model()->model_light.end(); lit++) { - core::Light *light = (*lit); + for (std::list::iterator lit = entity->model()->model_light.begin(); lit != entity->model()->model_light.end(); lit++) { + model::Light *light = (*lit); // load flare texture std::stringstream flarename; @@ -408,7 +408,7 @@ void draw_pass_model_lights() if (test_drawfx_distance(entity) && (entity->model()->model_light.size())) { - for (std::list::iterator lit = entity->model()->model_light.begin(); lit != entity->model()->model_light.end(); lit++) { + for (std::list::iterator lit = entity->model()->model_light.begin(); lit != entity->model()->model_light.end(); lit++) { // strobe frequency float t = 1.0f; if ((*lit)->strobe()) -- cgit v1.2.3