RE: [AD] Proposed changes for Allegro 5 (6?) |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
> Subbitmaps and planar bitmaps are probably the only type of
> bitmaps that can
> have mixed types. Bit flags anyone?
Makes sense. And stuff RLE sprites in it too, with a bit for RLE format ?
Though blitting on RLEs is not possible at the moment, so it might be
problematic ... It would go towards your idea of unifying both types though.
> so TGA is a raw format? doubtful.
> A quick search on wotsit revealed that TGAs have their
> headers at the *end*
> of the file. An analysis of the beginning of the file for
> consistency) can
> also help in determining the file type. The same type of
> consistency check
> can be done on PCX files.
Oh, I didn't know that for TGAs. I just looked at /etc/magic :)
PCX though, has a single non-changing byte in its header, and another one
than can take two or three values. The rest have "probable" values, like
resolution, or inches size, but that hardly can be used as detection, as
it is too likely to get rejection for valid PCX files with odd sizes or
the like. You'd be enforcing a certain type of "Allegro compliant" sub
format. Which is not very nice.
For the record, neither TGA nor PCX are recognized in my /etc/magic, PCX
is there but commented out becauses it is not reliable enough.
> But most types in Allegro are ints anyway :)
> It'll also allow us to add many more attributes without
> having to break the
> API every time, or resort to adding new functions (like text_mode).
Well, maybe there are advantages to this way of specifying parameters,
but I didn't spot them. You want to set something, do it, do not ask for
someone to do it in an odd way. Maybe it decreases the number of API calls
but it certainly won't decrease the complexity of the code.
I don't like bloat in the sense of duplicated or useless code, but this
kind of bloat (splitting unrelated things into more functions) strikes me
as "good bloat" :) But it's more gut feeling that real arguments I have.
--
Vincent Penquerc'h
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |