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.
23 * Some global definitions, mostly for Un*x vs. MS Windows compatibility
24 * @author The GemRB Project
34 # define WIN32_LEAN_AND_MEAN
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
43 # pragma warning(disable:4786)
47 # if defined(__MINGW32__) && ! defined(HAVE_SNPRINTF)
48 # define HAVE_SNPRINTF 1
57 # define stricmp strcasecmp
58 # define strnicmp strncasecmp
63 # define snprintf _snprintf
64 # define HAVE_SNPRINTF 1
66 # include "System/snprintf.h"
70 #include "System/VFS.h"
74 # define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
79 #define M_PI 3.14159265358979323846 // pi
82 #define M_PI_2 1.57079632679489661923 // pi/2