Ignore:
Timestamp:
Apr 20, 2011, 9:02:33 PM (12 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/scene.cpp

    r494 r518  
    380380          text_blocker *first, JCFont *font)
    381381{
    382   short cx1,cy1,cx2,cy2,word_size,word_len;
    383   screen->get_clip(cx1,cy1,cx2,cy2);
    384   screen->in_clip(x1,y1,x2,y2);
     382  int cx1, cy1, cx2, cy2, word_size, word_len;
     383  screen->GetClip(cx1, cy1, cx2, cy2);
     384  screen->InClip(x1,y1,x2+1,y2+1);
    385385  int h=font->height()+2,w=font->width(),x=x1,dist;
    386386  y+=y1;
     
    467467  }
    468468
    469   screen->set_clip(cx1,cy1,cx2,cy2);
     469  screen->SetClip(cx1, cy1, cx2, cy2);
    470470  return (y<=y1);
    471471}
     
    495495      text_loaded=0,frame_speed=100,scroll_speed=50,pan_speed=60,abort=0,text_step=-2;
    496496
    497   short cx1,cy1,cx2,cy2;
     497  int cx1, cy1, cx2, cy2;
    498498
    499499  the_game->draw(1);
    500500
    501   screen->get_clip(cx1,cy1,cx2,cy2);
    502   screen->set_clip(the_game->viewx1,the_game->viewy1,
    503            the_game->viewx2,the_game->viewy2);
     501  screen->GetClip(cx1, cy1, cx2, cy2);
     502  screen->SetClip(the_game->viewx1, the_game->viewy1,
     503                   the_game->viewx2 + 1, the_game->viewy2 + 1);
    504504
    505505
     
    709709
    710710  free(strng);
    711   screen->set_clip(cx1,cy1,cx2,cy2);
     711  screen->SetClip(cx1, cy1, cx2, cy2);
    712712
    713713  the_game->draw(0);
    714714}
    715715
    716 
    717 
Note: See TracChangeset for help on using the changeset viewer.