ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
portdefs.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #include <assert.h>
23 #include <ctype.h>
24 #include <fcntl.h>
25 #include <inttypes.h>
26 #include <limits.h>
27 #include <math.h>
28 #include <new>
29 #include <limits>
30 #include <stdarg.h>
31 #include <stddef.h>
32 #include <stdio.h>
33 #include <stdlib.h>
34 #include <string.h>
35 #include <sys/types.h>
36 
37 /* newlib ctype.h defines _X for hex digit flag.
38  This conflicts with the use of _X as a variable name. */
39 #undef _X
40 
41 #ifndef USE_HIGHRES
42 #define RES_W_OVERLAY 320
43 #define RES_H_OVERLAY 200
44 #define RES_INIT_MAX_W 320
45 #define RES_INIT_MAX_H 200
46 #else
47 #define RES_W_OVERLAY 1280
48 #define RES_H_OVERLAY 720
49 #define RES_INIT_MAX_W 1280 /* crab engine */
50 #define RES_INIT_MAX_H 768 /* e.g. director engine */
51 #endif
52 
53 // HACK: With MinGW, GRIM engine seems to crash when using setjmp and longjmp if not using builtin versions
54 #if defined __MINGW64__ || defined __MINGW32__
55 #include <setjmp.h>
56 #undef setjmp
57 #undef longjmp
58 #define setjmp(a) (__builtin_setjmp(a))
59 #define longjmp(a, b) (__builtin_longjmp(a, b))
60 #endif