Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-02-24 19:13:27 +0000
committerStijn Buys <ingar@osirion.org>2009-02-24 19:13:27 +0000
commit53faab4c1d692fed7c7ecfedea57fc457bf61e80 (patch)
treed5dab7709dd4dc5409ab0e62920bb4d62790a90a /src/render
parent0e96454c70e56de5cefa38ab1b5dc46196238d07 (diff)
Replaced 'The Osirion Project' with 'Project::OSiRioN' in messages,
added g_collision cflag to facillitate future development, added ShowOnMap entity flag
Diffstat (limited to 'src/render')
-rw-r--r--src/render/draw.cc17
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);
}