Ignore:
Timestamp:
Apr 22, 2011, 4:13:04 AM (11 years ago)
Author:
Sam Hocevar
Message:

imlib: some cleaning up in trans_image before I templatise half of it.

File:
1 edited

Legend:

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

    r519 r527  
    587587void game_object::picture_space(int32_t &x1, int32_t &y1,int32_t &x2, int32_t &y2)
    588588{
    589   int xc=x_center(),w=picture()->width(),h=picture()->height();
     589  int xc=x_center(),w=picture()->Size().x,h=picture()->Size().y;
    590590  if (direction>0)
    591591    x1=x-xc;
     
    682682  trans_image *cpict=picture();
    683683  cpict->put_fade(screen,
    684           (direction<0 ? x-(cpict->width()-x_center()-1) : x-x_center())-current_vxadd,
    685           y-cpict->height()+1-current_vyadd,
     684          (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
     685          y-cpict->Size().y+1-current_vyadd,
    686686          count,max,
    687687          color_table,the_game->current_palette());
     
    694694  if (fade_count())
    695695    cpict->put_fade_tint(screen,
    696                (direction<0 ? x-(cpict->width()-x_center()-1) : x-x_center())-current_vxadd,
    697                y-cpict->height()+1-current_vyadd,
     696               (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
     697               y-cpict->Size().y+1-current_vyadd,
    698698               fade_count(),fade_max(),
    699699               cache.ctint(tint_id)->data,
     
    703703  else
    704704    cpict->put_remaped(screen,
    705                (direction<0 ? x-(cpict->width()-x_center()-1) : x-x_center())-current_vxadd,
    706                y-cpict->height()+1-current_vyadd,
     705               (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
     706               y-cpict->Size().y+1-current_vyadd,
    707707               cache.ctint(tint_id)->data);
    708708}
     
    714714  if (fade_count())
    715715    cpict->put_fade_tint(screen,
    716                (direction<0 ? x-(cpict->width()-x_center()-1) : x-x_center())-current_vxadd,
    717                y-cpict->height()+1-current_vyadd,
     716               (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
     717               y-cpict->Size().y+1-current_vyadd,
    718718               fade_count(),fade_max(),
    719719               cache.ctint(tint_id)->data,
     
    723723  else
    724724    cpict->put_double_remaped(screen,
    725                (direction<0 ? x-(cpict->width()-x_center()-1) : x-x_center())-current_vxadd,
    726                y-cpict->height()+1-current_vyadd,
     725               (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
     726               y-cpict->Size().y+1-current_vyadd,
    727727               cache.ctint(tint_id)->data,
    728728               cache.ctint(tint2)->data);
     
    735735  trans_image *cpict=picture();
    736736  cpict->put_predator(screen,
    737              (direction<0 ? x-(cpict->width()-x_center()-1) : x-x_center())-current_vxadd,
    738              y-cpict->height()+1-current_vyadd);
     737             (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
     738             y-cpict->Size().y+1-current_vyadd);
    739739
    740740}
     
    758758      trans_image *cpict=picture();
    759759      cpict->put_image(screen,
    760                (direction<0 ? x-(cpict->width()-x_center()-1) : x-x_center())-current_vxadd,
    761                y-cpict->height()+1-current_vyadd);
     760               (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
     761               y-cpict->Size().y+1-current_vyadd);
    762762    }
    763763  }
     
    787787    if (checks&2)
    788788    {
    789       h=picture()->height();
     789      h=picture()->Size().y;
    790790      x2=x+xv;
    791791      y2=y-h+1+yv;
Note: See TracChangeset for help on using the changeset viewer.