Ignore:
Timestamp:
Apr 22, 2011, 7:32:13 PM (11 years ago)
Author:
Sam Hocevar
Message:

imlib: rename trans_image to TImage. The code is now clean enough.

File:
1 edited

Legend:

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

    r532 r533  
    396396    sy1 = Max(v->cy1, sy1);
    397397    sy2 = Min(v->cy2, sy2);
    398     trans_image *p=picture();
     398    TImage *p=picture();
    399399
    400400    for (i=sy1; i<=sy2; i++)
    401       p->PutScanLine(screen,sx,i,0);
     401      p->PutScanLine(screen,vec2i(sx,i),0);
    402402  }
    403403}
     
    680680void game_object::draw_trans(int count, int max)
    681681{
    682   trans_image *cpict=picture();
     682  TImage *cpict=picture();
    683683  cpict->PutFade(screen,
    684           (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
    685           y-cpict->Size().y+1-current_vyadd,
     684          vec2i((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());
     
    691691void game_object::draw_tint(int tint_id)
    692692{
    693   trans_image *cpict=picture();
     693  TImage *cpict=picture();
    694694  if (fade_count())
    695695    cpict->PutFadeTint(screen,
    696                (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
    697                y-cpict->Size().y+1-current_vyadd,
     696               vec2i((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->PutRemap(screen,
    705                (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
    706                y-cpict->Size().y+1-current_vyadd,
     705               vec2i((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}
     
    711711void game_object::draw_double_tint(int tint_id, int tint2)
    712712{
    713   trans_image *cpict=picture();
     713  TImage *cpict=picture();
    714714  if (fade_count())
    715715    cpict->PutFadeTint(screen,
    716                (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
    717                y-cpict->Size().y+1-current_vyadd,
     716               vec2i((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->PutDoubleRemap(screen,
    725                (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
    726                y-cpict->Size().y+1-current_vyadd,
     725               vec2i((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);
     
    733733void game_object::draw_predator()
    734734{
    735   trans_image *cpict=picture();
     735  TImage *cpict=picture();
    736736  cpict->PutPredator(screen,
    737              (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
    738              y-cpict->Size().y+1-current_vyadd);
     737             vec2i((direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
     738                   y-cpict->Size().y+1-current_vyadd));
    739739
    740740}
     
    756756    else
    757757    {
    758       trans_image *cpict=picture();
     758      TImage *cpict=picture();
    759759      cpict->PutImage(screen,
    760                (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
    761                y-cpict->Size().y+1-current_vyadd);
     760               vec2i((direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
     761                     y-cpict->Size().y+1-current_vyadd));
    762762    }
    763763  }
Note: See TracChangeset for help on using the changeset viewer.