author | unC0Rr |
Wed, 28 Aug 2024 17:16:23 +0200 | |
branch | transitional_engine |
changeset 16052 | 0fd23fc57947 |
parent 15976 | 69479ac8f4c8 |
permissions | -rw-r--r-- |
9991 | 1 |
/* |
2 |
* Hedgewars, a free turn based strategy game |
|
11046 | 3 |
* Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com> |
9991 | 4 |
* |
5 |
* This program is free software; you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation; version 2 of the License |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
10108
c68cf030eded
update FSF address. note: two sdl include files (by Sam Lantinga) still have the old FSF address in their copyright - but I ain't gonna touch their copyright headers
sheepluva
parents:
10017
diff
changeset
|
16 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
9991 | 17 |
*/ |
18 |
||
19 |
#ifndef _HEDGEWARS_PHYSFSCOMPAT_C_ |
|
20 |
#define _HEDGEWARS_PHYSFSCOMPAT_C_ |
|
21 |
||
22 |
#include "physfs.h" |
|
23 |
||
15976 | 24 |
#if defined(_WIN32) |
25 |
#define PHYSFS_DECL __declspec(dllexport) |
|
26 |
#endif |
|
27 |
||
9991 | 28 |
#if PHYSFS_VER_MAJOR == 2 |
29 |
#if PHYSFS_VER_MINOR == 0 |
|
30 |
||
31 |
#define HW_PHYSFS_COMPAT |
|
32 |
||
33 |
#ifdef __cplusplus |
|
34 |
extern "C" { |
|
35 |
#endif |
|
36 |
||
37 |
#define PHYSFS_DECL __EXPORT__ |
|
38 |
||
39 |
typedef enum PHYSFS_FileType |
|
40 |
{ |
|
10017 | 41 |
PHYSFS_FILETYPE_REGULAR, |
42 |
PHYSFS_FILETYPE_DIRECTORY, |
|
43 |
PHYSFS_FILETYPE_SYMLINK, |
|
44 |
PHYSFS_FILETYPE_OTHER |
|
9991 | 45 |
} PHYSFS_FileType; |
46 |
||
47 |
typedef struct PHYSFS_Stat |
|
48 |
{ |
|
10017 | 49 |
PHYSFS_sint64 filesize; |
50 |
PHYSFS_sint64 modtime; |
|
51 |
PHYSFS_sint64 createtime; |
|
52 |
PHYSFS_sint64 accesstime; |
|
53 |
PHYSFS_FileType filetype; |
|
54 |
int readonly; |
|
9991 | 55 |
} PHYSFS_Stat; |
56 |
||
57 |
PHYSFS_DECL int PHYSFS_stat(const char *fname, PHYSFS_Stat *stat); |
|
58 |
||
59 |
PHYSFS_DECL PHYSFS_sint64 PHYSFS_readBytes(PHYSFS_File *handle, void *buffer, |
|
60 |
PHYSFS_uint64 len); |
|
61 |
||
62 |
||
63 |
PHYSFS_DECL PHYSFS_sint64 PHYSFS_writeBytes(PHYSFS_File *handle, |
|
64 |
const void *buffer, |
|
65 |
PHYSFS_uint64 len); |
|
66 |
||
67 |
||
68 |
#ifdef __cplusplus |
|
69 |
} |
|
70 |
#endif |
|
71 |
||
72 |
#endif /* PHYSFS_VER_MAJOR == 2 */ |
|
73 |
#endif /* PHYSFS_VER_MINOR == 0 */ |
|
74 |
||
75 |
#endif /* _HEDGEWARS_PHYSFSCOMPAT_C_ */ |