Commit Graph

2249 Commits

Author SHA1 Message Date
Matthew Hoops
2be57434a1 COMMON: Only take the md5 of the resource fork data section
Since various apps can modify the type/creator of the files, we can't rely on the header of the resource fork to take the md5. I've therefore also recalculated all of the detector entries (all 5 of them) that use the Mac resource fork code.

svn-id: r55764
2011-02-04 15:27:56 +00:00
Johannes Schickel
867c0d9645 COMMON: Add an erase method which takes an iterator to HashMap.
Currently there is no iterator returned from this method, to have some
similarity to associative containers of the STL.

I also "added" one unit test for this method, which is basically just
a copy of the HashMap::erase(const Key &) test with the required adaptions.

svn-id: r55661
2011-01-30 17:28:35 +00:00
David Turner
f7e1ed3762 COMMON: Fixed memory leakage in unarj readHeader().
This manifested in Drascula.

svn-id: r55582
2011-01-28 02:56:07 +00:00
Filippos Karapetis
b0321af343 COMMON: Added some very simple operators to the Point class (+, -, += and -=), taken from the BS25 Vertex class
svn-id: r55476
2011-01-23 19:00:35 +00:00
Matthew Hoops
75b232c67d COMMON: Update documentation of the MacResManager
svn-id: r55403
2011-01-22 02:31:30 +00:00
Matthew Hoops
fc8f135a61 COMMON: Document which engines use DCL
svn-id: r55380
2011-01-21 14:28:43 +00:00
Matthew Hoops
476eeb69e6 COMMON: Move SCI's DCL decompression code to common
svn-id: r55367
2011-01-21 01:55:44 +00:00
Johannes Schickel
4ad14abef3 COMMON: Some style fixes in config-manager.cpp.
svn-id: r55315
2011-01-18 21:13:47 +00:00
Johannes Schickel
da6fdff421 COMMON: Some slight formatting fixes in config-manager.cpp.
svn-id: r55228
2011-01-13 16:38:14 +00:00
Yotam Barnoy
42c8cacde6 CONFIGMANAGER: small changes to support old config files with no 'gameId' keys. As discussed on -devel.
svn-id: r55222
2011-01-13 11:30:37 +00:00
Jordi Vilalta Prat
dd47d644d3 COMMON: Fix a few space formatting issues.
svn-id: r55200
2011-01-11 03:03:40 +00:00
Alyssa Milburn
319fdf40b2 COMMON: Fix comment about getButtonState.
svn-id: r55087
2011-01-01 22:36:33 +00:00
Yotam Barnoy
77a6dc7046 CONFIG-MGR: added ability to add other non-game domains
The way we determine if a domain is a game domain or not when loading from the config file is by checking for a 'gameId' key. This required changing the method of loading somewhat. MiscDomains (ie. non-game domains) are saved to the config file before game domains but after the main domains.

This change shouldn't mess anything up but it could probably use a look-through just in case.

svn-id: r55060
2010-12-29 15:16:31 +00:00
Johannes Schickel
6308dd77d6 OSYSTEM: Clarify grabPalette documentation after talking with Max about it.
svn-id: r54978
2010-12-20 17:28:17 +00:00
Alyssa Milburn
bcea996361 COMMON: Handle C++-style comments in config files
svn-id: r54868
2010-12-11 19:53:11 +00:00
Johannes Schickel
e361b84d3b BACKENDS: Fix OSD implementation in ModularBackend.
svn-id: r54828
2010-12-08 01:35:34 +00:00
Matthew Hoops
70ab5a21da COMMON: Fix AppleDouble support in the MacResManager (thanks, fuzzie)
svn-id: r54775
2010-12-05 00:51:04 +00:00
Jordi Vilalta Prat
d5a4f554af ALL: Fix a few typos
svn-id: r54716
2010-12-01 20:03:05 +00:00
Jordi Vilalta Prat
a17c07bcaa I18N: Improve the fallback language auto-detection.
- Broaden the range of language tags that could be accepted as fallback in
  auto-detection. For example, for a system with locale 'pt_PT', all of
  these would be accepted as valid fallbacks: 'pt_PT_*', 'pt', 'pt_*'
- Make language codes matching case-insensitive as specified in RFC 4647.
- Add support language code blocks longer than 2 characters.

svn-id: r54715
2010-12-01 20:00:40 +00:00
Jordi Vilalta Prat
8393bc5b5f I18N: Don't build TranslationManager when translation is disabled.
svn-id: r54684
2010-11-30 18:50:19 +00:00
Matthew Hoops
ab732a73ff COMMON: Add a bit more to the doxygen comment for NEResources
svn-id: r54564
2010-11-29 00:27:48 +00:00
Max Horn
945602fdbe COMMON: Remove unnecessary reference to file.h
svn-id: r54561
2010-11-28 23:09:47 +00:00
Matthew Hoops
f403c0f8a8 COMMON: Add support for loading NE resources and cursors
Needed for Mohawk (and Hugo Win eventually). Based on DrMcCoy's excellent Dark Seed II code.

svn-id: r54557
2010-11-28 22:55:00 +00:00
Filippos Karapetis
626e9413fd AmigaOS: Fixed compilation after the latest GSoC code merging (bug #3121350)
svn-id: r54555
2010-11-28 22:12:11 +00:00
Johannes Schickel
284b49aabc COMMON: Comment out locale <-> Common::Language conversion utils for now.
svn-id: r54517
2010-11-28 02:12:53 +00:00
Johannes Schickel
1ad63b431e BACKEND: Switch OSystem::getSystemLanguage return type to Common::String.
This is done as discussed on -devel.

svn-id: r54516
2010-11-28 02:12:33 +00:00
Matthew Hoops
34db1820eb COMMON: Add an isBE() function to get the endianness of a ReadStreamEndian
svn-id: r54500
2010-11-26 15:06:25 +00:00
Johannes Schickel
ebbd504b90 COMMON: Adapt translation manager to use the OSystem for language detection.
svn-id: r54480
2010-11-25 18:42:05 +00:00
Johannes Schickel
189c9bf216 OSYSTEM: Add API to query the system locale.
I also adapted the SDL backend to implement the API.

svn-id: r54479
2010-11-25 18:40:56 +00:00
Max Horn
1cc80de1d9 COMMON: Add SeekableReadStreamEndian class
svn-id: r54445
2010-11-23 22:33:10 +00:00
Max Horn
12d5151ff4 COMMON: Remove default value for endianess in ReadStreamEndian subclasses
svn-id: r54441
2010-11-23 22:27:20 +00:00
Max Horn
382982d6e3 COMMON: Add ReadStreamEndian mixin class
svn-id: r54438
2010-11-23 22:26:27 +00:00
Max Horn
ae919f3ebd COMMON: Remove XOR decoding capability from MemoryReadStream
svn-id: r54436
2010-11-23 22:25:53 +00:00
Max Horn
2180b2d6b5 COMMON: Split common/stream.h into several headers
svn-id: r54385
2010-11-19 17:03:07 +00:00
Lars Persson
824a4009c9 SYMBIAN : Remove Symbian FatalError implementation (not really used anymore for any current symbian phone)
svn-id: r54372
2010-11-19 12:49:33 +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
785590e504 COMMON: Push include file.h and fs.h from translation.h to translation.cpp
svn-id: r54357
2010-11-19 01:03:05 +00:00
Max Horn
a72de47d5d COMMON: Cleanup EventRecorder
svn-id: r54355
2010-11-19 00:38:17 +00:00
Max Horn
aef1ca4c4b COMMON: Cleanup XMLParser code
* Get rid of obsolete comment about external documentation
  (link was broken for at least one year)
* Remove unnecessary Common:: prefix
* Push #include stream.h from .h to .cpp

svn-id: r54354
2010-11-19 00:20:15 +00:00
Max Horn
5c7d7a85db COMMON: Push #include stream.h from zlib.h to zlib.cpp
svn-id: r54353
2010-11-19 00:10:09 +00:00
Max Horn
9fb1e2b17e COMMON: Change wrapBufferedWriteStream() to always disposes wrapped stream
This is the only we need right now, and it saves a few bytes per
instance. The template approach I used before has the drawback that it
increases the binary size, which negates the benefit. Thanks to LordHoto
for pointing this out.

svn-id: r54344
2010-11-18 20:27:15 +00:00
Johannes Schickel
e1030e53a5 BACKENDS: Implement logging API proposed by Max on -devel.
This commits a slightly modified patch from my patch tracker item #3104630
"OSYSTEM: Add logging API as proposed by Max on -devel".

I was not able to test compilation on Android and SamsungTV, since there is no
toolchain for those on buildbot (or I was too blind to find them).

svn-id: r54339
2010-11-18 19:12:14 +00:00
Max Horn
a9dcb11c54 COMMON: Turn BufferedWriteStream into a template class, with disposeParentStream as param
svn-id: r54336
2010-11-18 17:56:21 +00:00
Max Horn
152e52d015 COMMON: Make implementation of Buffered*Stream classes internal
svn-id: r54326
2010-11-18 17:02:51 +00:00
Max Horn
4707b610fc COMMON: Fix incorrect use of assert() macro
The assert() macro may be compiled to be empty. In that case, its
arguments are *NOT* evaluated. Hence, things like
  assert(doSomething())
must not be used whenever doSomething() has important side effects.

Also document BufferedWriteStream::flushBuffer() and explain why it
exists parallel to BufferedWriteStream::flush().

svn-id: r54322
2010-11-18 16:08:56 +00:00
Max Horn
62400d2638 COMMON: Reverting r54257 as _singleton already was protected (and I am blind :)
svn-id: r54259
2010-11-16 08:24:11 +00:00
Max Horn
abe1959d36 COMMON: Simplify DECLARE_SINGLETON macro
This makes it possible to write
  DECLARE_SINGLETON(foo);
instead of
  DECLARE_SINGLETON(foo)
without causing a warning about an extra semicolon.
The extra semicolon helps some editors at parsing the C++ code.

svn-id: r54258
2010-11-16 08:23:13 +00:00
Max Horn
5af8a76b48 COMMON: Make Common::Singleton::_singleton protected instead of public
svn-id: r54257
2010-11-16 08:21:53 +00:00
Yotam Barnoy
fdc2a2cd81 CONFIGMAN: added defragmentation methods for one-plugin-at-a-time
One-plugin-at-a-time can have fragmentation caused by the ConfigManager if a game changes any configuration value. By reallocating and copying over the ConfigManager, we avoid this problem.

svn-id: r54243
2010-11-15 13:37:06 +00:00
Thierry Crozat
4e357549d5 COMMON: Fix TranslationManager
Revision 54206 broke translations support because it uncovered a bug in
the TranslationManager when reading the translations.dat file. In that file
all the stored string lengths include the terminating 0 but Common::String
expect a length without the terminating 0. Therefore all String objects
created from reading the translations.dat file had an incorrect size. This
caused the font file names to be wrong after adding the charset.

svn-id: r54235
2010-11-13 23:27:13 +00:00