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

imlib: remove trans_image::put_image_offseted, it's simply a version
of PutImage? that skips the bounds checks. Yaddah yaddah modern hardware
blah.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/timage.cpp

    r528 r530  
    241241}
    242242
    243 void trans_image::put_image_offseted(image *screen, uint8_t *s_off)   // if screen x & y offset already calculated save a mul
    244 {
    245   int ix,ysteps=m_size.y;
    246   int screen_skip;
    247   uint8_t skip,*datap=m_data;
    248 
    249   screen->Lock();
    250   screen_skip = screen->Size().x - m_size.x;
    251   for (; ysteps; ysteps--)
    252   {
    253     for (ix=0; ix<m_size.x; )
    254     {
    255       skip=*datap;       // skip leading blank space
    256       datap++;
    257       ix+=skip;
    258       s_off+=skip;
    259 
    260       if (s_off<screen->scan_line(0))
    261           printf("bad write in trans_image::put_image_offseted");
    262 
    263 
    264       if (ix<m_size.x)
    265       {
    266     skip=*datap;
    267     datap++;
    268     memcpy(s_off,datap,skip);
    269     datap+=skip;
    270     s_off+=skip;
    271     ix+=skip;
    272 
    273     if (s_off>=screen->scan_line(screen->Size().y+1))
    274             printf("bad write in trans_image::put_image_offseted");
    275       }
    276     }
    277     s_off+=screen_skip;
    278   }
    279   screen->Unlock();
    280 }
    281 
    282243template<int N>
    283244void trans_image::PutImageGeneric(image *screen, int x, int y, uint8_t color,
Note: See TracChangeset for help on using the changeset viewer.