factored out the EFFv2 saving into EFFImporter
[gemrb.git] / gemrb / includes / win32def.h
blobf37b36bc1769829acde5c51e97db3924f0b0f118
1 /* GemRB - Infinity Engine Emulator
2 * Copyright (C) 2003 The GemRB Project
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
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.
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
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 /**
22 * @file win32def.h
23 * Some global definitions, mostly for Un*x vs. MS Windows compatibility
24 * @author The GemRB Project
28 #ifndef WIN32DEF_H
29 #define WIN32DEF_H
31 #include "exports.h"
33 #ifdef WIN32
34 # define WIN32_LEAN_AND_MEAN
35 # include <windows.h>
37 # if _MSC_VER >= 1000
38 // 4251 disables the annoying warning about missing dll interface in templates
39 # pragma warning( disable: 4251 521 )
40 # pragma warning( disable: 4275 )
41 //disables annoying warning caused by STL:Map in msvc 6.0
42 # if _MSC_VER < 7000
43 # pragma warning(disable:4786)
44 # endif
45 # endif
47 # if defined(__MINGW32__) && ! defined(HAVE_SNPRINTF)
48 # define HAVE_SNPRINTF 1
49 # endif
51 #else //WIN32
52 # include <config.h>
53 # include <cstdio>
54 # include <cstdlib>
55 # include <cstring>
57 # define stricmp strcasecmp
58 # define strnicmp strncasecmp
59 #endif //WIN32
61 #ifndef HAVE_SNPRINTF
62 # ifdef WIN32
63 # define snprintf _snprintf
64 # define HAVE_SNPRINTF 1
65 # else
66 # include "System/snprintf.h"
67 # endif
68 #endif
70 #include "System/VFS.h"
72 #ifdef _MSC_VER
73 # ifndef round
74 # define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
75 # endif
76 #endif
78 #ifndef M_PI
79 #define M_PI 3.14159265358979323846 // pi
80 #endif
81 #ifndef M_PI_2
82 #define M_PI_2 1.57079632679489661923 // pi/2
83 #endif
85 #include "logging.h"
86 #endif //! WIN32DEF_H