Ignore:
Timestamp:
Apr 20, 2011, 9:02:33 PM (11 years ago)
Author:
Sam Hocevar
Message:

imlib: refactor dirty_rect clipping coordiantes so that the upper
bound is no longer inclusive. It will make things easier in the future.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/automap.cpp

    r515 r518  
    5959    draw_ystart=centery-(y*AUTOTILE_HEIGHT/f_hi-sy*AUTOTILE_HEIGHT);
    6060
    61   // if view position hasn't changed, only update the binking dot and return
     61  // if view position hasn't changed, only update the blinking dot and return
    6262  if (draw_xstart==old_dx && draw_ystart==old_dy)
    6363  {
    6464   automap_window->screen->Lock();
    65    automap_window->screen->add_dirty(centerx,centery,centerx,centery);
     65   automap_window->screen->AddDirty(centerx,centery,centerx + 1,centery + 1);
    6666    if ((tick++)&4)
    6767      automap_window->screen->PutPixel(vec2i(centerx,centery),255);
     
    9696  // we are going to redraw the whole map, so make the dirty rect work easier by marking
    9797  // everything dirty
    98   screen->add_dirty(window_xstart,window_ystart,window_xend,window_yend);
     98  screen->AddDirty(window_xstart,window_ystart,window_xend+1,window_yend+1);
    9999
    100100
     
    105105  // we will slam on as fast as possible
    106106
    107   screen->set_clip(window_xstart,window_ystart,window_xend,window_yend);
     107  screen->SetClip(window_xstart,window_ystart,window_xend+1,window_yend+1);
    108108/*  for (i=draw_xstart,j=draw_ystart,x=sx,y=sy; y<=ey; j+=AUTOTILE_HEIGHT,y++)
    109109    foretiles[cur_lev->get_fg(x,y)]->micro_image->put_image(screen,i,j,0);
     
    149149
    150150  // set the clip back to full window size because soemthing else could mess with the area
    151   automap_window->screen->set_clip(0,0,screen->Size().x-1,screen->Size().y-1);
     151  automap_window->screen->SetClip(0,0,screen->Size().x,screen->Size().y);
    152152}
    153153
Note: See TracChangeset for help on using the changeset viewer.