Re: masked blit bug (AMD 64/C version only?), was Re: [AD] True Colour font loading fix |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Sat, 2005-04-02 at 19:52 +0200, Evert Glebbeek wrote:
> A bit more on this issue, the following programme (which requires mysha.pcx
> from the examples directory) illustrates the problem:
>
> #include <allegro.h>
>
> int main()
> {
> BITMAP *bmp;
> PALETTE p;
>
> allegro_init();
> set_color_depth(32);
> set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0);
> install_keyboard();
>
> set_color_conversion(COLORCONV_NONE);
> bmp = load_bitmap("mysha.pcx", p);
> set_palette(p);
> set_color_conversion(COLORCONV_TOTAL);
> masked_blit(bmp, screen, 0,0, 0,0, bmp->w, bmp->h);
> blit(bmp, screen, 0,0, 0,bmp->h, bmp->w, bmp->h);
>
> readkey();
>
> return 0;
> }
> END_OF_MAIN()
>
> The masked_blit() produces an image of a squashed Mysha displayed four
> times with screwed up colours. The normal blit works ok.
> Changing the colourdepth to 16 instead of 32 bit also shows the problem,
> now with Mysha displayed twice (as to be expected) in funky colours.
> Allowing colour conversions when the bitmap is loaded also fixes the
> problem.
>
> The bug is somewhere in the C version of the masked_blit colour converter,
> but I didn't see it at first glance. I don't have more time to look at
> this right now, but I can continue to investigate tomorrow.
>
> By the way, is there a standard colour conversion test/example programme to
> check this with?
masked_blit doesn't support color conversion.
--
Elias Pschernig