RE: [AD] update/properties

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


> I think this is the way to go. The grab method of plugins 
> could look like
> 
>    int (*grab)(DATAFILE *dat, AL_CONST char *filename, int 
> update, int 
> depth);

This didn't reach me before I went home, so I didn't :)
Instead, I noticed that all the code was very similar anyway,
so I made it a separate routine. One liners are still one
liners, thankfully.

> [Btw, can't we get rid of 'depth' too?]

I wanted to, but the only way to do it would be to turn it
into a property, and it's not one at the moment. Since it can
be passed as a command line parameter to the dat utility, I'm
not sure I have the "right" to add a "DPTH" property to all
objects of type BMP, RLE, etc, though it would clearly be
better to do so. If you have an idea, tell me.

The x/y/w/h being passed through properties, I also added the
ability to pass any property via the dat command line.

Also, since things like XCRP and friends are hardly generic,
I added the ability for a plugin to "declare" properties it
owns (several plugins can own the same properties), to know
which ones to discard when stripping. Menu plugins can do so
as well.

While there, datitype.c did not set the modified flag when
converting color depth, so I've added that too.

-- 
Vincent Penquerc'h 

Attachment: grab.diff
Description: Binary data



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