Commit Graph

3637 Commits

Author SHA1 Message Date
djsrv
f3a179a873 COMMON: Add dispose arg to MemoryReadStreamEndian 2020-08-12 12:23:43 -04:00
Pawel Kolodziejski
aea3bae26d ALL: Synced with ScummVM - rev 0b777c23a9 2020-08-11 00:59:40 +02:00
Eugene Sandulenko
1bb73862a1 COMMON: Lightened another MacBinary check so ISOBuster files really work 2020-08-01 22:38:09 +02:00
Eugene Sandulenko
4221c38167 COMMON: Support MacBinary3 files produced by ISOBuster 2020-08-01 20:25:39 +02:00
Eugene Sandulenko
aa563f0c81 ALL: Remove PS2 port 2020-08-01 15:15:49 +02:00
athrxx
5e276286ae AUDIO/GUI: add SegaCD sound settings 2020-07-30 22:19:21 +02:00
SupSuper
55db9e92e9 Revert "COMMON: Fix abstract SeekableReadStreamEndian calling virtual constructor"
This reverts commit bed3550cbd.
2020-07-28 00:27:03 +01:00
SupSuper
bed3550cbd COMMON: Fix abstract SeekableReadStreamEndian calling virtual constructor 2020-07-27 23:07:06 +01:00
aryanrawlani28
22842d1a88 GUI: RTL: Do not repeatedly print warnings if fribidi is not available
- Previously, if using an RTL-based language and disabled fribidi, console would repeatedly have the same messages spamming.
- Reduce this to only print warning one time.
2020-07-25 00:32:34 +02:00
Eugene Sandulenko
1aea38cc63 COMMON: Makw SeekableSubReadStreamEndian subclass of SeekableReadStreamEndian 2020-07-21 18:20:00 +02:00
Eugene Sandulenko
8939609787 COMMON: Make MemoryReadStreamEndian inherit from SeekableReadStreamEndian 2020-07-21 12:46:22 +02:00
SupSuper
4d855ff6c0 COMMON: Fix warning from incorrect parameter type in fribidi call
fribidi_log2vis takes a FriBidiParType, not a FriBidiCharType
(though the values are identical)
2020-07-21 07:11:09 +01:00
Henrik "Henke37" Andersson
dc7b0a7909 COMMON: Dedicated function for in buffer check
It's UB to compare pointers that aren't from the same array. Cast to uintptr to reduce the issue to IB.
2020-07-19 23:07:35 +01:00
Michał Janiszewski
e0505d5fbf COMMON: Add MSVC ARM64 support 2020-07-15 15:30:55 +02:00
Eugene Sandulenko
f534e11ccf COMMON: Added VersionInfo parser to WinResources 2020-07-09 23:13:47 +02:00
Eugene Sandulenko
bcd1d3c688 COMMON: Add 'vers' resource parser to MacResMan 2020-07-08 11:42:59 +02:00
Eugene Sandulenko
be388e644a COMMON: Give direct access to Data fork in MacResMan 2020-07-07 22:31:13 +02:00
Pawel Kolodziejski
fa277fcb48 ALL: Sync with ScummVM - rev a94849abc4 2020-06-25 08:34:00 +02:00
Pawel Kolodziejski
8f4e1c6cf3 Sync with ScummVM rev. 654b8208b8 2020-06-22 08:14:16 +02:00
Thierry Crozat
3591003ea3 TTS: Add method to get the default voice
This returns by default the first voice, but can be reimplemented
in derived classes to return the system default voice.
2020-06-21 16:31:15 +01:00
Cameron Cawley
34901536a7 LUA: Remove use of final as a variable name 2020-06-18 20:14:46 +01:00
Colin Snover
7c131e0277 COMMON: Allow use of C++11 final keyword 2020-06-18 20:14:46 +01:00
Eugene Sandulenko
6059566777 COMMON: Added scumm_strcasestr() 2020-06-18 14:38:12 +02:00
Zvika Haramaty
41f3d4b488 COMMON: Encoding::convertIconv - check errors on last call to iconv
There was a bug when trying to convert the Hebrew string "\e0\e1\e2"
from WINDOWS-1255 to UTF-32LE, because there was a last call to
`iconv` with `NULL`s, without error checking, and buffer needed to
be extended for that last one call.

Now this call is inserted to the main `iconv` loop, with error checking.
2020-06-09 23:01:47 +02:00
Philippe Valembois
66b8cf9cac COMMON: Fix build when uint32_t and uint32 are not defined the same
FriBidiChar is mapped to uint32_t (from stdint.h) while U32String is
composed of uint32 (from scummsys.h/config.h). On some platforms those
two types aren't defined using the same base type (long int vs int) and
compilation errors occur.
2020-06-07 12:02:55 +02:00
Bastien Bouclet
bad365c97e COMMON: Add a helper to update a ConfMan entry and flush to disk 2020-06-07 07:40:27 +02:00
Antoniou Athanasios
c2a12908c2
COMMON: Use assert for CLIP() if bounds are not properly ordered (#2298)
COMMON: Use assert in debug builds to prevent bad ordering of bounds

The only macro to check against for debug vs release builds that I found is RELEASE_BUILD
2020-06-06 17:53:47 +03:00
Eugene Sandulenko
b1c5e63de0 JANITORIAL: Whitespace fixes 2020-06-06 15:08:33 +02:00
Eugene Sandulenko
83c8035fbc MATH: Added hypotenuse() call 2020-06-06 15:08:17 +02:00
Eugene Sandulenko
6bea770e6d COMMON: Fix PS2 build 2020-06-06 00:09:35 +02:00
Eugene Sandulenko
787f3e4e61 DIRECTOR: Added test score for the test target 2020-06-04 00:07:34 +02:00
Eugene Sandulenko
7200acb791 COMMON: Clarify comment in MacResMan 2020-05-29 15:55:07 +02:00
Paul Gilbert
9c5ced80c5 COMMON: added note about using shake in ULTIMA engine 2020-05-20 17:33:29 -07:00
Andrei Prykhodko
379168ade4 COMMON: added note about using shake in PETKA engine 2020-05-20 22:05:31 +03:00
Zvika Haramaty
1f9d421558 COMMON: moved convertBiDiString(..lang) to unicode-bidi.h
Continuing the work at https://github.com/scummvm/scummvm/pull/2236,
which moved `convertBiDiString(..page)` to unicode-bidi.h,
now moving to there also the `(..lang)` flavour.

Thus, translation.h has only the SVM-GUI related function, and the
two util functions page+code are in unicode-bidi.
2020-05-19 12:32:58 +02:00
lolbot-iichan
d8951b2aa1 COMMON: Add Persian language & CP1256 encoding 2020-05-18 23:24:15 +02:00
Cameron Cawley
e207fda7f7 COMMON: Allow ignoring CR line breaks in SeekableReadStream::readLine() 2020-05-12 14:41:53 +02:00
BLooperZ
ec83715b43 COMMON: add UnicodeBiDiText wrapper 2020-05-12 14:36:09 +02:00
BLooperZ
028e4be835 COMMON: add method to get visual position for bidi 2020-05-12 14:36:09 +02:00
BLooperZ
5b2bc4a9d3 COMMON: move bidi conversion to str-bidi.h 2020-05-12 14:36:09 +02:00
BLooperZ
c30b22c628 COMMON: add bidi support for U32String 2020-05-12 14:36:09 +02:00
mataniko
321a02aff2 JANITORIAL: Rename shouldRTL, resetRTL and FORCE_RTL 2020-05-12 10:36:38 +02:00
mataniko
06242a712b JANITORIAL: Rename EVENT_RTL
Now that ScummVM is adding RTL support, the EVENT_RTL should be disambigious that it is for returning to launcher
2020-05-12 10:36:38 +02:00
Pawel Kolodziejski
88cefe47c0 ALL: Small sync with ScummVM 2020-05-11 21:56:33 +02:00
mataniko
38325bfb94 BACKENDS: Don't turn off screen when ScummVM is running a game 2020-05-10 00:35:29 -04:00
Pawel Kolodziejski
b586571900 ALL: synced with ScummVM commit 09bf38c120 2020-05-09 20:05:54 +02:00
Eugene Sandulenko
f48ab6afb8 JANITORIAL: Fix indentation 2020-05-03 19:10:04 +02:00
aviloria
d8e3c39e19 COMMON: Add support for Serbian language 2020-05-03 19:09:02 +02:00
Eugene Sandulenko
a5f2284421 COMMON: Added U32String::insertChar() 2020-05-01 01:30:20 +02:00
Zvika Haramaty
1b8f471c69 GUI: Added (partial) BiDI support
Added GNU FriBidi, thus allowing Hebrew (or other future RTL languages)
to be displayed correctly.
It's been implemented for all ScummVM GUI (as far as I have noticed),
and can be further used by the engines as needed.

This work is only partial, because for complete BiDI support we'll need
to mirror the widgets, and support input text areas (which currently
don't even support Hebrew text input at all).

Some changes are required in order to use this:
- Visual Studio:
  -- add FriBidi lib from https://github.com/ShiftMediaProject/fribidi
     (and place the files in the other libs location)
  -- add fribidi.dll to the current directory
  -- add fribidi.lib to VS library list
     (in GUI it's: Project -> scummvm Properties -> Linker ->
                   input -> Additional Dependencies)
  -- Add USE_FRIBIDI define
     either to:
         dists/msvc/ScummVM_Global.props   <PreprocessorDefinitions>
     or in GUI:
         Project -> scummvm Properties ->
         C/C++ -> Preprocessor -> Preprocessor Definitions
- GCC:
  -- install FriBidi
     e.g.,
        Ubuntu: `apt-get install libfribidi-dev`
        CentOS: `yum install fribidi-devel`
  -- rerun `configure`
2020-04-30 10:32:18 +02:00
Eugene Sandulenko
430e760094 JANITORIAL: Fix formatting 2020-04-29 10:32:23 +02:00
lolbot-iichan
8057ccd93d COMMON: Switch AchMan to use INIFile instead of ConfMan section 2020-04-29 10:31:36 +02:00
lolbot-iichan
c0e05b1421 COMMON: Add achievements helpers 2020-04-29 10:31:36 +02:00
Eugene Sandulenko
2165c26244 COMMON: Hide object destruction from Coverity also in U32String 2020-04-28 09:24:48 +02:00
Eugene Sandulenko
b9fab94dbf COMMON: Shut coverity up with tons of false positives 2020-04-27 23:51:56 +02:00
Eugene Sandulenko
eb04cff38d COMMON: Swtich scumm_strdup to malloc(), so its behaviour matches strdup() 2020-04-27 22:46:22 +02:00
Eugene Sandulenko
34180fe8cf JANITORIAL: Fix code formatting 2020-04-27 18:51:33 +02:00
Eugene Sandulenko
169e8f3dd5 COMMON: Remove redundant code 2020-04-27 18:34:23 +02:00
Thierry Crozat
8b0b9f11c6 OSYSTEM: Add kFeatureNoQuit to remove Quit buttons and replace Quit with RTL
Some platforms should not allow quitting ScummVM. For example the Apple's
HUG for iOS state that we should "Never quit an iOS applications
programmatically". Adding the kFeatureNoQuit allows those backend
that need it to remove the possibility to quit the application.
2020-04-26 16:19:37 +01:00
Eugene Sandulenko
a08dc72eab COMMON: Skip "an " in dictionary sort 2020-04-24 10:54:00 +02:00
Eugene Sandulenko
0b00d71643 COMMON: Add methods for dictionary string comparison 2020-04-24 10:54:00 +02:00
Bastien Bouclet
85e3fb38fb SDL: Change keyboard repeat to apply on unmapped events
The keyboard repeat event generator is used when building against SDL1.
Previously the repeat events would generate based on the event stream
produced by the keymapper which is not guaranteed to have matching up
and down events in the case the keymaps are changed while a key is
pressed.

Fixes #11417.
2020-04-12 11:11:00 +02:00
Bastien Bouclet
b4d0b8eee6 MYST3: Rework archive handling to be more flexible 2020-03-28 08:59:11 +01:00
SupSuper
a4d44e3de9 BACKENDS: Move shared DialogManager code to common
All backends need to flush events and window when opening a dialog
2020-03-22 20:46:42 +02:00
Bastien Bouclet
9cc2fee887 SDL: Enable joystick input by default
Game controller input is now enabled whenever a compatible device is
connected. The keymapper's keymaps are refreshed when a joystick is added
or removed.

Fixes #10366.
2020-03-16 18:41:27 +01:00
Cameron Cawley
f2db412ba5 GUI: Store the shader name in the config file instead of the ID 2020-03-09 18:01:14 -05:00
Cameron Cawley
981b771e38 BACKENDS: Remove unused feature kFeatureDisableKeyFiltering 2020-03-09 22:14:38 +02:00
Bastien Bouclet
568d882e80 KEYMAPPER: Introduce a Virtual Mouse event source
The Virtual Mouse is meant to provide a way to control the mouse cursor
on system without a physical mouse. It provides keymapper actions that
are expected to be bound to game controller axes or buttons.
2020-03-09 20:00:31 +01:00
Bastien Bouclet
e66e35a3fd COMMON: Move isMouseEvent from Keymapper to Common 2020-03-09 20:00:31 +01:00
Paul Gilbert
b2095095ed ULTIMA8: Starting the game will now auto-load the previous used savegame 2020-02-26 21:35:48 -08:00
Cameron Cawley
1605b72ee8 BACKENDS: Add events for additional mouse buttons 2020-02-26 21:34:24 +01:00
Matthew Duggan
ff840ba47b COMMON: Fix return value of String::findLastNotOf 2020-02-25 18:48:37 -08:00
lolbot-iichan
3e738f7734 COMMON: Fix conversion to UTF32 for short strings
Testcase: convert 1-byte encoded single character string from 125X to
UTF32, e.g. "=".

Expected result: got widestring, first dword contains "=", next dword
contains "\0"

Actual result: got widestring, first dword contains "=", second dword
contains garbage, next dword contains "\0"

Reference implementation:
http://www-personal.umich.edu/~bazald/l/api/_s_d_l__iconv_8c_source.html
, line 887
2020-02-24 09:18:38 +01:00
Bastien Bouclet
22c75c644a EVENTS: Change DefaultEventManager to be the owner of the keymapper 2020-02-22 13:14:04 +02:00
Paul Gilbert
b2fd3ccacc ULTIMA8: Implement the toUnicode method 2020-02-19 19:51:08 -08:00
lolbot-iichan
7edaf3f2f7 KEYMAPPER: Enable remapping of the mouse wheel 2020-02-19 08:04:25 +02:00
Paul Gilbert
818d9bab27 ENGINES: Change debugger trigger to Ctrl+Alt+D using keymapper 2020-02-16 13:07:19 +02:00
Le Philousophe
b1d20e4b56 COMMON: Add find() method for character to U32String
This is like strchr but for uint32 based strings
2020-02-15 22:07:22 +01:00
Bastien Bouclet
29dd15af0c KEYMAPPER: Enable remapping the keyboard modifier keys 2020-02-14 19:30:00 +01:00
Cameron Cawley
13e5042dee COMMON: Add WriteStream::writeStream() 2020-02-09 23:26:45 +02:00
Bastien Bouclet
2177e685b7 KEYMAPPER: Allow joystick half axes to be remapped 2020-02-09 08:34:16 -06:00
rsn8887
eea70a3c8c BACKEND: Allow SDL2 mapping of L2/R2, fix psp2/switch mapping 2020-02-09 08:34:16 -06:00
jepael
83d481f882 COMMON: Fix compiler warning 2020-02-07 21:58:31 +01:00
Bastien Bouclet
bb27669026 COMMON: Refill the stream buffer after making a large read
After reading directly from the parent stream, the buffer needs to be
filled with the end of the read data so seeking back in the stream into
the buffered area and reading returns data consistent with the parent
stream.

Fixes bug #11342 (PSP port only).
2020-02-07 18:33:56 +01:00
Eugene Sandulenko
008f4c6f8d COMMON: Added dumper method to MacResMan 2020-02-06 21:42:01 +01:00
Paul Gilbert
3717b672d1 ULTIMA: Further compilation fixes 2020-02-01 17:48:37 -08:00
Paul Gilbert
e8eb67f82e ULTIMA: Fix crashes in String::erase 2020-02-01 13:13:51 -08:00
Paul Gilbert
f972d68ae2 COMMON: Change recently added string methods to be camelcase 2020-02-01 13:13:51 -08:00
Paul Gilbert
a178952464 ULTIMA: Moving many string methods from Std::String to Common::String 2020-02-01 13:13:51 -08:00
Paul Gilbert
ae58f79d18 LUA: Re-introduce support for loadfile to load actual files 2020-02-01 13:13:51 -08:00
Eugene Sandulenko
9c92773844 COMMON: Add override keywords 2020-01-31 14:48:10 +01:00
Eugene Sandulenko
507dd5c178 COMMON: Mark methods as override 2020-01-31 12:26:29 +01:00
Bastien Bouclet
e973092aef KEYMAPPER: Enable remapping of the mouse buttons 2020-01-29 08:51:29 +01:00
Bastien Bouclet
32174c9067 KEYMAPPER: Actions can now be bound to joystick buttons 2020-01-29 08:51:29 +01:00
Bastien Bouclet
df4bf6556c KEYMAPPER: Introduce custom engine actions
Custom engine actions are a new type of event the Keymapper can produce.
When an engine declares its keymap, it can declare it wants to receive
custom action events when the corresponding key is pressed, instead of
the originating hardware input events.

This system allows:
* Key bindings to be specified only once when declaring the keymap,
  instead of twice (when handling the events).
* To truly rebind keys in the keymaps dialog. When using traditional
  event mapping, the keymapper remaps the user keypress to the keypress
  expected by the game engine to perform the action. However, the engine
  still accepts the original keys.

The new concept of 'standard actions' defines a set of engine actions
that are commonly available in the games supported by ScummVM. Backends
can define default bindings for the standard actions to hardware
specific input devices.
2020-01-29 08:51:29 +01:00
Bastien Bouclet
7617723ab5 KEYMAPPER: Allow backends to register multiple keymaps 2020-01-29 08:51:29 +01:00
Bastien Bouclet
ec9c394787 KEYMAPPER: Remove DefaultEventMapper
Now the keymapper is enabled by default, it does not make sense to have
a separate class anymore.
2020-01-29 08:51:29 +01:00
Bastien Bouclet
14663c4790 KEYMAPPER: Make the keymapper mandatory 2020-01-29 08:51:29 +01:00
Bastien Bouclet
cc336635a1 KEYMAPPER: Change custom backend action events not to be instant
Allows action consumers to choose if they want to react on the start or
on the end of an user interaction.
2020-01-29 08:51:29 +01:00
Bastien Bouclet
2d7588d9c3 EVENTS: Remove the dependency to EventSource from EventMapper 2020-01-29 08:51:29 +01:00
Bastien Bouclet
511d138bbc KEYMAPPER: Move the remap dialog to an option dialog tab
The aim is to make it easy to discover, and possible to use without a
keyboard.
2020-01-26 23:09:08 +02:00
Bastien Bouclet
8dd2b7ca39 EVENTS: Expose the primary global keymap builder 2020-01-26 23:09:08 +02:00
Bastien Bouclet
7edff01e69 KEYMAPPER: Move the remap event capture logic out of the keymapper 2020-01-26 19:07:53 +01:00
Bastien Bouclet
63142d8090 COMMON: Event observers can't eat poll notifications anymore
It did not make much sense, and was unused.
2020-01-26 19:07:53 +01:00
Cameron Cawley
9fc24522d7 BACKENDS: Add more keycodes 2020-01-21 03:28:22 +02:00
Cameron Cawley
a692905eb2 COMMON: Add a function to simplify loading Windows executables 2020-01-11 17:34:12 +02:00
Cameron Cawley
aa9a41545a COMMON: Add a common base class for the Windows resource classes 2020-01-11 17:34:12 +02:00
Cameron Cawley
b8e94e1acd COMMON: Rename PEResources::getNameList() to getIDList() 2020-01-11 17:34:12 +02:00
Eugene Sandulenko
a6307b768c COMMON: Fix reading beyond array pointers in toString() 2020-01-06 13:31:58 +01:00
aviloria
92c7366d1c COMMON: Add ZH_ANY language for generic chinese languages
We have a game that has actual ZH_CNA, ZH_TWN translations and also ships with the same file set that formed ZH_CNA in previous game versions, when there was no separate Traditional/Simplified variants and was only one 'Chinese'
2019-12-27 01:36:19 +02:00
Eugene Sandulenko
5375a2a048 COMMON: Add sanity check to MacResMan 2019-12-26 17:03:44 +01:00
Thanasis Antoniou
0357293897 ANDROID: Fix crash due to adding '.' folder in SearchManager 2019-12-16 22:59:10 +02:00
Cameron Cawley
e92ac655be BACKENDS: Add default implementation for GraphicsMode functions 2019-12-15 16:06:56 +02:00
Cameron Cawley
c3c3137ab3 BACKENDS: Move nextHigher2() into common/algorithm.h 2019-12-14 17:09:18 +02:00
Eugene Sandulenko
5825a30b67 JANITORIAL: Whitespace fixes 2019-12-13 00:02:38 +01:00
Eugene Sandulenko
4b0fcd411b COMMON: Fix string length in U32String::encode()
Our method expects length in bytes, not in characters, which is 4x for U32
2019-12-12 23:59:58 +01:00
D G Turner
365e9af4f0 COMMON: Minor Spelling Fix to Util Header Comment
No functional change.
2019-12-11 02:19:28 +00:00
Eugene Sandulenko
c85e5a64d7 COMMON: Fix toPrintable() for upper characters 2019-12-11 00:45:12 +01:00
sluicebox
baea8d5c9c COMMON: Make save compression optional when copying
Allows for copying or renaming uncompressed save files, such as
in Phantasmagoria 1, without compressing them in the process.
2019-12-09 22:57:46 -08:00
Eugene Sandulenko
6b6dc21813 COMMON: Added helper function to produce printable strings 2019-12-10 00:32:54 +01:00
D G Turner
2d90392ba5 COMMON: Fix GCC-9 Warning in MacResManager Class
This is another case of a warning from using memset to clear a non-trivial
data structure.

GCC-9 detects this with the default warning of -Wclass-memaccess.
2019-12-09 16:59:10 +00:00
Bastien Bouclet
feaf9dc365 ALL: Sync with ScummVM rev. 55dba55056 2019-12-08 17:06:42 +01:00
D G Turner
76bf6da5fa COMMON: Fix Missing Default Switch Case in Span Header
This is flagged by GCC if -Wswitch-default is enabled.
2019-12-01 00:32:48 +00:00
Le Philousophe
6aaec02c57 COMMON: Add CJK encodings to Common::CodePage
Use Encoding::convert to do the conversion first and try old method if
it fails
2019-11-30 13:34:33 +02:00
sluicebox
b8390fa161 GRAPHICS: Add interface for horizontal shake 2019-11-19 00:20:40 +01:00
Cameron Cawley
f2b9f7bb76 BACKENDS: Remove the Windows CE port 2019-11-17 22:33:56 +01:00
Bastien Bouclet
34bf3f2de0 TTS: Fix use of virtual function in TTSMan destructor
TextToSpeechManager::freeVoiceData was called while the virtual function
table pointer was already reset by the parent class destructor.
2019-11-15 21:24:22 +01:00
Paul Gilbert
d51d3d4086 COMMON: Allow for enabling/disabling debug channels by number 2019-11-11 18:20:29 -08:00
Bastien Bouclet
6a627e3e98 COMMON: Fix very noisy warning when building with GCC 9 in C++11 mode 2019-11-10 21:04:29 +01:00
Cameron Cawley
d1fa1154fe BACKENDS: Fix using fillScreen in non-paletted screen modes 2019-11-10 01:25:46 +02:00
Thierry Crozat
8ac0012fdd COMMON: Clarify documentation for OSystem::convertEncoding 2019-11-08 20:43:25 +00:00
Le Philousophe
d62bb15d71 COMMON: Add ignoreClashes flag to SearchSet and FSDirectory
This lets engine mute warnings about name clashes when there are useless
for its case. This will be used by Versailles as the tree has
directories with the same name at various places.
Files are duplicated too in different directories but are identical.
2019-11-03 00:44:23 +01:00
D G Turner
dca112f94b COMMON: Fix Missing Default Switch Case in Coroutine Macros
These are flagged by GCC if -Wswitch-default is enabled.
2019-10-21 00:19:41 +01:00
Eugene Sandulenko
50822e708b COMMON: Moved string encoding to separate file 2019-10-19 17:38:26 +02:00
Eugene Sandulenko
9ff8e69aa9 COMMON: Added new + operator to U32String 2019-10-18 17:20:27 +02:00
Eugene Sandulenko
eb72d6b479 COMMON: Added String::find() 2019-10-18 00:28:36 +02:00
Jaromir Wysoglad
b9d3c84db4 TTS: Fix language setting. 2019-10-16 19:30:56 +02:00
D G Turner
a7c497af3b COMMON: Add Missing Default Switch Case to U32String Class
These are flagged by GCC if -Wswitch-default is enabled.
2019-10-06 09:51:01 +01:00
D G Turner
70582daf46 COMMON: Fix Missing Default Switch Cases in Lua Interpreter
These are flagged by GCC if -Wswitch-default is enabled.
2019-10-06 07:58:40 +01:00
Eugene Sandulenko
dbf56a3b29 COMMON: Add methods to U32String to match String 2019-10-04 15:54:48 +02:00
Eugene Sandulenko
72a5d9d4ba JANITORIAL: Whitespace fixes 2019-10-04 15:54:48 +02:00
D G Turner
4a2cbd94b6 COMMON: Add Missing Switch Default Case in ZLIB Class
These are flagged by GCC if -Wswitch-default is enabled.
2019-10-04 04:27:42 +01:00
D G Turner
cee1b56f3a COMMON: Add Missing Default Switch Cases in DCT Class
These are flagged by GCC if -Wswitch-default is enabled.
2019-10-04 04:27:03 +01:00
D G Turner
8a96a1854d RECORDER: Add Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-10-04 02:30:19 +01:00
Cameron Cawley
3cb6a84f03 BLADERUNNER: Remove use of C99 math functions 2019-10-03 23:52:46 +01:00
D G Turner
9308f802f3 COMMON: Add Switch Default Cases in JSON Parser 2019-10-03 02:53:56 +01:00
D G Turner
0eec560cac COMMON: Add Missing Switch Default Cases to Stream Seek Methods
These are flagged by GCC if -Wswitch-default is enabled.
2019-10-03 01:01:16 +01:00
D G Turner
78ef4b9499 COMMON: Add Default Cases to Switch Statements in Memstream Classes
These are flagged by GCC if -Wswitch-default is enabled.

This avoids possible hard to diagnose bugs if the whence int parameter is
accidently set to an unexpected value.
2019-10-02 06:12:38 +01:00
Thierry Crozat
06acfd515f COMMON: Fix memory leaks in iconv error case
This fixes coverity CID 1405783 and CID 1405784.
2019-09-30 22:04:27 +01:00
D G Turner
e895548237 COMMON: Fix MSVC Compiler Warning
The enum is implicitly int32 by default so causes signed vs. unsigned
assignment warnings. Changing this to a const uint32 avoids the issue.
2019-09-30 01:44:14 +01:00
Paul Gilbert
c03b7a50ea GLK: ADRIFT: Implement zlib decompression 2019-09-25 20:13:27 -07:00
Eugene Sandulenko
7def18a26c COMMON: Workaround for a compiler bug in osx_intel buildbot toolchain
It was introduced in 014bef9eab. There is
nothing wrong with our code, but strangely, it makes the
i686-apple-darwin9-as v1.38 to choke when parsing .stabd directives.

Once we upgrade buildbot or do another change to system.h, hopefully
this could be removed.
2019-09-23 22:22:23 +02:00
Cameron Cawley
7bf22fa996 BACKENDS: Add EVENT_CLIPBOARD_UPDATE event 2019-09-21 22:16:01 +03:00
Cameron Cawley
014bef9eab BACKENDS: Add a default clipboard implementation 2019-09-21 22:16:01 +03:00
Thierry Crozat
bdd7b6baed COMMON: Fix escaping and parsing of UTF-8 strings in JASON parser 2019-09-21 22:15:26 +03:00
D G Turner
04242ce829 LUA: Fix Coverity Warnings in File Class 2019-09-15 16:21:02 +01:00
Cameron Cawley
410923351b Revert "COMMON: Implement FSNode::createDirectoryRecursive()"
This reverts commit aca627bec7.
2019-09-15 00:07:46 +02:00
D G Turner
019de0cc23 EVENTRECORDER: Fix GCC Compiler Warnings
These were memcpy usage to copy a non-trivial structure.
2019-09-14 00:54:10 +01:00
Le Philousophe
5cc574a695 BUILD: Fix GCC bogus warning by removing const
GCC emits "warning: type qualifiers ignored on cast result type" when
some types are used for HashMap because of the const modifier.
This applies especially to pointer-to-member-functions.
The const there is not really useful as it only prevents unfortunate
object editions.
2019-09-09 17:39:06 +03:00
Cameron Cawley
713fe80b47 LUA: Remove references to Sword25 (#1833) 2019-09-06 10:38:14 +03:00
Jaromir Wysoglad
8f930126e7 COMMON: Add string size computation to Encoding. 2019-09-05 23:52:46 +01:00
Eugene Sandulenko
102846becf COMMON: Added PocketPC platform 2019-09-03 17:17:30 +02:00
Eugene Sandulenko
ea2f09b256 COMMON: Restored functionaluty of Lua print 2019-09-03 17:17:21 +02:00
SupSuper
1c1cc91ad5 COMMON: Don't include win32.h in common/encoding.h 2019-09-02 08:01:18 +03:00
Jaromir Wysoglad
d4a98dcadb COMMON: Add CP437 encoding conversion table. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
291360a280 COMMON: Add CP850 conversion.
CP850 is used by the mortevielle engine (and apparently by other
engines too). Anytime an engine using CP850 encoding wants to use
the TTS, the encoding has to be converted, so this is pretty
important encoding conversion to support. Unfortunately SDL
(when compiled without iconv) doesn't support this encoding
(which means, there might not be a way to convert this encoding
on some platforms), so I added a conversion table for this.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
4b5b812712 TTS: Better documentation of TTSVoice. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
54c37f6f46 TTS: Document diferences in resume()
On linux the resume() behaves slightly differently than on
other platforms.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
c2c4458253 JANITORIAL: Remove some trailing whitespaces 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
01d843c527 TTS: Update documentation of INTERRUPT_NO_REPEAT 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
38e769430a TTS: Improve documentation 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
4bae32ffe7 TTS: Add *_NO_REPEAT actions 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
1694b930e6 TTS: Make one say() method non-virtual 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
6703f88f7f TTS: Implement speech queueing on Linux and Win 2019-09-01 22:47:55 +03:00
Thierry Crozat
5baa023ed0 TTS: Improve documentation 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
c7dbf192ef TTS: Remove unneeded code
Remove debuging outputs
Remove commented iconv implementation of text conversion to UTF-8
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
58065ceacd TTS: Refactoring
* Delete multiple empty rows
 * Make getVolume non-virtual and leave just the implementation
    in base class
 * Resolve warning about signed / unsigned comparison in
    gui-manager
 * Clear availableVoices when updating voices on linux
 * By default set language to transMan language on windows
    (if the transMan is available)
 * Remove freeVoices method from Windows ttsMan, it isn't needed
    anymore
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
0631070833 TTS: Fix state switching on windows
Voice is changed when changing language on windows, so when poping
state, the voice, that should get set has to be saved before
changing the language.

The speech shouldn't continue when changing state, so it is stopped
in pushState and popState.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
33549d9c02 TTS: Add getVoiceIndicesByGender to the base class
This is a way to easily get a list of voices with the given gender
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
b5d5576f90 TTS: Add check to getVoice, fix typo.
Check if _availableVoices isn't empty.
Replace availaible with available
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
bb3346fba7 TTS: Update the TTS documentation 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
7c78912931 TTS: Move popState to the base class 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
5c1f562452 TTS: Implement conversion to UTF-8 in say on linux 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
5d9f03e71d TTS: Add reference counting to TTSVoice
Also refactor TTSVoice destruction to use this reference counting.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
62e219ece3 TTS: Implement default behavior of TTS setters 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
dae7d64d38 TTS: Add documentation to common/text-to-speech.h 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
33f8aadfeb TTS: Add age to TTSVoice 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
318c6d7ec6 TTS: Finish implementing the Windows TTS manager 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
8bd7e39265 TTS: Add voice selection to options 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
b5cebcbeae TTS: Add text to speech to the GUI. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
62a011e28a TTS: Add ttsStatus push and pop functions 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
7f895d21df TTS: Add checks for correct TTS engine state. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
8c44b03231 TTS: Resolve segfault when exiting scummvm 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
39e74b027e TTS: Add part of linux TTS 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
f78fc85f3a TTS: Create a TTS skeleton 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
b0c8b368a9 COMMON: Don't include iconv.h in common/encoding.h
Move #include<iconv.h> from common/encoding.h to
common/encoding.cpp and change the methods accordingly.

This resulted in not saving the iconvHandle if using the
"non-static" version of conversion, but it simplified the code
and hopefuly resolved issues with forbidden symbols on some
platforms.
2019-08-25 13:46:16 +03:00
Jaromir Wysoglad
96fef16693 COMMON: Don't include config.h before scummsys.h
Thil should fix the ds build. For some reason
I thought the forbidden.h wouldn't allow me to
include the iconv.h, so I tryed to include it
before the forbidden.h (it seems like I didn't
have to do that.)
2019-08-25 03:14:24 +01:00
Jaromir Wysoglad
fcbf59f5ba COMMON: Convert endianity when needed in Encoding. 2019-08-24 18:12:45 +03:00
Jaromir Wysoglad
0c74a7f27e COMMON: Fix typos 2019-08-24 18:12:45 +03:00
Jaromir Wysoglad
f8ac40af7c COMMON: Encoding refactoring 2019-08-24 18:12:45 +03:00