2 Skelton for retropc emulator
4 Author : Takeda.Toshiya
14 #include <agar/core.h>
15 #elif defined(_USE_QT)
16 #include <QtCore/QFile>
17 #include <QtCore/QFileInfo>
24 #define FILEIO_READ_BINARY 1
25 #define FILEIO_WRITE_BINARY 2
26 #define FILEIO_READ_WRITE_BINARY 3
27 #define FILEIO_READ_WRITE_NEW_BINARY 4
28 #define FILEIO_READ_ASCII 5
29 #define FILEIO_WRITE_ASCII 6
30 #define FILEIO_READ_WRITE_ASCII 7
31 #define FILEIO_READ_WRITE_NEW_ASCII 8
32 #define FILEIO_WRITE_APPEND_ASCII 9
33 #define FILEIO_READ_WRITE_APPEND_ASCII 10
34 #define FILEIO_SEEK_SET 0
35 #define FILEIO_SEEK_CUR 1
36 #define FILEIO_SEEK_END 2
47 static bool IsFileExists(const _TCHAR *file_path);
48 static bool IsFileProtected(const _TCHAR *file_path);
49 static bool RemoveFile(const _TCHAR *file_path);
50 static bool FILEIO::RenameFile(const _TCHAR *existing_file_path, const _TCHAR *new_file_path);
52 bool Fopen(const _TCHAR *file_path, int mode);
54 bool IsOpened() { return (fp != NULL); }
58 void FputBool(bool val);
60 void FputUint8(uint8 val);
62 void FputUint16(uint16 val);
64 void FputUint32(uint32 val);
66 void FputUint64(uint64 val);
68 void FputInt8(int8 val);
70 void FputInt16(int16 val);
72 void FputInt32(int32 val);
74 void FputInt64(int64 val);
76 void FputFloat(float val);
78 void FputDouble(double val);
80 uint16 FgetUint16_LE();
81 void FputUint16_LE(uint16 val);
82 uint32 FgetUint32_LE();
83 void FputUint32_LE(uint32 val);
84 uint64 FgetUint64_LE();
85 void FputUint64_LE(uint64 val);
87 void FputInt16_LE(int16 val);
89 void FputInt32_LE(int32 val);
91 void FputInt64_LE(int64 val);
93 uint16 FgetUint16_BE();
94 void FputUint16_BE(uint16 val);
95 uint32 FgetUint32_BE();
96 void FputUint32_BE(uint32 val);
97 uint64 FgetUint64_BE();
98 void FputUint64_BE(uint64 val);
100 void FputInt16_BE(int16 val);
101 int32 FgetInt32_BE();
102 void FputInt32_BE(int32 val);
103 int64 FgetInt64_BE();
104 void FputInt64_BE(int64 val);
108 char *Fgets(char *str, int n);
109 int Fprintf(const char* format, ...);
111 uint32 Fread(void* buffer, uint32 size, uint32 count);
112 uint32 Fwrite(void* buffer, uint32 size, uint32 count);
113 uint32 Fseek(long offset, int origin);