Commit Graph

216 Commits

Author SHA1 Message Date
Cameron Cawley
bcef809e61 WINCE: Fix compilation 2019-04-15 08:06:39 +03:00
SupSuper
d0512db25c WIN32: Move all ARRAYSIZE undefs to util.h
Instead of trying to undefine ARRAYSIZE everywhere we use a Windows header, let's just do it before we define our own
2018-12-17 12:28:33 +02:00
Cameron Cawley
8fa2f90a26 CREATE_PROJECT: Support building with Tremor instead of Vorbis 2018-11-27 22:58:02 +00:00
Cameron Cawley
79a4e3f813 BACKENDS: Remove references to the GP32 backend 2018-11-04 21:38:45 +00:00
Adrian Frühwirth
a0d7a99439 COMMON: Add WARN_UNUSED_RESULT to scummsys.h 2018-04-04 20:56:41 +00:00
Colin Snover
2de83e0937 COMMON: Use C++11 static_assert when available
This improves the output of static assertions in all compilers,
and prevents problems in MSVC 2015 where the mechanism for
triggering a compilation error in C++98 mode may cause errors when
that compiler builds in release mode.

Fixes Trac#10154.
2017-11-10 09:56:43 -06:00
Bastien Bouclet
bbdbd85324 COMMON: Remove unused OverlayColor typedef 2017-09-30 21:35:16 +02:00
Bastien Bouclet
55f46d3667 BUILD: Define pointer sized integer types and remove SCUMM_64BITS 2017-09-30 21:35:16 +02:00
Peter Kohaut
d34314ccc9 BUILD: Fixed macro redefinition warning for 64 bits builds 2017-03-09 23:48:57 +01:00
Thierry Crozat
5484f36f38 BUILD: Define SCUMM_64BITS on 64 bits platforms when not using configure
This for example fixes the compilation of the fullpipe engine on 64 bits
platforms when using create_project.
2017-02-06 21:49:38 +00:00
Colin Snover
135ac922aa COMMON: Define STATIC_ASSERT for all ports
Ports with -DNONSTANDARD_PORT need this too.
2017-01-14 10:17:58 -06:00
Colin Snover
7e0b40173f COMMON: Add STATIC_ASSERT macro to scummsys.h 2017-01-08 13:20:23 -06:00
Colin Snover
849e29dc87 COMMON: Add stddef.h to scummsys.h for ptrdiff_t 2016-12-19 15:00:09 -06:00
Willem Jan Palenstijn
68a15c10be Merge pull request #790 from salty-horse/clang_fixes
ALL: Don't use 'defined' in macro definitions
2016-08-13 11:57:39 +02:00
Bastien Bouclet
8d34d5190d Revert "BUILD: Fix test compilation with event recorder enabled"
This reverts commit 1f8667c5d9.
2016-07-28 18:23:50 +02:00
Ori Avtalion
4d120800fa ALL: Don't use 'defined' in macro definitions
This is undefined behavior and clang warns about it.
See <http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160118/147239.html>.
2016-07-23 16:18:51 +03:00
Eugene Sandulenko
1f8667c5d9 BUILD: Fix test compilation with event recorder enabled 2016-05-23 16:36:26 +02:00
Thomas Edvalson
e2b9572a83 3DS: Initial commit 2016-04-06 02:12:02 -04:00
Johannes Schickel
e7f54aec7d COMMON: A few formatting fixes. 2015-12-12 06:54:58 +01:00
Paul Gilbert
89dfd36b60 CREATE_PROJECT: Add support for Visual Studio 2015 2015-09-28 19:23:58 -04:00
Filippos Karapetis
daf110c867 COMMON: Remove trailing whitespace 2014-10-28 15:38:52 +02:00
Eugene Sandulenko
c3ffbd884a Merge pull request #426 from sunmax/master
PS2: Pull request to master for latest PS2 code
2014-04-28 21:20:42 +03:00
Johannes Schickel
854e22b38b COMMON: Make GPL headers consistent in themselves. 2014-02-18 02:39:33 +01:00
Max Lingua
b69a2c81a7 PS2: scummsys.h (u)int64 is "long" for PS2 2014-01-19 12:53:55 -05:00
Filippos Karapetis
e36f24ad69 COMMON: Define int64 and uint64 if HAVE_CONFIG_H isn't set
This fixes compilation of sword25's pluto with Visual Studio. The issue
has been revealed with commit 34169a81. The other data types are
defined in scummsys.h, thus only the missing int64 and uint64 defines
are set.
2013-11-06 18:04:09 +02:00
Eugene Sandulenko
e11da51202 COMMON: Make Coverity 6.6.1 happier
Apparently their tools do not include __has_feature clang extension.
I've submitted the bugreport to them but in the meantime let's have this
define in the system.
2013-09-27 11:06:22 +03:00
Johannes Schickel
4790a4abd5 COMMON: Define all Unix98/BSD math constants in scummsys.h.
This should fix compilation on mingw64 with --enable-c++11 and also make sure
the constants are present on other systems for the uncommon case they might be
missing.
2013-08-02 20:02:02 +02:00
D G Turner
17ccd18ed3 COMMON: Add comment explaining reason for defining math constants. 2013-08-02 06:23:52 +01:00
D G Turner
26a9b528da COMMON: Move definition of math constants to scummsys header.
This should have no effect on common/math.h as scummsys is included at
the top anyway, but this will fix compilation on some toolchains when
strict ANSI language compliance is enabled i.e. -std=c++11, rather than
-std=gnu11.

This causes an issue as a side effect is to set a guard which disables
various non-standard defines in the system headers i.e. the M_PI and
M_SQRT1_2 constant definitions in the MinGW x86_64 toolchain on
buildbot.

By moving this into scummsys.h after the point of system math.h
inclusion, we can ensure that M_PI etc. are always present.
2013-07-31 06:18:58 +01:00
Willem Jan Palenstijn
2d1fd3b554 ALL: Fix typo (existant->existent) 2013-02-23 22:07:32 +01:00
Johannes Schickel
178365f5e9 COMMON: Add a header for C++11 keywords for pre-C++11 compilers.
This currently adds defines for nullptr and override, so we can use them in
pre-C++11 compilers, while taking advantage of them with C++11 compilers.
2013-01-09 07:53:41 +01:00
Johannes Schickel
223794fb38 ALL: Make use of defined() for the preprocessor consistent.
This does not change the use of defined for some NDS source files, since they
seem to be (based on?) third party code.
2012-03-17 22:02:44 +01:00
Johannes Schickel
2c0bd426fc COMMON: Use defined() instead of defined in preprocessor macros.
Thanks to clone2727 for noticing this.
2012-03-17 21:23:42 +01:00
Christoph Mallon
a64b5e2a77 ALL: Use GCC_ATLEAST(). 2012-03-17 20:09:49 +01:00
Christoph Mallon
757fa01a28 COMMON: Add GCC_ATLEAST(major, minor) to simplify testing for versions of GCC. 2012-03-17 20:09:45 +01:00
Alyssa Milburn
5647637ea2 COMMON: Move <new> include into scummsys.h.
The header contains forbidden symbols on some platforms, and the
simplest solution seems to be to include it here. This also includes
it from all the portdefs.h files, except the Symbian one. Probably
the FIXME and the #if can be removed once it's known to work.
2011-11-17 12:46:44 +01:00
anotherguest
8475d7f142 Symbian: Must define scumm_va_copy also for Symbian 2011-10-11 09:10:21 +02:00
Max Horn
e792adb1b8 COMMON: Add vformat() function (Common::String analog to vsprintf) 2011-06-18 01:36:15 +02:00
Johannes Schickel
d2a8e8023e COMMON: Implement two simple workaround wrappers for _vsnprintf and _snprintf for MSVC.
This should assure vsnprintf and snprintf will now also always null
terminate the result even for MSVC.

Currently the functions are placed in scummsys.h, but that causes us
to include two standard C library headers there (for MSVC at least).
This is not particulary nice, so we should think of a better solution
here.
2011-06-01 22:18:28 +02:00
Johannes Schickel
007a33515f COMMON: Add note about us defining vsnprintf as _vsnprintf for older MSVC versions. 2011-06-01 17:31:33 +02:00
Johannes Schickel
2f8e9b954e COMMON: Add comment about MSVC's _snprintf.
This includes a FIXME, since _snprintf behaves differently to snprintf.
Not only in the return value (which is a minor difference, since we usually
do not use it), but also since it does not always include a terminating null.
2011-06-01 17:28:59 +02:00
Max Horn
a4d105c902 COMMON: Move SDL endian check a bit down 2011-06-01 10:43:02 +02:00
Max Horn
c86a6c466f COMMON: Include SDL_endian.h instead of SDL_byteorder.h 2011-05-31 18:08:25 +02:00
Max Horn
811b257014 COMMON: Simplify OverlayColor definition
This typedef still should be moved somewhere else. Maybe a header file
of its own?
2011-05-31 14:22:19 +02:00
Max Horn
e06ca6560f COMMON: Move scumm_str(n)icmp declaration to str.h 2011-05-31 14:19:25 +02:00
Max Horn
1c198cec1b COMMON: Move some weird WinCE/MSVC snprintf-#define around 2011-05-31 14:06:47 +02:00
Max Horn
8654e846e4 COMMON: Shorten endianess / mem align guessing logic in scummsys.h 2011-05-31 14:05:37 +02:00
Max Horn
2d6be5d077 COMMON: Move more stuff from scummsys.h to portdefs.h 2011-05-31 13:56:28 +02:00
Max Horn
9c3e2e43bd COMMON: Move some code from scummsys.h to relevant portdefs.h files 2011-05-31 13:48:03 +02:00
Max Horn
8e3aafd30d COMMON: Provide our own implementations for scumm_str(n)icmp
This takes up a tiny little bit of extra binary size, but gets
rid of some awful #ifdef hackery.
2011-05-23 19:12:25 +02:00