Skip to content

Commit

Permalink
Display: removed old software blitting routines from scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Mar 18, 2018
1 parent 11054e9 commit 079ec37
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions src/display.cpp
Expand Up @@ -1423,45 +1423,6 @@ bool display::scroll(int xmove, int ymove, bool force)

labels().recalculate_shroud();


if(!screen_.update_locked()) {
surface& screen(screen_.getSurface());


SDL_Rect srcrect = dstrect;
srcrect.x -= diff_x;
srcrect.y -= diff_y;

// This is a workaround for a SDL2 bug when blitting on overlapping surfaces. The bug
// only strikes during scrolling, but will then duplicate textures across the entire map.
//surface screen_copy = make_neutral_surface(screen);

//SDL_SetSurfaceBlendMode(screen_copy, SDL_BLENDMODE_NONE);
//SDL_BlitSurface(screen_copy, &srcrect, screen, &dstrect);
}

if(diff_y != 0) {
SDL_Rect r = map_area();

if(diff_y < 0) {
r.y = r.y + r.h + diff_y;
}

r.h = std::abs(diff_y);
invalidate_locations_in_rect(r);
}

if(diff_x != 0) {
SDL_Rect r = map_area();

if(diff_x < 0) {
r.x = r.x + r.w + diff_x;
}

r.w = std::abs(diff_x);
invalidate_locations_in_rect(r);
}

scroll_event_.notify_observers();

redrawMinimap_ = true;
Expand Down

0 comments on commit 079ec37

Please sign in to comment.