Re: [AD] Indexed datafiles

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


On 2005-12-26, Elias Pschernig <elias@xxxxxxxxxx> wrote:
> On Thu, 2005-12-22 at 16:01 +0100, Elias Pschernig wrote:
> > On Thu, 2005-12-22 at 13:20 +0100, Hrvoje Ban wrote:
> > > 4.2 is out, so I'm posting my load_datafile_object_indexed patch
> > > again.
> > 
> > Thanks. I'll apply it (to 4.3) if nobody objects.
> 
> Ok, done. Attached is a patch to update examples and docs accordingly.

> Index: examples/exdata.c
> ===================================================================
> --- examples/exdata.c	(revision 5577)
> +++ examples/exdata.c	(working copy)
...
> @@ -68,6 +62,23 @@
>     /* unload the datafile when we are finished with it */
>     unload_datafile(datafile);
>  
> +   /* Demonstrate how to speed up loading a single object with an index */
> +   DATAFILE_INDEX *index = create_datafile_index("example.dat");
> +   DATAFILE *palette_object = load_datafile_object_indexed(index, THE_PALETTE);
> +   DATAFILE *font_object = load_datafile_object_indexed(index, BIG_FONT);

Stick to pre-C99 C.  Actually, I'm not sure exdata.c should be changed
at all.  This datafile index thing is a little bit "advanced", whereas
exdata.c should demonstrate the basics.

Peter





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