Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/Makefile.am9
-rw-r--r--src/client/client.cc10
-rw-r--r--src/client/client.h1
-rw-r--r--src/client/keyboard.cc2
-rw-r--r--src/client/map.cc161
-rw-r--r--src/client/map.h30
-rw-r--r--src/client/view.cc49
-rw-r--r--src/client/view.h3
-rw-r--r--src/game/base/game.cc2
-rw-r--r--src/game/base/ship.cc2
-rw-r--r--src/game/intro/convoy.cc2
-rw-r--r--src/model/classes.h6
-rw-r--r--src/model/map.cc26
-rw-r--r--src/render/draw.cc112
-rw-r--r--src/render/renderext.cc4
15 files changed, 272 insertions, 147 deletions
diff --git a/src/client/Makefile.am b/src/client/Makefile.am
index 1d015a3..4f78bbe 100644
--- a/src/client/Makefile.am
+++ b/src/client/Makefile.am
@@ -7,12 +7,13 @@ else
noinst_LTLIBRARIES = libclient.la
endif
-libclient_la_SOURCES = action.cc chat.cc client.cc clientext.cc input.cc joystick.cc key.cc \
- keyboard.cc notifications.cc soundext.cc targets.cc video.cc view.cc
+libclient_la_SOURCES = action.cc chat.cc client.cc clientext.cc input.cc \
+ joystick.cc key.cc keyboard.cc map.cc notifications.cc soundext.cc targets.cc \
+ video.cc view.cc
libclient_la_CFLAGS = $(LIBSDL_CFLAGS) $(GL_CFLAGS)
libclient_la_LDFLAGS = -avoid-version -no-undefined $(GL_LIBS) $(LIBSDL_LIBS)
-noinst_HEADERS = action.h chat.h client.h clientext.h input.h joystick.h key.h keyboard.h \
- notifications.h soundext.h targets.h video.h view.h
+noinst_HEADERS = action.h chat.h client.h clientext.h input.h joystick.h key.h \
+ keyboard.h map.h notifications.h soundext.h targets.h video.h view.h
libclient_la_LIBADD = $(top_builddir)/src/core/libcore.la $(top_builddir)/src/audio/libaudio.la \
$(top_builddir)/src/render/librender.la $(top_builddir)/src/ui/libui.la
diff --git a/src/client/client.cc b/src/client/client.cc
index 650813c..769aacb 100644
--- a/src/client/client.cc
+++ b/src/client/client.cc
@@ -117,6 +117,9 @@ void Client::init(int count, char **arguments)
func = core::Func::add("ui_chatsmall", Client::func_ui_chatsmall);
func->set_info("toggle small chat window");
+ func = core::Func::add("ui_map", Client::func_ui_map);
+ func->set_info("toggle map");
+
func = core::Func::add("snd_restart", Client::func_snd_restart);
func->set_info("restart audio subsystem");
@@ -352,5 +355,12 @@ void Client::func_ui_chatsmall(std::string const &args)
}
}
+void Client::func_ui_map(std::string const &args)
+{
+ if (core::application()->connected()) {
+ client()->view()->map()->toggle();
+ }
+}
+
} // namespace client
diff --git a/src/client/client.h b/src/client/client.h
index 8dd00cb..607c7f0 100644
--- a/src/client/client.h
+++ b/src/client/client.h
@@ -71,6 +71,7 @@ private:
static void func_r_restart(std::string const &args);
static void func_ui_chat(std::string const &args);
static void func_ui_chatsmall(std::string const &args);
+ static void func_ui_map(std::string const &args);
View *client_view;
diff --git a/src/client/keyboard.cc b/src/client/keyboard.cc
index ad96856..9c35771 100644
--- a/src/client/keyboard.cc
+++ b/src/client/keyboard.cc
@@ -184,7 +184,7 @@ Keyboard::Keyboard()
key->assign(Key::Alt, "quit");
#endif
add_key("f5", SDLK_F5);
- add_key("f6", SDLK_F6);
+ add_key("f6", SDLK_F6, 0, "ui_map");
add_key("f7", SDLK_F7);
add_key("f8", SDLK_F8);
add_key("f9", SDLK_F9);
diff --git a/src/client/map.cc b/src/client/map.cc
new file mode 100644
index 0000000..1183457
--- /dev/null
+++ b/src/client/map.cc
@@ -0,0 +1,161 @@
+
+/*
+ client/map.cc
+ This file is part of the Osirion project and is distributed under
+ the terms of the GNU General Public License version 2
+*/
+
+#include "core/application.h"
+#include "client/map.h"
+#include "client/targets.h"
+#include "ui/paint.h"
+#include "render/gl.h"
+#include "render/textures.h"
+
+namespace client {
+
+Map::Map(ui::Widget *parent) : ui::Widget(parent)
+{
+ set_label("map");
+ set_border(true);
+ set_background(true);
+ hide();
+}
+
+Map::~Map()
+{
+}
+
+void Map::toggle()
+{
+ if (visible())
+ hide();
+ else
+ show();
+}
+void Map::draw()
+{
+ const float margin = font()->width() * 2.0f;
+ const float w = width() - margin * 2.0f;
+ const float h = height() - margin * 2.0f;
+ const float s = math::min(w, h);
+ const float blue = 0.8f;
+ const float gridsize=16;
+
+ math::Vector2f v(global_location());
+ v.x += margin;
+ v.y += margin;
+
+ if (h > s ) {
+ v.y += (h-s) * 0.5f;
+ } else {
+ v.x += (w-s) * 0.5f;
+ }
+
+ gl::color(0,0,blue);
+
+ gl::begin(gl::Lines);
+ for (int i=0; i <= gridsize; i++) {
+
+ gl::vertex(v.x, v.y + s / gridsize * i);
+ gl::vertex(v.x + s, v.y + s / gridsize * i);
+
+ gl::vertex(v.x + s / gridsize * i, v.y);
+ gl::vertex(v.x + s / gridsize * i, v.y+s);
+ }
+ gl::end();
+
+ const size_t texture_entity = render::Textures::load("bitmaps/icons/entity_default");
+ const size_t texture_globe = render::Textures::load("bitmaps/icons/entity_globe");
+ const size_t texture_bright = render::Textures::load("bitmaps/icons/entity_bright");
+
+ size_t texture_current = render::Textures::bind(texture_entity);
+
+ v.x += s * 0.5f;
+ v.y += s * 0.5f;
+
+ core::Zone *zone = core::localplayer()->zone();
+
+ const float r = 24.0f;
+ float scale = 2048.0f;
+ scale *= 2;
+
+ gl::enable(GL_TEXTURE_2D);
+ gl::begin(gl::Quads);
+
+ for (core::Zone::Content::iterator it = zone->content().begin(); it != zone->content().end(); it++) {
+ core::Entity *entity = (*it);
+
+ bool draw_icon = false;
+ if ((entity->model()) || (entity->type() == core::Entity::Globe)) {
+ draw_icon = true;
+
+ if ((entity->type() == core::Entity::Dynamic) || (entity->type() == core::Entity::Controlable)) {
+ core::EntityDynamic *ed = dynamic_cast<core::EntityDynamic *>(entity);
+ if (ed->eventstate() ==core::Entity::Docked) {
+ draw_icon = false;
+ }
+ }
+
+ if (entity == core::localcontrol()) {
+ if (core::application()->time() - floorf(core::application()->time()) < 0.5f) {
+ draw_icon = false;
+ }
+ }
+
+ if (entity == targets::current()) {
+ if (core::application()->time() - floorf(core::application()->time()) < 0.5f) {
+ draw_icon = false;
+ }
+ }
+ }
+
+ if (draw_icon) {
+ if (entity->type() == core::Entity::Globe) {
+ if ((entity->flags() & core::Entity::Bright) == core::Entity::Bright) {
+ if (texture_current != texture_bright) {
+ gl::end();
+ texture_current = render::Textures::bind(texture_bright);
+ gl::begin(gl::Quads);
+ }
+ } else {
+ if (texture_current != texture_globe) {
+ gl::end();
+ texture_current = render::Textures::bind(texture_globe);
+ gl::begin(gl::Quads);
+ }
+ }
+ } else {
+ if (texture_current != texture_entity) {
+ gl::end();
+ texture_current = render::Textures::bind(texture_entity);
+ gl::begin(gl::Quads);
+ }
+ }
+
+ math::Vector2f l(v);
+ l.x -= s / scale * entity->location().y;
+ l.y -= s / scale * entity->location().x;
+
+ math::Color color(entity->color());
+ color.a = 1.0f;
+ gl::color(color);
+ glTexCoord2f(0.0f, 0.0f);
+ gl::vertex(l.x, l.y);
+
+ glTexCoord2f(1.0f, 0.0f);
+ gl::vertex(l.x+r, l.y);
+
+ glTexCoord2f(1.0f, 1.0f);
+ gl::vertex(l.x+r, l.y+r);
+
+ glTexCoord2f(0.0f, 1.0f);
+ gl::vertex(l.x, l.y+r);
+
+ }
+ }
+ gl::end();
+ gl::disable(GL_TEXTURE_2D);
+}
+
+} \ No newline at end of file
diff --git a/src/client/map.h b/src/client/map.h
new file mode 100644
index 0000000..cbdc216
--- /dev/null
+++ b/src/client/map.h
@@ -0,0 +1,30 @@
+/*
+ client/map.h
+ This file is part of the Osirion project and is distributed under
+ the terms of the GNU General Public License version 2
+*/
+
+#ifndef __INCLUDED_CLIENT_MAP_H__
+#define __INCLUDED_CLIENT_MAP_H__
+
+#include "ui/widget.h"
+
+namespace client {
+
+class Map : public ui::Widget
+{
+public:
+ Map(ui::Widget *parent = 0);
+ virtual ~Map();
+
+ void toggle();
+
+protected:
+ virtual void draw();
+};
+
+
+} // namespace client
+
+
+#endif // __INCLUDED_CLIENT_MAP_H__
diff --git a/src/client/view.cc b/src/client/view.cc
index de867c0..e7704f2 100644
--- a/src/client/view.cc
+++ b/src/client/view.cc
@@ -210,6 +210,7 @@ View::View(ui::Widget *parent) : ui::Widget(parent)
view_keypress = new KeyPress(this);
view_notify = new Notifications(this);
view_chat = new Chat(this);
+ view_map = new Map(this);
// make sure the view is at the bottom of the draw stack
lower();
@@ -232,6 +233,10 @@ void View::resize()
view_keypress->set_location(width() - view_keypress->width() - font()->width() * 0.5,
height() - view_keypress->height() - font()->height() * 0.5f);
+ // reposition map
+ view_map->set_size(width() - font()->width() * 8, height() - font()->height() * 8);
+ view_map->set_location(font()->width() * 4, font()->height() * 4);
+
// reposition center
view_center->set_size(ui::pointer_size, ui::pointer_size);
view_center->set_location((size() - view_center->size()) * 0.5f);
@@ -268,6 +273,9 @@ void View::draw()
}
} else {
view_notify->set_visible(false);
+
+ view_chat->set_visible(false);
+ view_map->set_visible(false);
}
if (core::localcontrol() && (input::mouse_control || input::joystick_control) &&
@@ -462,18 +470,18 @@ void draw_entity_target(core::Entity *entity, bool is_active_target)
// outer square shadow
gl::color(0, 0, 0, 1);
gl::begin(gl::LineLoop);
- glVertex3f(cx+r, cy+2, 0);
- glVertex3f(cx, cy+r+2, 0);
- glVertex3f(cx-r, cy+2, 0);
- glVertex3f(cx, cy-r+2, 0);
+ gl::vertex(cx+r, cy+2);
+ gl::vertex(cx, cy+r+2);
+ gl::vertex(cx-r, cy+2);
+ gl::vertex(cx, cy-r+2);
gl::end();
if ((entity->flags() & core::Entity::Dockable) == core::Entity::Dockable) {
gl::begin(gl::LineLoop);
- glVertex3f(cx+ (r*0.25f), cy+2, 0);
- glVertex3f(cx, cy+(r*0.25f)+2, 0);
- glVertex3f(cx-(r*0.25f), cy+2, 0);
- glVertex3f(cx, cy-(r*0.25f)+2, 0);
+ gl::vertex(cx+ (r*0.25f), cy+2);
+ gl::vertex(cx, cy+(r*0.25f)+2);
+ gl::vertex(cx-(r*0.25f), cy+2);
+ gl::vertex(cx, cy-(r*0.25f)+2);
gl::end();
}
@@ -487,18 +495,18 @@ void draw_entity_target(core::Entity *entity, bool is_active_target)
// outer square0
gl::begin(gl::LineLoop);
- glVertex3f(cx+r, cy, 0);
- glVertex3f(cx, cy+r, 0);
- glVertex3f(cx-r, cy, 0);
- glVertex3f(cx, cy-r, 0);
+ gl::vertex(cx+r, cy);
+ gl::vertex(cx, cy+r);
+ gl::vertex(cx-r, cy);
+ gl::vertex(cx, cy-r);
gl::end();
if ((entity->flags() & core::Entity::Dockable) == core::Entity::Dockable) {
gl::begin(gl::LineLoop);
- glVertex3f(cx+(r*0.25f), cy, 0);
- glVertex3f(cx, cy+(r*0.25f), 0);
- glVertex3f(cx-(r*0.25f), cy, 0);
- glVertex3f(cx, cy-(r*0.25f), 0);
+ gl::vertex(cx+(r*0.25f), cy);
+ gl::vertex(cx, cy+(r*0.25f));
+ gl::vertex(cx-(r*0.25f), cy);
+ gl::vertex(cx, cy-(r*0.25f));
gl::end();
}
@@ -682,7 +690,7 @@ void draw_hud()
}
}
-void draw_cursor()
+void set_cursor()
{
if (ui::console()->visible()) {
ui::root()->set_pointer();
@@ -757,9 +765,6 @@ void frame(float elapsed)
// draw the user interface
if (draw_ui->value()) {
- draw_cursor();
- ui::root()->frame();
-
// draw the hud - TODO move as much as possible into ui::
if (draw_ui->value() && !ui::root()->active()) {
gl::enable(GL_TEXTURE_2D);
@@ -769,6 +774,10 @@ void frame(float elapsed)
// draw the hud
draw_hud();
}
+
+ set_cursor();
+ ui::root()->frame();
+
} else if (ui::console()->visible()) {
ui::console()->event_draw();
}
diff --git a/src/client/view.h b/src/client/view.h
index c9c9156..250fa2d 100644
--- a/src/client/view.h
+++ b/src/client/view.h
@@ -9,6 +9,7 @@
#include "core/zone.h"
#include "client/chat.h"
+#include "client/map.h"
#include "client/notifications.h"
#include "ui/widget.h"
#include "ui/bitmap.h"
@@ -72,6 +73,7 @@ class View : public ui::Widget
public:
View(ui::Widget *parent=0);
+ inline Map *map() { return view_map; }
inline Chat *chat() { return view_chat; }
inline Notifications *notify() { return view_notify; }
@@ -87,6 +89,7 @@ private:
Stats *view_stats;
KeyPress *view_keypress;
Notifications *view_notify;
+ Map *view_map;
ui::Bitmap *view_center;
};
diff --git a/src/game/base/game.cc b/src/game/base/game.cc
index 50ec416..48e1b05 100644
--- a/src/game/base/game.cc
+++ b/src/game/base/game.cc
@@ -684,7 +684,7 @@ bool Game::load_menus(core::Entity *entity, const std::string &menufilename)
button = new ButtonDescription();
button->set_text("buy " + model->name());
button->set_command("buy " + model->label());
- button->set_modelname("ships/" + model->modelname());
+ button->set_modelname(model->modelname());
button->set_alignment(ButtonDescription::Left);
menu_dealer->add_button(button);
}
diff --git a/src/game/base/ship.cc b/src/game/base/ship.cc
index 3071bb7..7735aa1 100644
--- a/src/game/base/ship.cc
+++ b/src/game/base/ship.cc
@@ -26,7 +26,7 @@ const float MIN_DELTA = 0.000001f;
Ship::Ship(core::Player *owner, ShipModel *shipmodel) :
core::EntityControlable(owner, ship_enttype)
{
- set_modelname("ships/" + shipmodel->modelname());
+ set_modelname(shipmodel->modelname());
set_name(shipmodel->name() + ": <^B" + owner->name() + "^N>");
set_label(shipmodel->label());
diff --git a/src/game/intro/convoy.cc b/src/game/intro/convoy.cc
index c0fba52..3421538 100644
--- a/src/game/intro/convoy.cc
+++ b/src/game/intro/convoy.cc
@@ -16,7 +16,7 @@ Member::Member(std::string const &model) : core::EntityControlable(0, 1)
set_name("Convoy member");
set_label(model);
- set_modelname("ships/" + model);
+ set_modelname(model);
entity_thrust = 1.0f;
/*
diff --git a/src/model/classes.h b/src/model/classes.h
index f51a391..175070a 100644
--- a/src/model/classes.h
+++ b/src/model/classes.h
@@ -146,10 +146,16 @@ public:
{
return particles_script;
}
+
+ inline const float radius() const
+ {
+ return particles_radius;
+ }
std::string particles_script;
math::Vector3f particles_location;
math::Axis particles_axis;
+ float particles_radius;
};
/* ---- class Dock ------------------------------------------------- */
diff --git a/src/model/map.cc b/src/model/map.cc
index 29332ee..618fd51 100644
--- a/src/model/map.cc
+++ b/src/model/map.cc
@@ -795,7 +795,7 @@ Model * Map::load(std::string const &name)
unsigned int u;
float angle;
-
+
while (mapfile.getline()) {
if (mapfile.got_classname("worldspawn")) {
@@ -812,14 +812,19 @@ Model * Map::load(std::string const &name)
if (mapfile.got_key_int("enginesound", u)) {
model->model_enginesound = u;
continue;
+
} else if (mapfile.got_key_int("impulsesound", u)) {
model->model_impulsesound = u;
continue;
- } else if (mapfile.got_key_color("enginecolor", model->model_enginecolor) ==0) {
+
+ } else if (mapfile.got_key_color("enginecolor", model->model_enginecolor)) {
continue;
-
+/*
+ } else if (mapfile.got_key("name")) {
+ continue;
+*/
} else if (mapfile.got_key()) {
- con_warn "unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl;
+ con_warn "Unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl;
}
@@ -871,7 +876,7 @@ Model * Map::load(std::string const &name)
continue;
} else if (mapfile.got_key()) {
- con_warn "unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl;
+ con_warn "Unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl;
}
@@ -896,7 +901,7 @@ Model * Map::load(std::string const &name)
continue;
} else if (mapfile.got_key()) {
- con_warn "unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl;
+ con_warn "Unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl;
}
@@ -956,7 +961,7 @@ Model * Map::load(std::string const &name)
continue;
} else if (mapfile.got_key()) {
- con_warn "unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl;
+ con_warn "Unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl;
}
} else if (mapfile.got_classname("fx_particles")) {
@@ -984,14 +989,17 @@ Model * Map::load(std::string const &name)
} else if (mapfile.got_key_float("roll", angle)) {
particles->particles_axis.change_roll(angle);
-
+/*
+ } else if (mapfile.got_key_float("radius", particles->particles_radius)) {
+ particles->particles_radius *= LIGHTSCALE;
+*/
} else if (mapfile.got_key()) {
con_warn << "Unknown key " << mapfile.classname() << ":" << mapfile.key() << std::endl;
}
} else if (mapfile.got_classname()) {
- con_warn << "Unkown class '" << mapfile.classname() << "'" << std::endl;
+ con_warn << "Unkown class " << mapfile.classname() << std::endl;
}
}
diff --git a/src/render/draw.cc b/src/render/draw.cc
index b42a849..35b9956 100644
--- a/src/render/draw.cc
+++ b/src/render/draw.cc
@@ -249,7 +249,7 @@ void draw_globe(core::EntityGlobe *globe)
if (!globe->render_texture) {
gl::enable(GL_TEXTURE_2D);
}
- Textures::bind("bitmaps/fx/corona");
+ Textures::bind("textures/fx/corona");
/*
if (ext_render(globe)->distance() <= farplane) {
gl::depthmask(GL_FALSE);
@@ -712,11 +712,8 @@ void draw_pass_model_fx(float elapsed)
//const size_t count = 8; // number of engine trail particles
float t = 0.0f;
- //float u = 0.0f;
float a = 0.0f;
float light_size = 0.0f;
- //float engine_size = 0.0f;
- //float trail_size = 0.0f;
bool power = true;
float thrust;
@@ -727,12 +724,10 @@ void draw_pass_model_fx(float elapsed)
model::Light *light;
model::Flare *flare;
- //model::Engine *engine;
math::Axis flare_axis;
- //size_t circle_texture = Textures::load("bitmaps/fx/circle01");
- size_t current_texture = Textures::bind("bitmaps/fx/flare00");
+ size_t current_texture = Textures::bind("textures/fx/flare00");
gl::enable(GL_TEXTURE_2D);
gl::begin(gl::Quads);
@@ -858,106 +853,7 @@ void draw_pass_model_fx(float elapsed)
}
}
-/*
- // draw model engines for Controlable entities
- if ((entity->type() == core::Entity::Controlable) && entity->model()->engines().size()) {
- core::EntityControlable *ec = static_cast<core::EntityControlable *>(entity);
- u = ec->thrust();
- if ((ec->eventstate() == core::Entity::ImpulseInitiate) || (ec->eventstate() == core::Entity::Impulse)) {
- u = 1;
- }
-
- if (u > 0) {
- t = ext_render(entity)->state_engine_trail_offset;
- t += elapsed * 4.0f * u;
-
- if (t > 1.0f)
- t -= 1.0f;
- math::clamp(t, 0.0f, 1.0f);
- ext_render(entity)->state_engine_trail_offset = t;
-
- for(model::Model::Engines::iterator eit = entity->model()->engines().begin(); eit != entity->model()->engines().end(); eit++) {
-
- engine = (*eit);
- location.assign(entity->location() + (entity->axis() * engine->location()));
- engine_size = 0.0625 * engine->radius();
-
- if (current_texture != engine->texture() ) {
- gl::end();
- current_texture = Textures::bind(engine->texture());
- gl::begin(gl::Quads);
- }
-
- quad[0].assign(entity->axis().up() - entity->axis().left());
- quad[1].assign(entity->axis().up() + entity->axis().left());
- quad[2].assign(entity->axis().up() * -1 + entity->axis().left());
- quad[3].assign(entity->axis().up() * -1 - entity->axis().left());
-
- // assign engine color to the flare
- if (!engine->noflare()){
- color.assign(entity->model()->enginecolor());
- color.a = 0.9f * u;
-
- gl::color(color);
- glTexCoord2f(0,1);
- gl::vertex(location + quad[0] * engine_size);
- glTexCoord2f(0,0);
- gl::vertex(location + quad[1] * engine_size);
- glTexCoord2f(1,0);
- gl::vertex(location + quad[2] * engine_size);
- glTexCoord2f(1,1);
- gl::vertex(location + quad[3] * engine_size);
- Stats::quads++;
- }
-
- if (!(engine->notrail() || (ec->eventstate() == core::Entity::Impulse))) {
- // draw the engine trail
- if (current_texture != circle_texture) {
- gl::end();
- current_texture = Textures::bind(circle_texture);
- gl::begin(gl::Quads);
- }
- color.assign(1.0f, 1.0f);
- offset.assign(entity->axis().forward() * engine_size);
-
- if (t > 0)
- location -= offset * t;
-
- for (size_t i = count; i > 0; i--) {
- trail_size = engine_size * 0.8f * (0.4f + ((-t + (float) i) / (float) count) * 0.6f);
- color.a = (0.1f + ((-t + (float) i) / (float) count) * 0.7f) * u;
- gl::color(color);
- glTexCoord2f(0,1);
- gl::vertex(location + quad[0] * trail_size);
- glTexCoord2f(0,0);
- gl::vertex(location + quad[1] * trail_size);
- glTexCoord2f(1,0);
- gl::vertex(location + quad[2] * trail_size);
- glTexCoord2f(1,1);
- gl::vertex(location + quad[3] * trail_size);
- Stats::quads++;
-
-
- gl::color(color);
- glTexCoord2f(1,1);
- gl::vertex(location + quad[3] * trail_size);
- glTexCoord2f(1,0);
- gl::vertex(location + quad[2] * trail_size);
- glTexCoord2f(0,0);
- gl::vertex(location + quad[1] * trail_size);
- glTexCoord2f(0,1);
- gl::vertex(location + quad[0] * trail_size);
- Stats::quads++;
-
- location -= offset;
- }
- }
- }
- }
- }
- */
-
- // draw particles
+ // draw particle systems
if (ext_render(entity)->particles().size()) {
gl::end();
gl::disable(GL_CULL_FACE);
@@ -968,7 +864,7 @@ void draw_pass_model_fx(float elapsed)
}
gl::enable(GL_CULL_FACE);
- current_texture = Textures::bind("bitmaps/fx/flare00");
+ current_texture = Textures::bind("textures/fx/flare00");
gl::begin(gl::Quads);
}
}
diff --git a/src/render/renderext.cc b/src/render/renderext.cc
index 01e8fcf..0fa6796 100644
--- a/src/render/renderext.cc
+++ b/src/render/renderext.cc
@@ -40,7 +40,7 @@ RenderExt::RenderExt(core::Entity *entity) : core::Extension(core::Extension::Re
// load light texture
std::stringstream flarename;
- flarename << "bitmaps/fx/flare" << std::setfill('0') << std::setw(2) << light->flare();
+ flarename << "textures/fx/flare" << std::setfill('0') << std::setw(2) << light->flare();
light->render_texture = Textures::load(flarename.str());
}
@@ -49,7 +49,7 @@ RenderExt::RenderExt(core::Entity *entity) : core::Extension(core::Extension::Re
// load flare texture
std::stringstream flarename;
- flarename << "bitmaps/fx/flare" << std::setfill('0') << std::setw(2) << flare->flare();
+ flarename << "textures/fx/flare" << std::setfill('0') << std::setw(2) << flare->flare();
flare->render_texture = Textures::load(flarename.str());
}