From d763e294f44eb38b94bf7e2055b77a982b72b7c0 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 16 Aug 2009 17:34:00 +0000 Subject: more constness --- src/client/map.cc | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'src/client/map.cc') diff --git a/src/client/map.cc b/src/client/map.cc index a2a353a..46ac583 100644 --- a/src/client/map.cc +++ b/src/client/map.cc @@ -83,19 +83,19 @@ void Map::draw() math::Vector2f v(global_location()); math::Vector2f l; - v.x += margin; - v.y += (height() - s - 2.0f * margin) * 0.5f; + v[0] += margin; + v[1] += (height() - s - 2.0f * margin) * 0.5f; map_hover = 0; 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(), 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::vertex(v.x() + s / gridsize * i, v.y()); + gl::vertex(v.x() + s / gridsize * i, v.y() + s); } gl::end(); @@ -105,8 +105,8 @@ void Map::draw() size_t texture_current = render::Textures::bind(texture_entity); - v.x += s * 0.5f; - v.y += s * 0.5f; + v[0] += s * 0.5f; + v[0] += s * 0.5f; core::Zone *zone = core::localplayer()->zone(); @@ -128,8 +128,8 @@ void Map::draw() if (targets::is_valid_map_target(entity)) { draw_icon = true; - l.x -= s / scale * entity->location().y; - l.y -= s / scale * entity->location().x; + l[0] -= s / scale * entity->location().y(); + l[1] -= s / scale * entity->location().x(); if (math::distancesquared(cursor, l) < (r*r)) { map_hover = entity->id(); @@ -175,16 +175,16 @@ void Map::draw() gl::color(color); glTexCoord2f(0.0f, 0.0f); - gl::vertex(l.x-r, l.y-r); + gl::vertex(l.x() - r, l.y() - r); glTexCoord2f(1.0f, 0.0f); - gl::vertex(l.x+r, l.y-r); + gl::vertex(l.x() + r, l.y() - r); glTexCoord2f(1.0f, 1.0f); - gl::vertex(l.x+r, l.y+r); + gl::vertex(l.x() + r, l.y() + r); glTexCoord2f(0.0f, 1.0f); - gl::vertex(l.x-r, l.y+r); + gl::vertex(l.x() - r, l.y() + r); } } @@ -194,8 +194,8 @@ void Map::draw() //if (core::localcontrol()->state() != core::Entity::Docked) { l.assign(v); - l.x -= s / scale * entity->location().y; - l.y -= s / scale * entity->location().x; + l[0] -= s / scale * entity->location().y(); + l[1] -= s / scale * entity->location().x(); if (core::application()->time() - floorf(core::application()->time()) < 0.5f) { if (texture_current != texture_entity) { gl::end(); @@ -207,16 +207,16 @@ void Map::draw() color.a = 1.0f; gl::color(color); glTexCoord2f(0.0f, 0.0f); - gl::vertex(l.x-r, l.y-r); - + gl::vertex(l.x() - r, l.y() - r); + glTexCoord2f(1.0f, 0.0f); - gl::vertex(l.x+r, l.y-r); + gl::vertex(l.x() + r, l.y() - r); glTexCoord2f(1.0f, 1.0f); - gl::vertex(l.x+r, l.y+r); + gl::vertex(l.x() + r, l.y() + r); glTexCoord2f(0.0f, 1.0f); - gl::vertex(l.x-r, l.y+r); + gl::vertex(l.x() - r, l.y() + r); } //} -- cgit v1.2.3