4b825dc642cb6eb9a060e54bf8d69288fbee4904ebd360ec63ec976c05699f3180e866b3f69e5472
 
 
1
#ifndef __FILES_H__
 
 
2
#define __FILES_H__
 
 
3
#include <time.h>
 
 
4
#include <stdio.h>
 
 
5
 
 
 
6
#define DIR_SEPARATOR   '/'
 
 
7
#define DIR_GAMEDATASEPARATOR   '\\'
 
 
8
 
 
 
9
#define    FILETYPE_GAMEDATA    0x10
 
 
10
#define    FILETYPE_CONFIG        0x40
 
 
11
 
 
 
12
#define    FILEATTR_DIRECTORY    0x0100
 
 
13
#define    FILEATTR_READABLE    0x0200
 
 
14
#define    FILEATTR_WRITABLE    0x0400
 
 
15
 
 
 
16
#define GENERIC_WRITE    0x0001
 
 
17
#define CREATE_ALWAYS    0x0002
 
 
18
#define GENERIC_READ    0x0008
 
 
19
 
 
 
20
typedef struct GameDirectoryFile
 
 
21
{
 
 
22
    char *filename;
 
 
23
    int attr;
 
 
24
    time_t timestamp;
 
 
25
 
 
 
26
} GameDirectoryFile;
 
 
27
 
 
 
28
#ifdef __cplusplus
 
 
29
extern "C" {
 
 
30
#endif
 
 
31
FILE *OpenGameFile(const char *filename, int readonly, int type);
 
 
32
#ifdef __cplusplus
 
 
33
}
 
 
34
#endif
 
 
35
char *FullFilePath(const char *filename);
 
 
36
 
 
 
37
#endif