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

imlib: merge almost all trans_image blit methods into one large template
function and refactor them for size.

File:
1 edited

Legend:

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

    r527 r528  
    3131  uint8_t *Data() { return m_data; }
    3232
    33   void put_image(image *screen, int x, int y);   // always transparent
     33  void PutImage(image *screen, int x, int y); // always transparent
     34  void PutRemap(image *screen, int x, int y, uint8_t *remap);
     35  void PutDoubleRemap(image *screen, int x, int y,
     36                      uint8_t *remap, uint8_t *remap2);
     37  void PutFade(image *screen, int x, int y, int amount, int total_frames,
     38               color_filter *f, palette *pal);
     39  void PutFadeTint(image *screen, int x, int y, int amount, int total_frames,
     40                   uint8_t *tint, color_filter *f, palette *pal);
     41  void PutColor(image *screen, int x, int y, uint8_t color);
     42  void PutFilled(image *screen, int x, int y, uint8_t color);
     43  void PutPredator(image *screen, int x, int y);
     44  void PutBlend(image *screen, int x, int y, image *blend, int bx, int by,
     45                int blend_amount, color_filter *f, palette *pal);
    3446
    3547  // if screen x & y offset already calculated save a mul
    3648  // and no clipping, but fast use this
    3749  void put_image_offseted(image *screen, uint8_t *s_off);
    38   void put_image_filled(image *screen, int x, int y,
    39             uint8_t fill_color);
    40   void put_fade(image *screen, int x, int y,
    41                int frame_on, int total_frames,
    42                color_filter *f, palette *pal);
    43   void put_fade_tint(image *screen, int x, int y,
    44              int frame_on, int total_frames,
    45              uint8_t *tint,
    46              color_filter *f, palette *pal);
    47   void put_color(image *screen, int x, int y, int color);
    4850
    49   void put_blend16(image *screen, image *blend, int x, int y,
    50                int blendx, int blendy, int blend_amount, color_filter *f, palette *pal);
    51   void put_double_remaped(image *screen, int x, int y, unsigned char *remap, unsigned char *remap2);
    52   void put_remaped(image *screen, int x, int y, unsigned char *remap);
    53   void put_predator(image *screen, int x, int y);
    5451  void put_scan_line(image *screen, int x, int y, int line);   // always transparent
    5552  size_t MemUsage();
     
    6158                      int x, int &y, int &ysteps);
    6259
     60  enum PutMode { NORMAL, REMAP, DOUBLE_REMAP, FADE, FADE_TINT, COLOR,
     61                 FILLED, PREDATOR, BLEND };
     62  template<int N>
     63  void PutImageGeneric(image *dest, int x, int y, uint8_t color,
     64                       image *blend, int bx, int by,
     65                       uint8_t *map1, uint8_t *map2, int amount,
     66                       int total_frames, uint8_t *tint,
     67                       color_filter *f, palette *pal);
     68
    6369  vec2i m_size;
    6470  uint8_t *m_data;
Note: See TracChangeset for help on using the changeset viewer.