From: Eric B. <ebo...@li...> - 2003-05-30 08:30:25
|
> The first is where to find allegro dll's or how to produce them. I use > borland's free commandolinetools 5.5 (windows 98) with allegro but had to > search relatively long on the net to find an appropriate dll (alleg41.dll) > and was able to compile and run my programs. What I didn't find at all > were the debugging and profiling dll's, how can I make / get them? Yes, you're right. There is no DLLs package for the 4.1.x series on the Allegro site. The rationale is that it is an unstable development series so we would rather not have it used by applications. So we only provide the sources, but Borland C++ can't build the DLLs from the sources for the time being... What do others think? Should we provide the DLLs for the unstable series too? > What I want to do is to draw a frame of the game on a double buffer, draw > 8 bit light levels onto a second bitmap and finally overlay the second bmp > on the first to get a darkening effect. My implementation: The double > buffer is a truecolor bitmap. The bitmap with light levels is a 32 bit > bitmap, I used the set_write_alpha_blender() to draw the light levels on > it. To overlay the second bitmap on the first I used set_alpha_blender(). The standard procedure, see for instance examples/extrans.c and the comment at the beginning of the truecolor case. > It all worked but I asked myself why to use a 32 bit image if it is all > black and only the alpha channel is meaningful. I think that an 8 bit > bitmap will do the same, maibye faster. I hope I was clear enough! Yes, but there is no function in the library that can manipulates 8-bit alpha channel bitmaps directly. You always need to write it to a RGBA 32-bit bitmap first, after setting set_write_alpha_blender(). The other solution would be to use draw_trans_sprite() with the luminance blender and full solidity (a=255). But with this method the light bitmap must be of the same color depth as the destination bitmap. Maybe faster, but I'm not sure. -- Eric Botcazou |