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_SEEK_SET 0
33 #define FILEIO_SEEK_CUR 1
34 #define FILEIO_SEEK_END 2
45 static bool IsFileExists(const _TCHAR *filename);
46 static bool IsFileProtected(const _TCHAR *filename);
47 static void RemoveFile(const _TCHAR *filename);
49 bool Fopen(const _TCHAR *filename, int mode);
51 bool IsOpened() { return (fp != NULL); }
54 void FputBool(bool val);
56 void FputUint8(uint8 val);
58 void FputUint16(uint16 val);
60 void FputUint32(uint32 val);
62 void FputUint64(uint64 val);
64 void FputInt8(int8 val);
66 void FputInt16(int16 val);
68 void FputInt32(int32 val);
70 void FputInt64(int64 val);
72 void FputFloat(float val);
74 void FputDouble(double val);
76 uint16 FgetUint16_LE();
77 void FputUint16_LE(uint16 val);
78 uint32 FgetUint32_LE();
79 void FputUint32_LE(uint32 val);
80 uint64 FgetUint64_LE();
81 void FputUint64_LE(uint64 val);
83 void FputInt16_LE(int16 val);
85 void FputInt32_LE(int32 val);
87 void FputInt64_LE(int64 val);
89 uint16 FgetUint16_BE();
90 void FputUint16_BE(uint16 val);
91 uint32 FgetUint32_BE();
92 void FputUint32_BE(uint32 val);
93 uint64 FgetUint64_BE();
94 void FputUint64_BE(uint64 val);
96 void FputInt16_BE(int16 val);
98 void FputInt32_BE(int32 val);
100 void FputInt64_BE(int64 val);
104 char *Fgets(char *str, int n);
105 int Fprintf(const char* format, ...);
107 uint32 Fread(void* buffer, uint32 size, uint32 count);
108 uint32 Fwrite(void* buffer, uint32 size, uint32 count);
109 uint32 Fseek(long offset, int origin);