Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/radar.cc')
-rw-r--r--src/client/radar.cc113
1 files changed, 0 insertions, 113 deletions
diff --git a/src/client/radar.cc b/src/client/radar.cc
deleted file mode 100644
index cdf5391..0000000
--- a/src/client/radar.cc
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- client/rader.cc
- This file is part of the Osirion project and is distributed under
- the terms of the GNU General Public License version 2
-*/
-
-#include "auxiliary/functions.h"
-#include "core/core.h"
-#include "client/radar.h"
-#include "client/video.h"
-#include "render/draw.h"
-#include "render/render.h"
-#include "render/text.h"
-
-namespace client
-{
-
-void Radar::draw() {
- using namespace render;
-
- if (!core::localcontrol())
- return;
-
- float y = 4 + Text::fontheight();
- Text::draw(4, y, "^N------------ ^BRadar test ^N--------------");
- y += Text::fontheight();
-
- gl::color(1.0f, 1.0f, 1.0f, 1.0f);
-
- std::map<unsigned int, core::Entity *>::iterator it;
- for (it=core::Entity::registry.begin(); it != core::Entity::registry.end(); it++) {
- core::Entity *entity = (*it).second;
- core::ClientState *state = entity->state();
-
- if (state && state->targetable() && entity->label().size()) {
- gl::color(entity->color());
- std::ostringstream line;
- line << aux::pad_right(entity->name(), 24) <<
- state->state_screenlocation[0] << " " <<
- state->state_screenlocation[1] << " " <<
- state->state_screenlocation[2] << " ";
- Text::draw(4, y, line.str());
- y += Text::fontheight();
- }
- }
-
-}
-/*
-void Radar::draw()
-{
- using namespace render;
-
- if (!core::localcontrol())
- return;
-
- const float width = (float) video::width/4;
- const float height = (float) video::height/4;
-
- const float margin = 16;
- const float xscale = 128;
- const float yscale = xscale * height / width;
-
- const float left = video::width - margin - width;
- const float top = video::height -margin - height;
-
- gl::disable(GL_TEXTURE_2D);
- glEnableClientState(GL_VERTEX_ARRAY);
- glEnableClientState(GL_NORMAL_ARRAY);
- //glEnableClientState(GL_COLOR_ARRAY);
-
- // draw the transparent radar background
- gl::color(0.0f, 0.0f, 0.0f, 0.2f);
- gl::begin(gl::Quads);
- gl::vertex(left, top, 0.0f);
- gl::vertex(left + width, top, 0.0f);
- gl::vertex(left + width, top + height, 0.0f);
- gl::vertex(left, top + height, 0.0f);
- gl::end();
-
- math::Vector3f center(core::localcontrol()->location());
-
- gl::begin(gl::Points);
- std::map<unsigned int, core::Entity *>::iterator it;
- for (it=core::Entity::registry.begin(); it != core::Entity::registry.end(); it++) {
- core::Entity *entity = (*it).second;
-
- math::Vector3f position(entity->state()->location() - center);
- if ((position.x > -yscale) && (position.x < yscale) && (position.y > -xscale) && (position.y < xscale)) {
- float x = left + width/2 - position.y / xscale * width/2;
- float y = top + height/2 - position.x / xscale * width/2;
- if (entity->type() == core::Entity::Globe) {
- gl::end();
- gl::push();
- gl::translate(x, y, 0);
- float r = entity->radius() / xscale * width/2;
- draw_sphere(entity->color(), r);
- gl::pop();
- gl::begin(gl::Points);
- } else {
- gl::color(entity->color());
- gl::vertex(x , y , 0);
- }
- }
- }
- gl::end();
-
- gl::enable(GL_TEXTURE_2D);
- glDisableClientState(GL_VERTEX_ARRAY);
- glDisableClientState(GL_NORMAL_ARRAY);
- //glDisableClientState(GL_COLOR_ARRAY);
-}
-*/
-}