2012-06-03 15:48:14 +00:00
|
|
|
#ifndef MDFN_FILE_H
|
|
|
|
#define MDFN_FILE_H
|
|
|
|
|
2016-07-21 03:20:31 +00:00
|
|
|
#include <stdint.h>
|
2012-06-03 15:48:14 +00:00
|
|
|
|
|
|
|
#define MDFNFILE_EC_NOTFOUND 1
|
|
|
|
#define MDFNFILE_EC_OTHER 2
|
|
|
|
|
2016-07-21 03:20:31 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2012-06-03 15:48:14 +00:00
|
|
|
|
2016-07-21 03:20:31 +00:00
|
|
|
struct MDFNFILE
|
|
|
|
{
|
|
|
|
uint8_t *data;
|
|
|
|
int64_t size;
|
|
|
|
char *ext;
|
|
|
|
int64_t location;
|
|
|
|
};
|
2012-06-03 15:48:14 +00:00
|
|
|
|
2016-07-21 03:20:31 +00:00
|
|
|
struct MDFNFILE *file_open(const char *path);
|
2012-06-03 15:48:14 +00:00
|
|
|
|
2016-07-21 03:20:31 +00:00
|
|
|
int file_close(struct MDFNFILE *file);
|
2012-06-03 15:48:14 +00:00
|
|
|
|
2016-07-21 03:20:31 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2012-06-03 15:48:14 +00:00
|
|
|
|
|
|
|
#endif
|