Commit Graph

3262 Commits

Author SHA1 Message Date
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
mataniko
38325bfb94 BACKENDS: Don't turn off screen when ScummVM is running a game 2020-05-10 00:35:29 -04: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
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