RE: [AD] user data

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


Title: RE: [AD] user data

> But you can always make a structure that contains a pointer
> to an Allegro
> structure, no ? IMHO that's more sensible: as your functions
> are basically
> wrappers around Allegro's functions, your structures are
> wrappers around
> Allegro's structures.

Sorry, I was not clear enough: this will not help when you get
a pointer to an Allegro structure, which you need to know whether
it has or does not have a particular feature.
Such wrapping would be possible if all functions dealing with
these structures would be done by the user. But there are cases
where this is not possible, when Allegro can give you a pointer
to one of its types, and thus can't give you a pointer to a
user defined wrapper structure.
This is the case for DIALOG, but also for BITMAPS, through the
ability to register image loaders, through the various variables
maintained by Allegro (the mouse sprite, for instance). It would
be too for PACKFILE and DATAFILE if we added the hooks for other compression schemes.

--
Vincent Penquerc'h



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