Commit Graph

2136 Commits

Author SHA1 Message Date
Johannes Schickel
14fdd11c04 Fix compilation with our default build system when USE_DETECTLANG is specified.
svn-id: r50349
2010-06-26 22:44:43 +00:00
Johannes Schickel
578cdb2aeb Implement support for auto detection of the users preferred locale on Windows.
Note that this might break support for Windows versions older than Win2k,
at least according to the MSVC docs GetLocaleInfo is only supported by Win2k+.

I added a comment about that though.

svn-id: r50348
2010-06-26 22:32:51 +00:00
Johannes Schickel
58fcda82f3 Remove support for translation of console messages.
In recent discussions on -devel it turned out, that this
feature is rather superfluous and instead we should rather
implement a proper error reporting in our GUI.

I also removed the dependency on iconv along with this.

svn-id: r50335
2010-06-26 18:07:41 +00:00
Jordi Vilalta Prat
8008e09ea3 GUI: Update translations after the last message changes
svn-id: r50328
2010-06-26 16:02:40 +00:00
Jordi Vilalta Prat
063cef0c28 GUI: Add and improve some messages to translate
svn-id: r50324
2010-06-26 15:48:03 +00:00
Florian Kagerer
3962f8ba59 AUDIO: some fixes in the audio device code (no sound option, new GUIO flags)
svn-id: r50281
2010-06-25 18:47:52 +00:00
Thierry Crozat
04ae0bcf58 Add German translation from patch tracker (patch #3020282).
svn-id: r50247
2010-06-24 22:36:21 +00:00
Johannes Schickel
17a96b3bd2 Yet another slight variable renaming to match our conventions.
svn-id: r50242
2010-06-24 22:00:45 +00:00
Johannes Schickel
968e10795f Do not include any headers from common/messages.cpp, since that file might be included into an namespace.
svn-id: r50241
2010-06-24 22:00:20 +00:00
Johannes Schickel
a5fb4fec2e Some more cleanup of po2c's output.
svn-id: r50240
2010-06-24 21:59:50 +00:00
Johannes Schickel
63cab52b85 Adapt po2c's output to better mach our code formatting conventions.
Along with it I added a suffix "-scummvm" to the version variable,
since we also feature some custom extensions like the charset
specification.

svn-id: r50239
2010-06-24 21:59:27 +00:00
Johannes Schickel
c96991d991 Added some consts to the output of tools/po2c.
svn-id: r50238
2010-06-24 21:59:03 +00:00
Max Horn
bbad3f333a Patch #1956501: "GUI/LAUNCHER: Midi device selection"
svn-id: r50128
2010-06-21 21:36:36 +00:00
Torbjörn Andersson
38b172e8e5 Fixed some Cppcheck warnings. (There are plenty left, if anyone's wondering.)
svn-id: r50120
2010-06-21 19:32:25 +00:00
Yotam Barnoy
b5a25a6e19 PSP: errors from both ScummVM and the PSP port now print to file by default. This should make debugging easier, especially for users.
svn-id: r50113
2010-06-21 13:58:51 +00:00
Thierry Crozat
f2983093e8 Add nearly complete french translation. I tried to make it work also in 320x200 but french can be quite verbose, so in a few places it does not fit. Also I could not check any of the device specific strings (e.g. from WinCE, Wii or other backends) and a few are missing.
svn-id: r50068
2010-06-19 22:56:58 +00:00
Thierry Crozat
721db3eccb Fix an issue in String::ensureCapacity() when the string is shared. It could allocate two much memory as it was at least doubling the current capacity even when this one was sufficient.
It fixes a crash in GUI::Widget::cleanupHotkey() as the capacity of the string was doubled at each iteration once it was too long for the internal storage (only to add one character to the string). This ended up in a bad_alloc exception after a few iterations.

svn-id: r50050
2010-06-19 15:35:21 +00:00
Johannes Schickel
d869d1370e Properly provide stub implementations for all TranslationManager methods when USE_TRANSLATIONS is not defined.
svn-id: r49997
2010-06-18 02:25:33 +00:00
Johannes Schickel
e347a6856e Do not rebuild common/messages.cpp automatically when a translation changes, but require the user to do "make update-translations".
This should be helpful for building on a system without perl.

svn-id: r49991
2010-06-18 02:08:00 +00:00
Johannes Schickel
cb92890d7b Commit updated common/messages.cpp too.
svn-id: r49946
2010-06-17 19:15:23 +00:00
Johannes Schickel
b56b3b9ead Fix common/messages.cpp rule for out of source directory builds. (Maybe this fixed bug #3017628 "AMIGAOS4: messages.cpp errors")
svn-id: r49940
2010-06-17 18:47:25 +00:00
David Turner
e5f609a40a Correction for Invalid reads in Translation iconv calls reported by Valgrind.
The string terminators were omitted from the iconv call and not restored.

svn-id: r49916
2010-06-17 03:22:52 +00:00
Johannes Schickel
49463c2bf9 Use USE_TRANSLATION, USE_DETECTLANG and USE_TERMCONV instead of (ENABLE_)TRANSLATION, DETECTLANG and TERMCONV.
svn-id: r49885
2010-06-15 19:20:58 +00:00
Johannes Schickel
a42ea73a76 Simplify code for the "ICONV_USES_CONST" case even more. (i.e. remove the "msg" variable there).
svn-id: r49880
2010-06-15 17:56:05 +00:00
Andre Heider
212d0ac28c Fix compilation when using ICONV_USES_CONST.
svn-id: r49878
2010-06-15 17:50:14 +00:00
Johannes Schickel
d8bc798145 Strip out charset information from the system locale again (like it was done before r49871).
Unlike with the old code, we know allow for locales
with a different size than 5 though.

svn-id: r49876
2010-06-15 17:47:23 +00:00
Johannes Schickel
f3288b0f26 Fix a typo.
svn-id: r49875
2010-06-15 17:47:04 +00:00
Johannes Schickel
34d8196334 Output some warning in case an invalid ID was passed to TranslationManager::getLangById.
svn-id: r49873
2010-06-15 17:34:26 +00:00
Johannes Schickel
f607fc59db Extend (and along with it add) some doxygen comments.
svn-id: r49872
2010-06-15 17:34:07 +00:00
Johannes Schickel
0bff5c29fe Use a Common::String instead of a fixed size array for _syslang in TranslationManager.
svn-id: r49871
2010-06-15 17:33:45 +00:00
Willem Jan Palenstijn
7c7054dbd1 Remove unnecessary svn:executable properties
svn-id: r49870
2010-06-15 17:14:38 +00:00
Johannes Schickel
c09af1dcae Some style fixes.
svn-id: r49869
2010-06-15 17:14:02 +00:00
Johannes Schickel
0d7c8071cc Fix iconv signature on BSD systems. (Based on what we do in tools/)
svn-id: r49868
2010-06-15 17:13:42 +00:00
Max Horn
365973542c Add TranslationManager::getTranslation variant taking/returning a Common::String (should fix WinCE build)
svn-id: r49861
2010-06-15 15:50:37 +00:00
Max Horn
44ce741f9c Code formatting
svn-id: r49859
2010-06-15 15:39:59 +00:00
Max Horn
651e2760a3 Fix spelling, cleanup
svn-id: r49843
2010-06-15 12:33:20 +00:00
Max Horn
703f0ca29c SYSTEM: Unify OSystem::getSupportedFormats() signature
svn-id: r49838
2010-06-15 12:21:08 +00:00
Eugene Sandulenko
2399f998a3 i18n: Update Russian translation.
svn-id: r49799
2010-06-15 11:05:52 +00:00
Eugene Sandulenko
94c9f9cdd1 I18n: Add backend files to POTFILES. Update .pot.
Translations were not updated.

svn-id: r49797
2010-06-15 11:03:11 +00:00
Eugene Sandulenko
01bc5dda94 GUI: Implemented Languages as GUI options.
SCUMM and AdvancedDetector support this feature.

svn-id: r49786
2010-06-15 10:57:28 +00:00
Eugene Sandulenko
67bc711580 GUI: Implement MIDI drivers as GUI options.
Proper version of patch #2988641: "GSoC: Select drivers in GUI
based on output types". So far only SCUMM engine supports this
feature.

svn-id: r49783
2010-06-15 10:56:12 +00:00
Eugene Sandulenko
7be2812757 i18n: Update Russian translation with new tooltips
svn-id: r49780
2010-06-15 10:54:48 +00:00
Eugene Sandulenko
b13636d624 i18n: update Russian translation with tooltips.
svn-id: r49776
2010-06-15 10:53:13 +00:00
Eugene Sandulenko
dc040aa867 GUI: Implement radiobuttons.
Implement radiobuttons in GUI. Also closes FR #2821529:
"GUI: volume and subtitles speed sliders".

Subtitle toggle button is replaced by three radiobuttons grouped
by a single group.

Updated translations and themes.

svn-id: r49767
2010-06-15 10:48:39 +00:00
Eugene Sandulenko
3fafa07ab0 GUI: Added in-place hotkeys for widgets.
Now it is possible to specify hotkeys in place for ButtonWidget
and CheckboxWidget (the only widgets with hotkeys now).

Use de-facto standard with putting hotkey between tildes (~).
Like '~O~pen'. The tildes gets stripped before after hotkey
is extracted.

This is done for giving translators possibility to specify
their own hotkeys.

Old hotkeys defined at widget instance creation are left for
leaving possibility to specify non-printable hotkeys such as
Common::ASCII_ESCAPE.

Translation files were updated respectively.

svn-id: r49766
2010-06-15 10:47:31 +00:00
Eugene Sandulenko
859212df25 Implement translation support for ScummVM GUI.
Based on patch #2903830: "Updated Translation Prototype" by alexbevi
which in turn is based on patch #1739965 by jvprat.

Currently it builds all translations right into ScummVM. Once the
feature will be accepted more widely, i.e. more translations will
pop up, it will be trivial to move translation strings to external
file.

Finished translation: Russian
Unfinished translation: Hungarian

Things which are nice to do:
 - Language code -> language mapping for more user friendness
 - Specifying fonts to be used with language
 - Updating of interface language without restart. It will require
   moving of much code to reflowLayout() methods for each dialog

The .po files must be in single byte encodings. I.e. no support
for Unicode.

svn-id: r49759
2010-06-15 10:44:51 +00:00
Eugene Sandulenko
024f492137 Added seek() method to MemoryWriteStreamDynamic.
If it deserves a separate class, shout.

svn-id: r49750
2010-06-15 10:34:14 +00:00
Eugene Sandulenko
9224a0bd6e Hid hashed fileopening to debuglevel 8.
svn-id: r49705
2010-06-15 10:19:06 +00:00
Max Horn
46155b2c36 Add Android backend from patch #2603856
svn-id: r49449
2010-06-06 09:34:36 +00:00
Max Horn
767edc91fa OSYSTEM: Get rid of kFeatureAutoComputeDirtyRects
svn-id: r49388
2010-06-02 00:52:57 +00:00
Johannes Schickel
9521f8d008 Typo fixes.
svn-id: r49324
2010-05-30 13:41:40 +00:00
Johannes Schickel
f02e31f2fc Fix non-const version of Common::String::begin.
Common::String::begin now assures the storage is a unique one, i.e. there are
no other Common::String objects pointing at it. This allows for safe use of
the writable iterators (and thus fixes the test case added with my last commit)

svn-id: r49323
2010-05-30 13:10:44 +00:00
Johannes Schickel
d0c79d21e9 Fix file length of zip file members inside ZipArchive (thanks to fuzzie for reporting).
svn-id: r49321
2010-05-30 12:44:59 +00:00
Max Horn
bbaf98127d correct typo
svn-id: r49270
2010-05-27 20:59:15 +00:00
Matthew Hoops
5ceb896b6b Have the MacResManager ignore resources with length 0.
svn-id: r49190
2010-05-24 16:51:33 +00:00
Eugene Sandulenko
1a938956ec Implement FR #2988017: exit status with --list-saves always 0
svn-id: r49132
2010-05-21 18:25:01 +00:00
Jordi Vilalta Prat
474b804e33 Make the MacResManager opening more robust to failed tries and plug its memory leaks
svn-id: r49116
2010-05-20 13:46:18 +00:00
Eugene Sandulenko
15986b81c2 Added getBaseFileName() method and enhanced open() with trying macbinary format in plain files
svn-id: r49074
2010-05-18 10:39:08 +00:00
Johannes Schickel
01070d72d3 Minor formatting.
svn-id: r49067
2010-05-17 22:17:42 +00:00
Max Horn
22caf0e1cf Get rid of Common::Rational::normalize and other redundant code
svn-id: r49066
2010-05-17 22:08:40 +00:00
Max Horn
00cd966f3d Some tweaks and fixes for Common::Rational
* Fix Common::gcd to work with negative input
* This fixes a bug in Common::Rational's multiplication code
* Add some more basic unit tests (including one which checks for
  the now fixed multiplication bug)
* cleanup

svn-id: r49064
2010-05-17 22:07:58 +00:00
Matthew Hoops
811fc0e7ec Add the Common::Rational class from patch #2963496 (VideoDecoder Rewrite)
svn-id: r49061
2010-05-17 20:53:04 +00:00
Joost Peters
dd0c1fd6f0 Restrict MIPSpro workaround to non-gcc compilers -- fixes compilation with gcc on irix.
svn-id: r49060
2010-05-17 16:50:10 +00:00
Matthew Hoops
fab2e2a8c4 Fix mismatched new[]/delete[]
svn-id: r49018
2010-05-12 20:22:10 +00:00
Matthew Hoops
8b1cb63de3 Pass by reference instead of value to getResource(String)
svn-id: r49008
2010-05-11 19:13:24 +00:00
Matthew Hoops
59476e44b9 Add support for getting a resource from the resource fork by name.
svn-id: r49004
2010-05-11 15:38:21 +00:00
Matthew Hoops
b9813063ad Add support to the MacResManager and AdvancedDetector to take the md5 of a resource fork. This introduces a new flag, ADGF_MACRESFORK, which when set will take the md5 and size from the resource fork instead of the data fork.
svn-id: r48997
2010-05-10 18:23:54 +00:00
Matthew Hoops
cdf30ecc5a Minor fix for using the MacResManager with a regular file; switch MacBinary's data fork to using a SeekableSubReadStream instead of a MemoryReadStream.
svn-id: r48995
2010-05-10 00:50:37 +00:00
Eugene Sandulenko
57f2425b28 Patch #2901515: HE: Resource Forks on Mac OS X
svn-id: r48984
2010-05-09 18:27:56 +00:00
Johannes Schickel
caf31ee5af Replace various strncpy usages by strlcpy.
svn-id: r48955
2010-05-05 17:54:12 +00:00
Johannes Schickel
388e4b65bf Add a custom implementation of OpenBSD's strlcat and strlcpy.
This includes both an implementation and some basic unit tests for
the above mentioned functions.

svn-id: r48953
2010-05-05 17:52:59 +00:00
Max Horn
2149a2383d Reduce indirect header dependencies further
svn-id: r48936
2010-05-04 12:00:16 +00:00
Max Horn
970745e60c Move DebugChannel related code to new header
svn-id: r48935
2010-05-04 11:59:22 +00:00
Max Horn
2b6958995b correct indention
svn-id: r48822
2010-04-27 21:41:25 +00:00
Max Horn
460d69e885 COMMON: Move DebugChannel stuff into a new DebugMan singleton
svn-id: r48821
2010-04-27 21:40:52 +00:00
Max Horn
445dccd59b cleanup
svn-id: r48820
2010-04-27 21:39:43 +00:00
Andre Heider
0ef8fd7ddc Document setPalette() and grabPalette() changes, fix some incorrect 8bit statements.
svn-id: r48758
2010-04-20 21:18:37 +00:00
Johannes Schickel
71331c7f53 Fix regression introduced with r46130, which caused debugN strings to be post processed via debugOutputFormatter.
Formerly all debugN strings were not post processed via "errorString" (or the
"debugOutputFormatter" as it is called nowadays). This revision did change
how debug strings are post processed and removed the special case for debugN
by accident.

svn-id: r48716
2010-04-19 12:50:49 +00:00
Johannes Schickel
a71eb59467 Whitespace fix.
svn-id: r48654
2010-04-13 16:13:48 +00:00
Max Horn
69b86db74c Print message when creating new INI; don't rewrite it directly after reading.
Together with the r48651, this addresses bug #2983718:
 "Incomprehensible message for missing scummvm.ini"

svn-id: r48653
2010-04-13 10:08:17 +00:00
Max Horn
97583b02cd Patch #2985205: "GSoC: Improve FSNode warning messages"
svn-id: r48651
2010-04-13 09:53:05 +00:00
Ori Avtalion
2fc9d6845b Apply patch #2982163 - CONFIG: Use HE keyword instead of HB for the Hebrew language
svn-id: r48645
2010-04-12 21:21:06 +00:00
Max Horn
f2ff555996 Rest of patch #2982224: GSoC: Added unit test and unified error message display
svn-id: r48627
2010-04-11 19:04:02 +00:00
Max Horn
7c510f2dfa COMMON: Add Common::parseBool
svn-id: r48566
2010-04-06 09:27:13 +00:00
Max Horn
4bac9e1b75 COMMON: Cleanup ConfigManager code
* get rid of ConfigManager::_emptyString
* get rid of ConfigManager::Domain::get (use getVal instead)
* remove some dead code

svn-id: r48417
2010-03-29 20:31:23 +00:00
Max Horn
92c896d883 Patch #2973290: Semicolon cleanup
svn-id: r48359
2010-03-22 20:28:08 +00:00
Johannes Schickel
a8d2c0de10 - Renamed SharedPtr<T>::Pointer to SharedPtr<T>::PointerType
- Introduced ReferenceType to SharedPtr and ScopedPtr

svn-id: r48337
2010-03-20 20:25:12 +00:00
Johannes Schickel
2a2cfe7ab0 Style fixes / cleanup.
svn-id: r48336
2010-03-20 20:16:16 +00:00
Vladimir Menshakov
abdfbafa45 added ScopedPtr template
svn-id: r48334
2010-03-20 20:01:44 +00:00
Johannes Schickel
e117783379 Some style fixes.
svn-id: r48313
2010-03-20 13:18:47 +00:00
Johannes Schickel
5c1a63026e Remove unused stdarg.h include.
svn-id: r48312
2010-03-20 13:00:23 +00:00
Johannes Schickel
794fcf0170 Sort object files.
svn-id: r48311
2010-03-20 12:57:12 +00:00
Johannes Schickel
38b2b3c04f Move StringTokenizer to its own files (tokenizer.h/tokenizer.cpp).
svn-id: r48310
2010-03-20 12:56:56 +00:00
Johannes Schickel
a0f90fd603 Add common/util.h include to common/algorithm.h for SWAP.
This should fix the compilation with clang++, see bug report
 #2971226 "COMMON: Compile error - SWAP undeclared in algorithm.h".

svn-id: r48307
2010-03-20 12:13:37 +00:00
Max Horn
cac0ac66e2 COMMON: Get rid of Common::StringList
svn-id: r48287
2010-03-18 15:54:40 +00:00
Max Horn
c934642bdb COMMON: Move typedef StringList from str.h to new header str-array.h
This removes the dependency on array.h from str.h.
Also, begun migration from the confusing type name "StringList" to
the more appropriate StringArray.

svn-id: r48282
2010-03-18 15:09:24 +00:00
Max Horn
30c84d2cff COMMON: Move tag2str from util.h to str.h
svn-id: r48281
2010-03-18 15:07:48 +00:00
Max Horn
3e63df5415 COMMON: Move port specific '#define fputs' from util.cpp to textconsole.cpp
svn-id: r48280
2010-03-18 15:07:30 +00:00
Max Horn
d78dba3bca COMMON: Move Common::RandomSource to common/random.*
svn-id: r48279
2010-03-18 15:07:11 +00:00
Johannes Schickel
40562798d6 Fix our DECLARE_SINGLETON macro to conform to the C++ specs.
We need to use a namespace Common { } there to make strict C++ compilers
like clang++ and comeau happy. I also added a slight comment about why
that is needed to the macro definition and a note that you need to use
it from the global namespace.

svn-id: r48254
2010-03-13 21:55:49 +00:00