Re: [AD] Fwd: Suggestions & Problems

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


----- Original Message -----
From: Vincent Penquerc'h <vincent@xxxxxxxxxx>
To: Conductors@xxxxxxxxxx. Com <conductors@xxxxxxxxxx>
Sent: Friday, March 09, 2001 4:06 AM
Subject: RE: [AD] Fwd: Suggestions & Problems


> > > 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 ?
>

the struct would look like:

sturct FLI
{
FLI_FILE *fp;
// the globals (not sure about the exact names)
int dirty_pal_start, dirty_pal_end;
BITMAP *bitmap_written_to;
int current_frame;
// etc.
}

> --
> Lyrian
>
>
>



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