Replace direct file access with VFS routines
This commit is contained in:
14
src/file.h
14
src/file.h
@@ -2,27 +2,23 @@
|
||||
#define _FCEU_FILE_H
|
||||
|
||||
typedef struct {
|
||||
uint8 *data;
|
||||
uint32 size;
|
||||
uint32 location;
|
||||
uint8 *data_int;
|
||||
const uint8 *data;
|
||||
uint32 size;
|
||||
uint32 location;
|
||||
} MEMWRAP;
|
||||
|
||||
typedef struct {
|
||||
MEMWRAP *fp;
|
||||
uint32 type; /* 0=normal file, 1=gzip, 2=zip */
|
||||
} FCEUFILE;
|
||||
|
||||
FCEUFILE *FCEU_fopen(const char *path, const char *ipsfn, char *mode, char *ext, uint8 *buffer, size_t bufsize);
|
||||
FCEUFILE *FCEU_fopen(const char *path, const uint8 *buffer, size_t bufsize);
|
||||
int FCEU_fclose(FCEUFILE*);
|
||||
uint64 FCEU_fread(void *ptr, size_t size, size_t nmemb, FCEUFILE*);
|
||||
uint64 FCEU_fwrite(void *ptr, size_t size, size_t nmemb, FCEUFILE*);
|
||||
int FCEU_fseek(FCEUFILE*, long offset, int whence);
|
||||
uint64 FCEU_ftell(FCEUFILE*);
|
||||
void FCEU_rewind(FCEUFILE*);
|
||||
int FCEU_read32le(uint32 *Bufo, FCEUFILE*);
|
||||
int FCEU_read16le(uint16 *Bufo, FCEUFILE*);
|
||||
int FCEU_fgetc(FCEUFILE*);
|
||||
uint64 FCEU_fgetsize(FCEUFILE*);
|
||||
int FCEU_fisarchive(FCEUFILE*);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user