2 Skelton for retropc emulator
\r
4 Author : Takeda.Toshiya
\r
14 #include <agar/core.h>
\r
15 #elif defined(_USE_QT)
\r
16 #include <QtCore/QFile>
\r
17 #include <QtCore/QFileInfo>
\r
19 #include <windows.h>
\r
25 #define FILEIO_READ_BINARY 1
\r
26 #define FILEIO_WRITE_BINARY 2
\r
27 #define FILEIO_READ_WRITE_BINARY 3
\r
28 #define FILEIO_READ_WRITE_NEW_BINARY 4
\r
29 #define FILEIO_READ_ASCII 5
\r
30 #define FILEIO_WRITE_ASCII 6
\r
31 #define FILEIO_READ_WRITE_ASCII 7
\r
32 #define FILEIO_READ_WRITE_NEW_ASCII 8
\r
33 #define FILEIO_SEEK_SET 0
\r
34 #define FILEIO_SEEK_CUR 1
\r
35 #define FILEIO_SEEK_END 2
\r
37 #if defined(_USE_AGAR) || defined(_USE_SDL)
\r
38 inline FILE* _tfopen(const _TCHAR *filename , const _TCHAR *mode)
\r
40 return fopen((const char *)filename, (const char *)mode);
\r
47 #if defined(_USE_QT)
\r
55 bool IsFileExists(_TCHAR *filename);
\r
56 bool IsProtected(_TCHAR *filename);
\r
57 bool Fopen(_TCHAR *filename, int mode);
\r
59 bool IsOpened() { return (fp != NULL); }
\r
61 void FputBool(bool val);
\r
63 void FputUint8(uint8 val);
\r
64 uint16 FgetUint16();
\r
65 void FputUint16(uint16 val);
\r
66 uint32 FgetUint32();
\r
67 void FputUint32(uint32 val);
\r
68 uint64 FgetUint64();
\r
69 void FputUint64(uint64 val);
\r
71 void FputInt8(int8 val);
\r
73 void FputInt16(int16 val);
\r
75 void FputInt32(int32 val);
\r
77 void FputInt64(int64 val);
\r
79 void FputFloat(float val);
\r
80 double FgetDouble();
\r
81 void FputDouble(double val);
\r
84 uint32 Fread(void* buffer, uint32 size, uint32 count);
\r
85 uint32 Fwrite(void* buffer, uint32 size, uint32 count);
\r
86 uint32 Fseek(long offset, int origin);
\r
88 void Remove(_TCHAR *filename);
\r