Commit Graph
3641 Commits
Author SHA1 Message Date
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
Paul Gilbert 7775330954 COMMON: Ignore string erase calls when the passed length is zero 2020-11-02 21:49:05 -08:00
Vladimir Serbinenko 3fc822e55c COMMON: introduce substr for U32String (#2585)
It's safer than direct array manipulation. Replace current uses
of subsetting with substr.
2020-11-01 22:53:03 +01:00
Vladimir Serbinenko 0d7ab6cd64 COMMON: compilation fix on some older compilers 2020-11-01 14:58:46 +01:00
Vladimir Serbinenko 93ee9d0896 COMMON: Fix operator+ declaration in U32String 2020-10-31 23:56:40 +01:00
Thierry Crozat d2251bde1c COMMON: Fix additional compilation errors in U32String 2020-10-31 21:32:36 +00:00
Thierry Crozat 0b93a68a0d COMMON: Attempt to fix compilation for some compilers 2020-10-31 16:56:50 +00:00
Thierry Crozat 23ce3edac9 COMMON: Add contains overload for char32_t in String 2020-10-31 16:56:50 +00:00
Vladimir Serbinenko 29cfa7bb0f COMMON: Merge code for str.cpp and ustr.cpp
Most of the code in str.cpp and ustr.cpp is actually the same. Do some
template magic to merge them.
2020-10-31 14:05:30 +01:00
Martin Gerhardy f36f55c773 COMMON: fixed missing eos reset for successful seek
also added a DisposeAfterUse flag to the ctor of the stream
2020-10-31 08:29:58 +01:00
Martin Gerhardy 1e608a6ea8 COMMON: added MemorySeekableReadWriteStream
A seekable read and writeable memory stream that operates on an already existing memory buffer
2020-10-31 08:29:58 +01:00
Thierry Crozat 186e6142a0 COMMON: Remove unused functions in TranslationManager
There were leftovers from the transition to U32String.
2020-10-30 22:54:09 +00:00
Thierry Crozat bb73c61999 COMMIT: Add missing destruction of elements when downsizing an Array 2020-10-29 20:47:24 +00:00
Vladimir Serbinenko 18626c2e96 COMMON: Add a signed variant of getRandomNumberRng.
Useful for generating negative numbers
2020-10-25 01:02:58 +02:00
Vladimir Serbinenko 18e6878311 COMMON: Add String::asUint64Ext
This is the same as String::asUint64 but supports 0x and 0 prefixes
2020-10-17 22:34:58 +02:00
Henrik "Henke37" Andersson ee4799c51a COMMON: ConfMan::Domain::tryGetVal 2020-10-17 20:16:33 +02:00
Henrik "Henke37" Andersson d83a38e0e6 COMMON: HashMap::tryGetVal function 2020-10-17 20:16:33 +02:00
Paweł Kołodziejski e2cd2e6ed7 COMMON: Rename Common::Debug to Common::StreamDebug 2020-10-16 21:47:16 +02:00
BeWorld cdc0ad802d MORPHOS : Fixes clashing D in ptr.h with system defines and casting glGetString (#2531)
MORPHOS : Fixes clashing D in ptr.h with system defines and casting glGetString
2020-10-16 21:26:42 +02:00
Eugene Sandulenko 390cbc6ba0 COMMON: Fix compilation 2020-10-14 14:18:34 +02:00
Paweł Kołodziejski 723ffa111b BACKENDS: Remove accel3d flag completely. 2020-10-13 23:00:19 +02:00
Paweł Kołodziejski 070d274bf7 BACKENDS: Drop getScreenPixelBuffer() as no longer needed. (#2521) 2020-10-13 22:30:39 +02:00
Paweł Kołodziejski 59ba9cb715 SDL: Do not allow toggle fullscreen for backends which can lose opengl context used for 3d games. (#2514) 2020-10-13 20:27:58 +02:00
Cameron Cawley d1d305d1b9 GRIM/GROOVIE: Move StuffIt archive code to Common (#2509) 2020-10-11 22:01:00 +02:00
SupSuper 12e7fb917b COMMON: Attempt to fix DS build 2020-10-11 09:22:23 +01:00
Eugene Sandulenko b661b7e428 COMMON: Attempt to fix DC build 2020-10-10 10:28:05 +02:00
Eugene Sandulenko 752f97f072 COMMON: Remove default implementation for OSystem::getScreenPixelBuffer()
Otherwise it brings circular dependency, and we anyway have it already
in modular-backend.cpp
2020-10-09 23:31:43 +02:00
Paweł Kołodziejski 35b9cccbde ALL: Merge ResidualVM 2020-10-09 19:44:13 +02:00
Pawel Kolodziejski 1120da8341 ALL: Sync with ScummVM, rev: 1f25347dd5 2020-10-08 23:38:29 +02:00
antoniou 465807f165 JANITORIAL: Better vertical align of methos and members 2020-10-07 15:26:31 +03:00
Eugene Sandulenko 6760fceb72 COMMON:: LUA: Added Chroatian language used in Sword25 2020-10-07 12:25:08 +02:00
Eugene Sandulenko 4a401e36fc COMMON: Extend FSDirectory, so matching functions could also match subdirectories 2020-10-07 01:40:03 +02:00
Vladimir Serbinenko 55559539af common/array: Fix comment
Comment speaks about double-linked list but we actually have an array
2020-10-06 18:16:53 +02:00
Vladimir Serbinenko 1e3b41d71b Add division and multiplication operators to Common::Point
They're convenient for performing computations and I use
them in Hades Challenge engine
2020-10-06 18:16:08 +02:00