Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | pmbaty | 1 | /* |
| 2 | SDLPoP, a port/conversion of the DOS game Prince of Persia. |
||
| 3 | Copyright (C) 2013-2018 Dávid Nagy |
||
| 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, either version 3 of the License, or |
||
| 8 | (at your option) any later version. |
||
| 9 | |||
| 10 | This program is distributed in the hope that it will be useful, |
||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
| 13 | GNU General Public License for more details. |
||
| 14 | |||
| 15 | You should have received a copy of the GNU General Public License |
||
| 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
||
| 17 | |||
| 18 | The authors of this program may be contacted at http://forum.princed.org |
||
| 19 | */ |
||
| 20 | |||
| 21 | #ifndef COMMON_H |
||
| 22 | #define COMMON_H |
||
| 23 | |||
| 24 | #ifdef __cplusplus |
||
| 25 | extern "C" { |
||
| 26 | #endif |
||
| 27 | |||
| 28 | |||
| 29 | #include <stdio.h> |
||
| 30 | #include <stdlib.h> |
||
| 31 | #include <fcntl.h> |
||
| 32 | #include <string.h> |
||
| 33 | #include <sys/stat.h> |
||
| 34 | #include <stdint.h> |
||
| 35 | #include <stdbool.h> |
||
| 36 | |||
| 37 | #ifndef _MSC_VER // unistd.h does not exist in the Windows SDK. |
||
| 38 | #include <unistd.h> |
||
| 39 | #else |
||
| 40 | #ifndef _UNISTD_H |
||
| 41 | #define _UNISTD_H 1 |
||
| 42 | #define F_OK 0 /* Test for existence. */ |
||
| 43 | #define access _access |
||
| 44 | #endif |
||
| 45 | #endif |
||
| 46 | |||
| 47 | #include "config.h" |
||
| 48 | #include "types.h" |
||
| 49 | #include "proto.h" |
||
| 50 | #include "data.h" |
||
| 51 | |||
| 52 | #ifndef MAX |
||
| 53 | #define MAX(a,b) ((a)>(b)?(a):(b)) |
||
| 54 | #endif |
||
| 55 | #ifndef MIN |
||
| 56 | #define MIN(a,b) ((a)<(b)?(a):(b)) |
||
| 57 | #endif |
||
| 58 | #ifndef ABS |
||
| 59 | #define ABS(x) ((x)<0?-(x):(x)) |
||
| 60 | #endif |
||
| 61 | |||
| 62 | #ifdef __cplusplus |
||
| 63 | } |
||
| 64 | #endif |
||
| 65 | |||
| 66 | #endif |