Re: [AD] load_datafile_object using index |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Mon, 2005-04-18 at 19:48 +0200, spoofer255@xxxxxxxxxx wrote:
> I made a patch that add indexed support for loading single datafile
> objects. Here is small example how to use it:
>
> -- cut --
>
> long index[DATA_COUNT] //defined in data.h (grabber)
> DATAFILE *data;
>
> if (load_datafile_indexed("filename", index) != 0)
> //report error
>
> data = load_datafile_object_indexed("filename", index[DATA_ALIEN]);
> if (!data)
> //report error
>
> -- cut --
>
> It's just like normal load_datafile_object, only faster because it
> doesn't search for name but fseeks to offset. Any chance it can be
> added into 4.3?
I like it. [Hm, must resist the urge to suggest putting it even into
4.2.0.. ] So, in any case, great work. I'll try it out later.
--
Elias Pschernig