[AD] load_datafile_object using index |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
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?
Attachment:
datafile.c.diff
Description: Binary data
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |