[AD] Other bugs in C version

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


Now the library compiles but ex3d.exe gives strange results for
polygon_*_lit modes in true color. In order to get the good results you may
edit src/c/cscan.h and do the following :

in FUNC_POLY_SCANLINE_ATEX_LIT and FUNC_POLY_SCANLINE_PTEX_LIT replace

      unsigned long color = PS_BLEND(blender, GET_MEMORY_PIXEL(s), (c >>
16));

by :
      unsigned long color =   GET_MEMORY_PIXEL(s);
      color = PS_BLEND(blender, (c >> 16), color);

in FUNC_POLY_SCANLINE_ATEX_MASK_LIT and FUNC_POLY_SCANLINE_PTEX_MASK_LIT
replace

  color = PS_BLEND(blender, color, (c >> 16));

by
  color = PS_BLEND(blender, (c >> 16), color);

in src\c\cdefs8.h replace :
#define PS_BLEND(b,o,c)        ((b)->data[(c) & 0xFF][(o) & 0xFF])

by
#define PS_BLEND(b,o,c)        ((b)->data[(o) & 0xFF][(c) & 0xFF])
(in the right member, c and o are swapped)

And that's all folks !
Bertrand.



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