Commit Graph

178 Commits

Author SHA1 Message Date
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
Oystein Eftevaag
305c13a4aa IPHONE/OSX: Updated xcode project 2011-05-16 22:26:58 -04:00
Max Horn
0bbb412249 COMMON: RemoveAvoid redundant typedefs if config.h is present 2011-05-14 10:41:17 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Max Horn
8754c86686 COMMON: Refactor typedefs a bit 2011-05-10 11:02:08 +02:00
Max Horn
76780268f2 COMMON: Refactor scummsys.h 2011-05-09 16:23:22 +02:00
Max Horn
3920cfe69e COMMON: Do not #undef _MSC_VER 2011-05-09 16:23:22 +02:00
Max Horn
49ab6d0289 COMMON: If config.h is present, don't use hardcoded settings from scummsys.h 2011-05-09 16:23:22 +02:00
Max Horn
dfff22e56b COMMON: Unify definition of scumm_str(n)icmp 2011-05-09 16:23:22 +02:00
Max Horn
db82d282ea N64: Remove (u)int64 typedefs from common/scummsys.h 2011-05-09 16:23:21 +02:00
Max Horn
59e77ed667 ALL: Mark printf and various other symbols as forbidden
Right now, a few places in the frontend code still use printf and
consorts. We mark the affected files with a FIXME for now, and
add a dedicated exception for each. To be fixed!

Also tweak FORBIDDEN_SYMBOL_REPLACEMENT to hopefully really always
enforce a compiler error
2011-05-02 16:31:31 +02:00
Max Horn
a8b3501252 COMMON: Drop totally obsolete & outdated DEC C++ 'support' 2011-04-12 16:41:36 +02:00
md5
23aabc950a COMMON: Removed custom PI define (M_PI should be used instead) 2011-03-19 02:39:38 +02:00
md5
3924fc0bad COMMON: Enable math constants under Visual Studio 2011-03-19 01:56:10 +02:00
Johannes Schickel
9f6dc040ff CONFIGURE: Add basic support for ICC.
svn-id: r55862
2011-02-10 01:05:48 +00:00
Lars Persson
714263d5e9 COMMON: Use user include instead of system include to remove lots of compiler warnings for symbian
svn-id: r54371
2010-11-19 12:47:52 +00:00
Max Horn
44393b2dc8 ALL: Add code to help stop people from accidentally using "bad" APIs
A new header file common/forbidden.h is included by scummsys.h and it
re-#defines numerous symbols like fopen(), fread(), system(), etc. with
garbage, in order to provoke compile errors in any code using them.

If a .cpp file really *must* use any of these (e.g. because it is a
backend file), then these redefinitions can be disabled by #defining
FORBIDDEN_SYMBOL_ALLOW_ALL as the first thing in the .cpp file. Whenever
this is done, an explanatory comment should be added.

Note that this system cannot catch all "bad" usages (notably the Lua
code in the sword25 engine), as it can only work if scummsys.h is
included.

svn-id: r53961
2010-10-30 21:27:42 +00:00
Jordi Vilalta Prat
8388e0dfea JANITORAL: Clean trailing whitespaces.
svn-id: r53160
2010-10-12 02:18:11 +00:00
Yotam Barnoy
f7f743ac31 PSP: switch from wrapping memcpy to defining our own memcpy
The advantage is that we get to do inlining and even use lwl and lwr instructions where appropriate. We have to do it ourselves because the PSP doesn't tolerate built-in instructions, but also we have a more efficient memcpy than the lib's.

svn-id: r52817
2010-09-20 14:10:44 +00:00
Eugene Sandulenko
26dc4c2425 DINGOO: new port. Patch #3039277
svn-id: r52210
2010-08-19 12:43:37 +00:00
Max Horn
0b48a71c99 Remove PalmOS port
svn-id: r50964
2010-07-17 18:41:38 +00:00
Fabio Battaglia
a108df30a7 Add Nintendo 64 port to trunk.
svn-id: r46773
2009-12-30 21:11:38 +00:00
Max Horn
5b562407c1 COMMON: Replace NORETURN by NORETURN_PRE & NORETURN_POST
svn-id: r46205
2009-11-29 21:56:10 +00:00
Max Horn
016f343ca7 Remove SCUMMVM_USE_LONG_INT
svn-id: r46103
2009-11-23 22:27:52 +00:00
Max Horn
c3905f60ee Move definition of stdint types to the only file that needs them (mpeg_player.h)
svn-id: r45820
2009-11-10 22:18:41 +00:00
Johannes Schickel
8b8f154891 Add some FIXME comments about defining types from stdint.h on our own.
svn-id: r45816
2009-11-10 21:14:48 +00:00
Max Horn
8f609497ee Backported NDS changes from 1.0.0 branch to trunk
svn-id: r44426
2009-09-27 22:42:21 +00:00
Filippos Karapetis
3d0f106edc Removed the MSVC-specific pragmas for disabling warnings. These are now in ScummVM_Global.vsprops and thus not needed in scummsys.h
svn-id: r44283
2009-09-24 02:06:07 +00:00
Johannes Schickel
dc8edb7203 Fix warning in gcc 3.3.5, by changing FORCEINLINE definition.
svn-id: r44262
2009-09-22 17:10:08 +00:00
Norbert Lange
75aafd9c33 fix duplicate definition of FORCEINLINE on mingw toolchains
svn-id: r44033
2009-09-11 12:58:08 +00:00
Max Horn
1011508325 Slightly modified version of Patch #2838562: Improve endian.h and stream.h
svn-id: r44027
2009-09-11 08:55:47 +00:00
Joost Peters
1a5f531d23 Allow building of psp backend via configure (Part 1 - Still need to add the fixup + EBOOT packing steps).
Thanks dhewg and fingolfin for assistance. :)

svn-id: r39693
2009-03-25 21:58:16 +00:00
Max Horn
b64b7d2895 Removed #include nds/jtypes.h from common/scummsys.h -- it already gets loaded by portdefs.h
svn-id: r39562
2009-03-20 10:13:10 +00:00
Travis Howell
21a13c3219 Disable MSVC warning, which is frequently paranoid.
svn-id: r38575
2009-02-20 03:56:42 +00:00
Torbjörn Andersson
5bf56fe991 Changed OverlayColor from int16 to uint16 to fix the strange colours that
appeared in the GUI with r36288. At least, it fixes the problem for me. I hope I
didn't accidentally break anything else.

svn-id: r36298
2009-02-13 06:17:43 +00:00
Johannes Schickel
3334af5507 Removed last traces of X11 backend.
svn-id: r35287
2008-12-08 21:48:29 +00:00
Filippos Karapetis
bd3f83b508 Turned on MSVC warning 4505 - "Unreferenced local function has been removed", as it's very useful in finding dead code
svn-id: r35160
2008-11-23 15:40:35 +00:00
Filippos Karapetis
71dcfd13a2 Re-enabled MSVC warning 4125 - "decimal digits terminates octal escape sequence". This was thrown for a string with incorrect extended characters in the SAGA engine, which has been corrected now, so the warning itself is valid and quite informative.
svn-id: r35159
2008-11-23 15:26:51 +00:00
Max Horn
a6502da9ac * got rid of CDECL
* got rid of scumm_strrev
* added DISABLE_TEXT_CONSOLE flag which disables printf, warning, debug (but not error)

svn-id: r35038
2008-11-13 11:26:47 +00:00