2457 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
clone2727
49a8f7675f Merge pull request #20 from scott-t/t7g-ios
T7G iOS support
2011-06-01 07:04:05 -07:00
Max Horn
a4d105c902 COMMON: Move SDL endian check a bit down 2011-06-01 10:43:02 +02:00
Matthew Hoops
aa49b38c5a Merge remote branch 'upstream/master' into t7g-ios
Conflicts:
	engines/groovie/script.cpp
2011-05-31 14:16:29 -04: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
Johannes Schickel
263adb5cfc COMMON: Limit pragma warning use in algorithm.h to MSVC.
Since we only want to disable a MSVC specific warning with it and other
compilers might have different warnings numbers it is safer to only target
MSVC here.
2011-05-29 21:12:42 +02:00
Matthew Hoops
9539017ee3 ALL: initialise -> initialize 2011-05-25 11:17:11 -04:00
Matthew Hoops
eea482fa43 ALL: behaviour -> behavior 2011-05-25 10:50:46 -04:00
Max Horn
39076ef972 BUILD: Rename UNIX #define to POSIX 2011-05-25 13:23:03 +02:00
Littleboy
89e954c653 COMMON: Silence MSVC warning for Common::gcd calls with an unsigned type 2011-05-24 00:56:48 -04:00
Max Horn
c82f117488 COMMON: Add putc(har) and getc(har) to forbidden symbols
Sorry, buildbot...
2011-05-24 00:19:32 +02:00
Max Horn
20cad6e8b6 COMMON: Modify Base::processSettings, get rid of Common::kArgumentNotProcessed
Instead of defining a hacked up Common::Error code, split the return
value of processSettings into two parts: An error code, and a value
which indicates whether the specified command was completely handled
by processSettings or not.
2011-05-23 19:39:25 +02:00
Max Horn
6f6051a9e1 COMMON: Mark more symbols as forbidden 2011-05-23 19:12:26 +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
Max Horn
904739cc00 COMMON: Document that Stream API is meant to imitate ISO C FILE semantics 2011-05-18 13:06:41 +02:00
Max Horn
9b2ef340dc COMMON: Forbid use of some more symbols 2011-05-17 12:58:34 +02:00
Max Horn
d165292234 COMMON: Remove unused RandomSource destructor, clarify comments, cleanup 2011-05-17 12:23:41 +02:00
Max Horn
fc9b8d2a71 COMMON: Remove auxillary RandomSource constructor 2011-05-17 12:17:28 +02:00
Max Horn
4cbe4ede66 COMMON: Registers RandomSources in constructor with the event recorder
This also removes the dependency of engines on the event recorder header
and API, and will make it easier to RandomSources that are not properly
registered.
2011-05-17 12:17:26 +02:00
Oystein Eftevaag
305c13a4aa IPHONE/OSX: Updated xcode project 2011-05-16 22:26:58 -04:00
Max Horn
88319a727a COMMON: Fix inserting an array into itself under certain conditions 2011-05-16 15:23:17 +02:00
Willem Jan Palenstijn
ffd0b20af7 COMMON: Don't allocate zero-sized storage in array 2011-05-16 14:44:45 +02:00
Max Horn
9081ab4402 COMMON: Unify Array memory allocation
We also change how alloc failures are handled: Instead of using
assert(), which is usually disabled in release builds on various
platforms, we now *always* catch this situation and invoke error() if
necessary.
2011-05-16 14:22:54 +02:00
Max Horn
eedb2d721f COMMON: Change Array::insert_aux to immediately assign newly allocated memory to _storage 2011-05-16 13:58:59 +02:00
Max Horn
85d5eec950 COMMON: Set _capacity to just _size in Common::Array::operator= 2011-05-16 13:50:06 +02: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
Matthew Hoops
a1d41da096 Merge remote branch 'upstream/master' into t7g-ios
Conflicts:
	audio/decoders/qdm2.h
	common/util.cpp
	engines/groovie/music.cpp
	engines/groovie/resource.h
	video/qt_decoder.cpp
	video/qt_decoder.h
2011-05-11 00:30:28 -04:00
Max Horn
9511af6682 COMMON: Always prefer GCC 4.x versions of READ_UINT*/WRITE_UINT*
In addition, we use them if in GCC >= 3.3 if unaligned access is
possible. The GCC variants of these macros also contain protection
against overzealous compilers' static aliasing optimizations.
2011-05-10 15:38:18 +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
b4058a696a COMMON: Tweak some comments 2011-05-09 14:32:03 +02:00
Sven Hesse
88d562a361 COMMON: Add a class SafeSubReadStream
SafeSubReadStream is basically a SeekableSubReadStream that
re-seek()s the parent stream before each read(). That way, more than
one SafeSubReadStream of the same parent stream can be used safely
at the same time, at the cost of increasing IO.
2011-05-06 16:47:48 +02:00
Matthew Hoops
44ad7d45ba COMMON: Remove convertCrsrCursor()
Graphics::MacCursor is its replacement
2011-05-05 19:48:57 -04:00
Matthew Hoops
029bfc0c60 COMMON: Fix spelling of 'Philips' 2011-05-03 15:55:40 -04:00
Max Horn
2fa63ca015 COMMON: Forbid use of getcwd&getwd; add macro to enable unistd.h compatibility 2011-05-03 14:30:25 +02:00
Max Horn
bdc7414f80 COMMON: Don't declare a fake printf 2011-05-03 11:41:01 +02:00
Johannes Schickel
c0bd496c90 COMMON: Fix compilation when zlib support is enabled. 2011-05-02 17:19:35 +02:00