MGL_setFileIO
Overrides the default file I/O functions used by MGL.
Declaration
void MGLAPI MGL_setFileIO(
fileio_t *fio)
Prototype In
mgraph.h
Parameters
fio |
Structure containing new file I/O functions |
Description
This function allows the programmer to override the default file I/O functions used by all the MGL functions that access files (bitmap, font, icon and cursor loading). By default the standard C I/O functions are used and you can reset back to the standard C I/O functions by calling this function with the fio parameter set to NULL.
This function is useful for creating your own file system, such as storing all the bitmaps, fonts and icons that your application requires in a large file of your own format. This way end users browsing your program's data files will not be able to view any of the data (game developers may wish to keep the bitmaps used for levels in the game secret to make it harder for the user to cheat when playing the game).
This function allows you to overload the fopen, fclose, fseek, ftell, fread and fwrite functions used by MGL. See the fileio_t structure for more information.
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com