WiiFlow_Lite/source/music/File.hpp
fix94.1 a36fab3cdd Making things ready for official wiiflow svn ;)
-made wait animation faster
-removed a few unneeded lines in the wait message code
-fixed booting wii games from disc
-fixed possible bug in wii game launching in general
-gecko output again on wii game booting
-converted alot of spaces to tabs, fitting the general wiiflow
coding style
-general cleaning up things
2012-07-25 22:12:17 +00:00

31 lines
640 B
C++

#ifndef FILE_HPP_
#define FILE_HPP_
#include <stdio.h>
#include <gctypes.h>
class CFile
{
public:
CFile();
CFile(const char * filepath, const char * mode);
CFile(const u8 * memory, int memsize);
~CFile();
int open(const char * filepath, const char * mode);
int open(const u8 * memory, int memsize);
void close();
int read(u8 * ptr, size_t size);
int write(const u8 * ptr, size_t size);
int seek(long int offset, int origin);
long int tell() { return Pos; };
long int size() { return filesize; };
void rewind() { seek(0, SEEK_SET); };
protected:
FILE * file_fd;
const u8 * mem_file;
u64 filesize;
long int Pos;
};
#endif