Skip to content

Commit

Permalink
Temporarily disable map label position update on map scroll
Browse files Browse the repository at this point in the history
There are a bunch of problems with this I need to fix.
  • Loading branch information
Vultraz committed Jul 9, 2017
1 parent ac4deaf commit cf0c42c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/display.cpp
Expand Up @@ -1698,22 +1698,25 @@ void display::draw_minimap_units()

bool display::scroll(int xmove, int ymove, bool force)
{
if(view_locked_ && !force /**&& !video_.update_locked()*/) {
if(view_locked_ && !force /*&& !video_.update_locked()*/) {
return false;
}

int new_x = xpos_ += xmove;
int new_y = ypos_ += ymove;

// Validate the new coordinates.
bounds_check_position(new_x, new_y);

// Set the new camera position.
xpos_ = new_x;
ypos_ = new_y;

const int dx = xpos_ - orig_x; // dx = -xmove
const int dy = ypos_ - orig_y; // dy = -ymove
// Get offset to adjust map labels by.
//const int dx = xpos_ - orig_x ; // dx = -xmove;
//const int dy = ypos_ - orig_y ; // dy = -ymove;

font::scroll_floating_labels(dx, dy);
//font::scroll_floating_labels(dx, dy);

labels().recalculate_shroud();

Expand Down

0 comments on commit cf0c42c

Please sign in to comment.