Commit Graph

3286 Commits

Author SHA1 Message Date
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
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
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