diff options
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/draw.cc | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/render/draw.cc b/src/render/draw.cc index 51530e3..a435eff 100644 --- a/src/render/draw.cc +++ b/src/render/draw.cc @@ -50,11 +50,6 @@ bool has_zone_light = false; typedef std::map<float, core::EntityGlobe *> Globes; Globes globes_list; -// function to test flags -inline bool flag_is_set(unsigned int const flags, unsigned int const flag) { - return ((flags & flag) == flag); -} - /* ---- Prepare the renderer state --------------------------------- */ void pass_prepare(float seconds) @@ -87,7 +82,7 @@ void pass_prepare(float seconds) } // add level lights - if (flag_is_set(globe->flags(), core::Entity::Bright)) { + if (globe->flag_is_set(core::Entity::Bright)) { // bright globes set level light GLfloat diffuse_light[4]; @@ -195,7 +190,7 @@ void draw_globe(core::EntityGlobe *globe) math::Vector3f location(globe->location()); float radius = globe->radius(); - if(flag_is_set(globe->flags(), core::Entity::Bright)) { + if(globe->flag_is_set(core::Entity::Bright)) { // bright globe, render fullbright gl::disable(GL_LIGHTING); } else { @@ -240,7 +235,7 @@ void draw_globe(core::EntityGlobe *globe) gl::pop(); - if(flag_is_set(globe->flags(), core::Entity::Bright)) { + if(globe->flag_is_set(core::Entity::Bright)) { math::Vector3f v = globe->location() - Camera::eye(); v.normalize(); @@ -300,7 +295,7 @@ void draw_globe(core::EntityGlobe *globe) } } - if (flag_is_set(globe->flags(), core::Entity::Bright)) { + if (globe->flag_is_set(core::Entity::Bright)) { gl::enable(GL_LIGHTING); } else { gl::enable(GL_LIGHT0); @@ -486,7 +481,7 @@ void draw_pass_default() gl::translate(entity->location()); gl::multmatrix(entity->axis()); - if (flag_is_set(entity->flags(), core::Entity::Bright)) { + if (entity->flag_is_set(core::Entity::Bright)) { gl::disable(GL_LIGHTING); } @@ -510,7 +505,7 @@ void draw_pass_default() break; } - if (flag_is_set(entity->flags(), core::Entity::Bright)) { + if (entity->flag_is_set(core::Entity::Bright)) { gl::enable(GL_LIGHTING); } |