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>2008-08-07 23:27:42 +0000
committerStijn Buys <ingar@osirion.org>2008-08-07 23:27:42 +0000
commita743791e624590e0b41229f28f940db5272b60ba (patch)
tree6a6ec736e4ed34d5254a292889e6e33300919a63 /src/client
parent1f36b993d603c56251aa15eb6edc6b92ecf599ae (diff)
rotating planets, navpoints, network protocol updates, entity event state
Diffstat (limited to 'src/client')
-rw-r--r--src/client/targets.cc16
-rw-r--r--src/client/view.cc29
2 files changed, 36 insertions, 9 deletions
diff --git a/src/client/targets.cc b/src/client/targets.cc
index b913d55..f922199 100644
--- a/src/client/targets.cc
+++ b/src/client/targets.cc
@@ -369,7 +369,12 @@ void draw_entity_offscreen_target(core::Entity *entity, bool is_active_target)
glVertex3f(cx, cy-r+2, 0);
render::gl::end();
- render::gl::color(1, 1, 1, 1);
+ if (entity->type() == core::Entity::Controlable) {
+ render::gl::color(0, 1, 0, 1);
+ } else {
+ render::gl::color(1, 1, 1, 1);
+ }
+
render::gl::begin(render::gl::LineLoop);
glVertex3f(cx+r, cy, 0);
glVertex3f(cx, cy+r, 0);
@@ -415,7 +420,7 @@ void draw_entity_target(core::Entity *entity, bool is_active_target)
r *= 0.5;
render::gl::disable(GL_TEXTURE_2D);
-
+ // outer square shadow
render::gl::color(0, 0, 0, 1);
render::gl::begin(render::gl::LineLoop);
glVertex3f(cx+r, cy+2, 0);
@@ -424,7 +429,12 @@ void draw_entity_target(core::Entity *entity, bool is_active_target)
glVertex3f(cx, cy-r+2, 0);
render::gl::end();
- render::gl::color(1, 1, 1, 1);
+ if (entity->type() == core::Entity::Controlable) {
+ render::gl::color(0, 1, 0, 1);
+ } else {
+ render::gl::color(1, 1, 1, 1);
+ }
+ // outer square0
render::gl::begin(render::gl::LineLoop);
glVertex3f(cx+r, cy, 0);
glVertex3f(cx, cy+r, 0);
diff --git a/src/client/view.cc b/src/client/view.cc
index 5879728..eef3920 100644
--- a/src/client/view.cc
+++ b/src/client/view.cc
@@ -170,15 +170,32 @@ void draw_status()
status << "^Nspeed ^B" << std::setfill(' ') << std::setw(5) << std::fixed
<< std::setprecision(2) << core::localcontrol()->speed();
- Text::draw(4, video::height - Text::fontheight() -4, status);
+ Text::draw(4, video::height - Text::fontheight()-4, status);
+
+ unsigned int state = core::localcontrol()->eventstate();
+ if (state) {
+ std::stringstream statestr;
+ statestr.clear();
+ if (state == core::Entity::ImpulseInitiate) {
+ statestr << "^FInitializing kinetic impulse drive " << core::localcontrol()->timer();
+ } else if (state == core::Entity::Impulse) {
+ statestr << "^FKinetic impulse";
+ } else if (state == core::Entity::JumpInitiate) {
+ statestr << "^FInitializing hyperspace jump drive "<< core::localcontrol()->timer();
+ } else if (state == core::Entity::Jump) {
+ statestr << "^FJumping...";
+ }
+
+ Text::draw(4, video::height - Text::fontheight()*2-4, statestr);
+ }
if (draw_location->value()) {
std::stringstream location;
- location << "^Nloc ^B" << std::fixed << std::setprecision(2) << std::setfill(' ') <<
- std::setw(7) << core::localcontrol()->location().x << " " <<
- std::setw(7) << core::localcontrol()->location().y << " " <<
- std::setw(7) << core::localcontrol()->location().z;
- Text::draw(4, video::height - Text::fontheight()*2 -4, location);
+ location << std::fixed << std::setprecision(2)
+ << "^Nx:^B" << core::localcontrol()->location().x << " "
+ << "^Ny:^B" << core::localcontrol()->location().y << " "
+ << "^Nz:^B" << core::localcontrol()->location().z << '\n';
+ Text::draw(4, video::height - Text::fontheight()*3 -4, location);
}
float y = 1.0f;