Re: [AD] COLORCONV_KEEP_TRANS in datafiles + cleanup |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> Yes.. I remember, when I sent my preliminary COLORCONV_KEEP_TRANS patch
> back then, I planned to rewrite the datafile loader as well, but then
> when my program was working nicely with COLORCONV_NONE during loading,
> and then manual blit() conversion, I forgot about it :)
That's a good example which demonstrates why duplicating code is dangerous.
And I didn't know of the existence of yet another color conversion code
either, until you found it. Good catch !
> Heh, I just copied it without thinking, with the patch it's not needed
> anymore of course. The old code used a putpixel, which would have been
> affected by the current drawing mode (i think).
Oh! You're right, I missed the little putpixel() in the 8-bit case... we can
of course get rid of it with your patch.
There seems to be a problem though: a 15-bit bitmap will be read as a 16-bit
one. I agree that the internal format in the datafile is 16-bit for both,
but it must be converted back to 15-bit when reading.
--
Eric Botcazou
ebotcazou@xxxxxxxxxx