Commit Graph
3029 Commits
Author SHA1 Message Date
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
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
Thierry Crozat 6d0451105b OSYSTEM: Clarify doc for getGraphicsMode() 2011-04-29 12:52:35 +01:00
Ori Avtalion e52d54b55e NDS: Fix compilation 2011-04-28 22:19:35 +03:00
Ori Avtalion a88e355b2d COMMON: Fix compilation on backends that USE_RGB_COLOR 2011-04-28 19:58:45 +03:00
Ori Avtalion 9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Ori Avtalion 3e01d35281 JANITORIAL: Format more forward declarations to follow convention 2011-04-28 12:32:01 +03:00
Ori Avtalion cd6ee0589d JANITORIAL: Format forward declarations to follow convention 2011-04-28 12:20:34 +03:00
Littleboy 55650f364c COMMON: Add proper error handling to the ZipArchive class
- Add check in listMembers and skip files that can't be enumerated.
 - Add checks for all function calls in createReadStreamForMember (and no longer return a stream from an uninitialized buffer when the file cannot be read).
2011-04-25 07:20:16 -04:00
Littleboy 62e8233009 COMMON: Fix MSVC warning in PEResources::parseResourceLevel() 2011-04-24 17:08:07 -04:00
Johannes Schickel c6112f7383 COMMON: Do not call ReadStream::eos in SubReadStream::read.
Instead I moved the call to ReadStream::eos into SubReadStream::eos.

fuzzie pointed out that in certain cases this resulted in a lot of eos calls
before. Those were rather needlessly, since checking the eos bit of the
decorated stream in read does not give any advantage over checking it when
the client code really wants to test the eos flag.
2011-04-19 18:08:47 +02:00
Max Horn 3a574199b0 COMMON: Cleanup names/handling of some error codes 2011-04-18 18:22:04 +02:00
Max Horn 1037ed2470 COMMON: Clarify error naming conventions
Not all error codes comply with these yet.
2011-04-18 18:22:04 +02:00
Max Horn cd2fcaf4ca COMMON: Remove kInvalidPathError 2011-04-18 18:22:03 +02:00
Max Horn 7c13aa48cd COMMON: Tweak extra text handling in Common::Error 2011-04-18 18:22:03 +02:00
Max Horn 7ccba1fced COMMON: Fix typo 2011-04-18 18:22:03 +02:00
Max Horn bac8fa70fd COMMON: Cleanup error messages 2011-04-18 18:22:03 +02:00
Max Horn 73f04118f3 COMMON: Rename Error to ErrorCode, introduce new Error class 2011-04-18 18:22:02 +02:00
Eugene Sandulenko ce0cc0ee85 COMMON: Partial fix for #3087922: COMMON/BASE/BACKENDS: Code analysis warnings 2011-04-17 15:25:06 +03:00
Matthew Hoops 6d153f311c Merge remote branch 'upstream/master' into t7g-ios
Conflicts:
	video/qt_decoder.cpp
2011-04-13 16:04:29 -04:00
Matthew Hoops 4366f3632c COMMON: Cleanup QuickTime's readSTTS() 2011-04-12 14:01:42 -04:00
Max Horn f1471689cf COMMON: Let MKTAG always return an uint32 2011-04-12 17:23:21 +02:00
Max Horn 58b4cc0220 COMMON: Use correct MKTAG definition, stupid 2011-04-12 17:04:49 +02:00
Max Horn 0ce2ca4e00 COMMON: Replace MKID_BE by MKTAG
MKID_BE relied on unspecified behavior of the C++ compiler,
and as such was always a bit unsafe. The new MKTAG macro
is slightly less elegant, but does no longer depend on the
behavior of the compiler.
Inspired by FFmpeg, which has an almost identical macro.
2011-04-12 16:53:15 +02:00
Max Horn a8b3501252 COMMON: Drop totally obsolete & outdated DEC C++ 'support' 2011-04-12 16:41:36 +02:00
Klaus Reimer 48dbbdcd74 COMMON: Fix usage of wrong variable when keymapper is active 2011-04-12 11:05:48 +02:00
Matthew Hoops 4a39baa095 COMMON: Fix QuickTime track duration 2011-04-10 21:11:02 -04:00
Matthew Hoops 9d0e5a7132 ALL: Add/update some comments 2011-04-10 15:11:03 -04:00
Matthew Hoops 7c5dfaa04c COMMON: Parse the MPEG-4 esds atom 2011-04-08 22:46:19 -04:00