Commit graph

3874 commits

Author SHA1 Message Date
Orgad Shaneh
81fd1d529b COMMON: Fix warnings on mingw build
bits/os_defines.h has #define NOMINMAX 1, which conflicts with the
non-value #define NOMINXMAX in scummsys.h.

In file included from ../scummvm/common/lua/lua.h:12,
                 from ../scummvm/common/lua/ltable.cpp:27:
../scummvm/common/scummsys.h:111: warning: "NOMINMAX" redefined
  111 |   #define NOMINMAX
      |
In file included from C:/msys64/mingw64/include/c++/10.2.0/x86_64-w64-
mingw32/bits/c++config.h:518,
                 from C:/msys64/mingw64/include/c++/10.2.0/cmath:41,
                 from C:/msys64/mingw64/include/c++/10.2.0/math.h:36,
                 from ../scummvm/common/lua/ltable.cpp:21:
C:/msys64/mingw64/include/c++/10.2.0/x86_64-w64-mingw32/bits/
os_defines.h:45: note: this is the location of the previous definition
   45 | #define NOMINMAX 1
      |

Amends commit 88f685217b.
2021-03-06 03:06:11 +00:00
Peter Kohaut
e59a470db3 TINSEL: Updated addional drawing routines for v3
Implemented playing of films of objects (not movies).
Fixed rendering of the main menu.
Increased the size of parameters of coroutines.
2021-03-04 20:45:32 +01:00
neuromancer
03d9efa5d0 COMMON: renamed include guard in installshieldv3 2021-03-04 02:06:59 +01:00
neuromancer
817fc1ba0c COMMON: moved include guard to the top 2021-03-04 02:06:59 +01:00
neuromancer
ccd4c9a831 PRIVATE: fixes and renamed installer_archive 2021-03-04 02:06:59 +01:00
neuromancer
78febfbd00 PRIVATE: fixed detection from assets without installing 2021-03-04 02:06:59 +01:00
SupSuper
88f685217b COMMON: Don't use Win32 MIN/MAX since ScummVM provides its own 2021-03-03 11:17:37 +00:00
SupSuper
a399be3844 COMMON: Modern MSVC has inttypes.h 2021-03-03 11:17:28 +00:00
sluicebox
93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
Henrik "Henke37" Andersson
6b2bf785a4 COMMON: Correctly specialize unknownKeyError for int. 2021-02-21 15:33:26 +00:00
Henrik "Henke37" Andersson
f8facede40 COMMON: Specialize unknownKeyError for const char* 2021-02-21 15:33:26 +00:00
Zvika Haramaty
03fb100226 AGI: support new WinAGI *.wag file format 2021-02-15 03:02:23 +02:00
Eugene Sandulenko
f27bf85bf7 COMMON: Fix for modern GCC 2021-02-12 00:55:16 +01:00
Henrik "Henke37" Andersson
0caeac64aa COMMON: Include the not found key in the error message 2021-02-12 00:41:23 +01:00
Henrik "Henke37" Andersson
470505cc56 COMMON: ConfMan needs getValOrDefault 2021-02-12 00:41:23 +01:00
Henrik "Henke37" Andersson
2eb52fe900 COMMON: Retire dangerous non const operator[] on ConfMan 2021-02-12 00:41:23 +01:00
Henrik "Henke37" Andersson
cc51c9a483 COMMON: ConfMan no longer hides unknown key errors 2021-02-12 00:41:23 +01:00
Henrik "Henke37" Andersson
2d6fdcaf3e COMMON: getVal no longer hides missing keys 2021-02-12 00:41:23 +01:00
Le Philousophe
d8ab567a9b COMMON: Add include guard on initializer_list.h 2021-02-08 10:54:20 +01:00
Cameron Cawley
1bfff86090 COMMON: Add replacement for isblank() 2021-02-07 11:51:03 -08:00
Le Philousophe
f8ff774b8d COMMON: Fix clang build
In C++11 standard, nullptr_t is defined in std and not in global space
2021-02-07 11:38:46 +01:00
Le Philousophe
c49f338a0b COMMON: Fix GCC deprecated-copy warning in SharedPtr 2021-02-07 10:53:38 +01:00
Paul Gilbert
1b11fe993c COMMON: Refactor c++11 using keyword from SharedPtr 2021-02-06 21:14:30 -08:00
Paul Gilbert
53656e0338 COMMON: Wrap ptr initializers using nullptr_t in USE_CXX11 2021-02-06 17:11:07 -08:00
Paul Gilbert
8f6391bb5b COMMON: Added WeakPtr class, refactored SharedPtr 2021-02-06 16:37:31 -08:00
Cameron Cawley
28086f4f8a DS: Replace outdated filesystem code 2021-02-04 01:59:14 +01:00
Martin Gerhardy
1d184f845c COMMON: removed trailing whitespaces 2021-01-03 13:06:23 +01:00
Martin Gerhardy
d69e6f2e1e COMMON: removed wild living semicolons 2021-01-03 13:06:23 +01:00
Jonathan Phénix
7d5405cea5 COMMON: Fix build warning with LLVM's scan-build 2020-12-22 01:49:55 +01:00
Vladimir Serbinenko
0d39e96f55 COMMON: Make TranslationManager reusable.
This makes it possible to reuse TranslationManager with different
files.
2020-12-17 09:49:18 +01:00
Cameron Cawley
b5d6716d1d COMMON: Add ReadStream::readString() and use it in the Ultima engine 2020-12-15 17:39:25 -08:00
Thierry Crozat
9e5540f838 BASE: Handle RTL at exit config in scummvm_main
This config was handled in the DefaultEventManager, but this did not
work for engines that quit the game without using a QUIT_EVENT (such
as SCI). So now it is handled one level up directly in scummvm_main.

Note: It is still also handled in the DefaultEventManager so that we
get the correct confirmation dialog there when "confirm_exit" is true.
2020-12-09 22:13:22 +00:00
Le Philousophe
58f728a042 COMMON: Fix UTF-16 decoding
In case of 4-bytes codepoints, length wasn't decreased.
If codepoint is invalid don't eat the second code unit to let
resynchronization happen.
2020-12-01 19:43:20 +01:00
Eugene Sandulenko
4b095ef4b9 COMMON: Added Sega Saturn as a platofrm 2020-11-28 17:41:23 +01:00
Cameron Cawley
01b4432825 BACKENDS: Use Common::U32String for OSystem::setWindowCaption 2020-11-22 17:20:19 +00:00
Bartosz Gentkowski
fe9c51892c DOXYGEN: doxygen review on remaining common headers
- textconsole.h
- timer.h
- translation.h
- ustr.h
- util.h
2020-11-22 16:57:25 +00:00
Cameron Cawley
11724f9df1 GUI: Add a tab for backend-specific options 2020-11-22 16:35:03 +00:00
Vladimir Serbinenko
68a9136e4d
COMMON: Rewrite Encoder and drop dependency on iconv (#2586)
Different platforms have different levels of support of encodings and
often have slight variations. We already have tables for most encoding
with only CJK missing. Full transcoding inclusion allows us to get reliable
encoding results independently of platform. The biggest con is the need for
external tables encoding.dat.

It removes a duplicate table for korean in graphics/korfont.cpp
2020-11-15 16:20:35 +01:00
Bartosz Gentkowski
487b6af090 DOXYGEN: Changes to stream.h and system.h
Review and improve doxygen comments in stream.h and system.h.
2020-11-12 21:23:29 +00:00
Thierry Crozat
0575130b35 COMMON: Improve ReadStreamEndian implementation
The commit does not change the behaviour of the class but makes
its implementation more logical, and in line with how it was
originaly implemented (before being refactored in commit 1011508).
Both FROM_BE_* and TO_BE_* do the same thingi for example, but you
use this stream class to read from a BE or LE stream and convert
the values to native endianness, and thus it makes more sense to
use FROM_BE_* and FROM_LE_* instead of TO_BE_* and TO_LE_* (which
suggested that we read values in native endianness and then
convert to the specified endianness).
2020-11-12 21:18:44 +00:00
Thierry Crozat
a509afdf4d COMMON: Remove resetGraphicsScale from OSystem
This function used to be called from the Engine class, but was
not longer used since commit 432fd522. The single remaining use
was an internal use in the SurfaceSdlGraphicsManager, and I kept
the behaviour there while removing the function.
2020-11-12 21:05:36 +00:00
Bartosz Gentkowski
3ff21ad8c2 DOXYGEN: Further doc updates in high priority files
Adding, editing, updating doxygen comments in header files:

- common/archive.h
- common/array.h
- common/config-manager.h
- common/list.h
- common/random.h
- common/rect.h
- common/savefile.h
2020-11-07 18:19:09 +00:00
Thierry Crozat
efa9a0f250 COMMON: Add conversion operator from UnicodeBiDiText to U32String
This replaces the U32String constructor that takes a UnicodeBiDiText
and serves the same purpose, but avoids making a copy.
2020-11-07 18:10:44 +00:00
Mathias Parnaudeau
4880fab063 COMMON: Use appropriate equals() in BaseString
Remove a useless creation of a BaseString object with a C string in
comparison operators of this class, because there is a function
equals() that accepts a C string in parameter.
2020-11-06 21:21:05 +00:00
Thierry Crozat
e5bfe63087 COMMON: Merge the String and U32String destructors
The call to decRefCount has been moved to the destructor
of the base class BaseString.

Note that BaseString only exists for the purpose of being able
to reuse code for our String and U32String implementations. As
such it is not meant to be used polymorphically and its
destructor does not need to be virtual (with the overhead that
this generates). And to ensure that it is not used in a
polymorphic way, the destructor is declared protected.
2020-11-05 23:52:19 +00:00
Thierry Crozat
f18ee89b27 JANITORIAL: Fix indentation issues 2020-11-05 23:52:19 +00:00
Zvika Haramaty
606eeae46f COMMON: move convertBiDiString out of TranslationManager 2020-11-04 22:27:24 +00:00
Zvika Haramaty
542a3378d3 I18N: Always call BiDi algorithm for U32String
U32String can contain characters from all languages, without relation
to the GUI's language. Therefore, we need to always call it.

Use case:
In Hebrew SQ3, when using the game's original save/restore dialogs, it's
possible to give save games Hebrew names.
What happens when we then use ScummVM's load dialog?
- If ScummVM's GUI language is Hebrew, it's calling BiDI algo, and
  the text direction is OK.
- However, if ScummVM's GUI language is English, before this commit it
  didn't call the BiDI algo, and the text was reversed.
2020-11-04 22:27:24 +00:00
Bartosz Gentkowski
24e3b6096e DOXYGEN: Doxygen improvements part 3
Editing doxygen comments in files:

- debug.h
- dialogs.h
- encoding.h
- endian.h
- error.h
- events.h
- fft.h
- file.h
- frac.h
- fs.h
- gui_options.h
- hash-ptr.h
- hashmap.h
- huffman.h
- ini-file.h

Plus some small changes in the config file.
2020-11-04 19:42:34 +00:00
Vladimir Serbinenko
54b0b4ac4c COMMON: Restore old behaviour for appending char to string
Appending \0 to string and expecting it to be just dropped is
still an invalid behaviour but it already happened in 2 engines, so
restore old behaviour, at least for now
2020-11-03 11:19:20 +01:00