00001
00002 #ifndef header_module_reader
00003 #define header_module_reader
00004
00005 /*
00006 * The following structure is the ClanLib file reader driver for MikMod.
00007 * In fact MikMod core functions expect an MREADER struct, so the first
00008 * field of MCLANLIBREADER (core) is an MREADER, and this way the MikMod
00009 * code can access correctly all the fields of the MREADER core struct,
00010 * while we provide an additionnal pointer (input) to handle the file,
00011 * which is a CL_InputSource in ClanLib's case.
00012 * This method might look like an ugly hack but MikMod does this internally,
00013 * with an MFILEREADER struct casted an into a plain MREADER.
00014 */
00015 extern "C"
00016 {
00017 #include <mikmod.h>
00018
00019 typedef struct MCLANLIBREADER {
00020 MREADER core;
00021 void *input;
00022 } MCLANLIBREADER;
00023 }
00024
00025 #define CLANLIB_READER_CHANNELS 8
00026
00027 extern BOOL clanlib_reader_feof(MREADER* reader);
00028 extern BOOL clanlib_reader_read(MREADER* reader,void* ptr,size_t size);
00029 extern int clanlib_reader_get(MREADER* reader);
00030 extern BOOL clanlib_reader_seek(MREADER* reader,long offset,int whence);
00031 extern long clanlib_reader_tell(MREADER* reader);
00032 extern MREADER *new_clanlib_reader(void *input);
00033 extern void delete_clanlib_reader (MREADER* reader);
00034
00035 #endif
00036
1.2.6 written by Dimitri van Heesch,
© 1997-2001