Changeset 521 for abuse/trunk


Ignore:
Timestamp:
Apr 21, 2011, 9:03:06 PM (12 years ago)
Author:
Sam Hocevar
Message:

imlib: remove unused image::make_color and timage::make_color. They were
probably used for debugging purposes, but we can still revive them when
we need them.

Location:
abuse/trunk/src/imlib
Files:
4 edited

Legend:

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

    r519 r521  
    14471447}
    14481448
    1449 void image::make_color(uint8_t color)
    1450 {
    1451   uint8_t *sl;
    1452   int y, x;
    1453   Lock();
    1454   for (y=0; y<m_size.y; y++)
    1455   {
    1456     sl=scan_line(y);
    1457     for (x=m_size.x; x; x--, sl++)
    1458       if (*sl)
    1459         *sl=color;
    1460   }
    1461   Unlock();
    1462 }
  • abuse/trunk/src/imlib/image.h

    r518 r521  
    200200    void flip_x();
    201201    void flip_y();
    202     void make_color(uint8_t color);
    203202    uint8_t darkest_color(palette *pal, int16_t noblack = 0);
    204203};
  • abuse/trunk/src/imlib/timage.cpp

    r520 r521  
    1515#include "timage.h"
    1616
    17 void trans_image::make_color(int c)
    18 {
    19   uint8_t *dp=data;
    20   int y,x;
    21   for (y=0; y<h; y++)
    22   {
    23     x=0;
    24     while(x<w)
    25     {
    26       x+=*(dp++);
    27       if (x<w)
    28       {
    29     int run=*(dp++);
    30     memset(dp,c,run);
    31     x+=run;
    32     dp+=run;
    33       }
    34     }
    35   }
    36 }
    37 
    3817image *trans_image::make_image()
    3918{
  • abuse/trunk/src/imlib/timage.h

    r520 r521  
    5656  void put_scan_line(image *screen, int x, int y, int line);   // always transparent
    5757  unsigned char *t_data() { return data; }
    58   void make_color(int c);
    5958  int size();
    6059  image *make_image();
Note: See TracChangeset for help on using the changeset viewer.