RE: [AD] Fwd: Suggestions & Problems

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


> > Are there default arguments in ANSI C? I could ensure backwards 
> > compatibiity 
> > by passing a static structure (FLI or FLC?)to the functions. 
> > Something like:
> > 
> > (type) play_fli(FLI *movie = global_struct) { ... }
> 
> Not directly. What you should so is pass a NULL pointer for default, in
> which case the routine will use a set of default parameters, which should
> be a static struct defined in the function (if possible). This should be
> the clean way to do it I think.

hmm, looking at this again, it seems the paramter you would pass is a
pointer to the fli itself, not a structure containing play parameters ?
when you call play, you sure give a fli to play, no ? or you mean it
should play the last played fli ? it could have been deallocated since
then. maybe it would be better to require a valid parameter, which the
fli playing routines already do, looking at the docs.
or did a miss your point ?

-- 
Lyrian 



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