
#ifdef __cplusplus
extern "C" {
#endif
/******************************************************************************/
/*                                                                            */
/*                        RAINE FILE ACCESS/ZIP SUPPORT                       */
/*                                                                            */
/******************************************************************************/

#ifndef mkdir_rwx

#include "deftypes.h"
#include "unzip.h"

#ifdef __MINGW32__
#define mkdir_rwx(name) mkdir(name)
#else
#define mkdir_rwx(name) mkdir(name, 0700)
#endif

int load_file(char *filename, UINT8 *dest, UINT32 size);
int save_file(char *filename, UINT8 *source, UINT32 size);

// zip files
int unz_locate_file_crc32(unzFile file, UINT32 crc32);
int unz_locate_file_name(unzFile file, char *name);
int size_file(char *filename);

#ifdef RAINE_DEBUG

void save_debug(UINT8 *name, UINT8 *src, UINT32 size, UINT32 mode);
#else
#define save_debug(name, src, size, mode)
#endif
#endif


#ifdef __cplusplus
}
#endif
