Re: [AD] bmp_write15(), _[get|put]pixel15()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> Good, here's a proposed patch. Feel free to think of a better name
> instead of ALLEGRO_PIXEL_15_EQUALS_16. Should I commit it?

Hmm... I'm a little sceptical about the whole patch because of:

#define SCANLINE_DRAWER(bits_pp, GETPIXEL) \
   static void draw_scanline_##bits_pp(BITMAP *bmp, BITMAP *spr, \
           fixed l_bmp_x, int bmp_y_i, \
           fixed r_bmp_x, \
           fixed l_spr_x, fixed l_spr_y, \
           fixed spr_dx, fixed spr_dy) \
   { \
      int c; \
      unsigned long addr, end_addr; \
      unsigned char **spr_line = spr->line; \
      \
      r_bmp_x >>= 16; \
      l_bmp_x >>= 16; \
      bmp_select(bmp); \
      addr = bmp_write_line(bmp, bmp_y_i); \
      end_addr = addr + r_bmp_x * ((bits_pp + 7) / 8); \
      addr += l_bmp_x * ((bits_pp + 7) / 8); \
      for (; addr <= end_addr; addr += ((bits_pp + 7) / 8)) { \
  GETPIXEL; \
  if (c != MASK_COLOR_##bits_pp) \   *** (1) ***
     bmp_write##bits_pp(addr, c); \
  l_spr_x += spr_dx; \
  l_spr_y += spr_dy; \
      } \
   }

(1) MASK_COLOR_15 is not equal to MASK_COLOR_16.

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/