Re: [AD] user data

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


Vincent Penquerc'h wrote:
> I think a marvellous idea would be to include a user data
> (most probably a void*) in every structure of note, to allow
> the user to store whatever she wants in those. Structures
> that I particularly target are BITMAP and DIALOG (*yes*, DIALOG).

BITMAP already has `void *extra', but I suppose it doesn't hurt to add
the field to other things as well (SAMPLE, RLE_SPRITE, DATAFILE,
PACKFILE etc). It would add tons of warnings to every piece of existing
code that uses DIALOG, because gcc complains when you initialize some
but not all elements in a struct. OTOH, I think DIALOGs are the most
useful struct to add this to because you often extend it in some way. Do
you have any particular situation in mind where this would be useful for
other objects than DIALOGs?

-- 
Sven Sandberg    svsa1977@xxxxxxxxxx    home.student.uu.se/svsa1977



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