31 Commits

Author SHA1 Message Date
Bartosz Gentkowski
ec24687ce4 DOXYGEN: Add doxygen groups to header files in the common folder
Adding @defgroup and @ingroup doxygen tags into all headers
in the common folder that contain doxygen blocks.

This improves the structure, readability, and findability
of information in the resulting output.

This commit targets purely structure and does not deal with
the content of the currently existing doxygen documentation.
2020-10-04 18:25:50 +02:00
Thierry Crozat
54f825359f COMMON: Allow using U32String::format with a C string format string 2020-09-08 21:22:04 +01:00
Thierry Crozat
9ab48df4b6 COMMON: Fix comparaison operators for U32String
They were supposed to compare two U32String, but due to a copy/paste
error they were comparing a U32String with a String. It compiled
because there is a String constructor that takes a U32String (and
converts it to UTF-8), but it was probably not quite working as
expected for non-ASCII characters.
2020-09-02 21:01:15 +01:00
Thierry Crozat
9fcc83c09d COMMON: Add comparison operators to U32String
Those operators just compare the numerical value of each character
one by one. This is not idea, but this is better than nothing.
2020-09-02 12:08:49 +02:00
aryanrawlani28
ca54adca47 COMMON: U32: Fix different types of string pointers for u32
- Previous changes broke compilation for AmigaOS.
2020-08-30 18:56:12 +01:00
aryanrawlani28
140eddf90a GUI: U32: Allow vformat to take in a pointer to a translated string
- Fix signed/unsigned comparision in U32String::contains(U32String)
2020-08-30 14:43:41 +02:00
aryanrawlani28
2ca907b4a2 GUI: U32: Use game-list filters with u32
- Add a contains utility function to ustr
- setFilter uses U32String and U32Tokenizers
- Make consequent changes in launcher to allow sending u32strings
2020-08-30 14:43:41 +02:00
aryanrawlani28
12e4f871a3 GUI: U32: Improve u32 in all engine subsystems
- Common: add wordWrap function to ustr.cpp
- Bladerunner: Explicitly state we have a U32String in subs (same as Subtitles::loadOuttakeSubsText)
- Don't use translations for engine specific "put strings", because they might not support.
- SCI: Use const references for showScummVMDialog
- SCUMM:
-- Don't use translation in md5 warning. left comments with the translated version.
-- Remove some redundant headers in help.cpp
-- Don't use translation in handleSaveload when printing to console
-- Also, display success transaction correctly via u32::format
- TESTBED: Use fake constructor when setting label of button
- SKY: Correctly use translation when using SaveStateDescription
- ULTIMA: Don't use translations when display_string
- ENGINES:
-- GenerateUnknownGameReport correctly, with proper translations.
-- There was an error, where a function had been declared twice, in a header file. Correct this.
2020-08-30 14:43:41 +02:00
aryanrawlani28
a9a816e7fe GUI: U32: Improve U32String::format
- Keep adding chars and strings to output instead of deleting and inserting at specific pos
- Use const_iterators for input
2020-08-30 14:43:41 +02:00
aryanrawlani28
c142360bf4 GUI: U32: Add minimal implementation for itoa (base 10) 2020-08-30 14:43:41 +02:00
aryanrawlani28
da380a9002 GUI: U32: Fix issues with ustr formatting
- Fix one off error with 'pos'
- Fix last line not being inserted in osdMessage when display
2020-08-30 14:43:41 +02:00
aryanrawlani28
1ca1712b4d GUI: U32: Fix problems with u32strings formatting
- Improve U32's format helper
- Add insertString helper to u32
2020-08-30 14:43:41 +02:00
aryanrawlani28
f800ca4ada GUI: U32: Convert majority of code to use U32
This commit also includes some additional major changes.

- Return U32String from TransMan getTranslation()
- Change tooltips to be U32Strings
- Remove temporary code of convertToU32String
- U32 Support various dialogs (Browser, FileBrowser, Messages, Chooser, etc)
- U32 for music plugins
- U32 for OSD messages
- Add some helper functions to ustr.cpp
- Change default tooltips from nullptr & 0 -> ""
- Some runtime exceptions may occur when changing languages due to incorrect String::Format
2020-08-30 14:43:41 +02:00
aryanrawlani28
4ea2b46ce8 GUI: U32: Add asuint64 helper to ustr 2020-08-30 14:43:41 +02:00
BLooperZ
ec83715b43 COMMON: add UnicodeBiDiText wrapper 2020-05-12 14:36:09 +02:00
Eugene Sandulenko
a5f2284421 COMMON: Added U32String::insertChar() 2020-05-01 01:30:20 +02:00
Paul Gilbert
b2fd3ccacc ULTIMA8: Implement the toUnicode method 2020-02-19 19:51:08 -08: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
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
dbf56a3b29 COMMON: Add methods to U32String to match String 2019-10-04 15:54:48 +02:00
lolbot-iichan
567a6b20e6 COMMON: Add conversion table for CP1254 2019-07-21 08:51:11 +03:00
lolbot-iichan
747ace78fc COMMON & WINTERMUTE: Use non-1252 for 125X games (PR 1698)
* WINTERMUTE: Add detection for "The Driller Incident"

"The Driller Incident" is a small freeware game for Wintermute,
avaliable in English and Russian: http://questzone.ru/enzi/files/1645

* WINTERMUTE: Add detection table for "One Helluva Day" demo

"One Helluva Day" is a point-and-click adventure demo in English / Czech
/ Russian.
Free download:
https://store.steampowered.com/app/603680/One_helluva_day/

* WINTERMUTE: Support CHARSET property for TT fonts

"// we don't need this anymore" was a mistake =)

Surely, most Wintermute games are either designed for 1252 language
(DE_DEU, EN_ANY, ES_ESP, FR_FRA, IT_ITA, PT_BRA), or don't use TrueType
fonts (5ma, deadcity, grotter1, grotter2, thekite, tib), or use
CHARSET=1 with UTF strings (dirtysplit, reversion1, reversion2, twc),
which meen this conversion is not needed for those games.

However, there are some games that explicitly states CHARSET=10 (driller
(RU_RUS), oknytt (RU_RUS), onehelluvaday (UNK_LANG when playing as
Russian)) and there are some games with CHARSET=1 with non-1252 in mind
(bookofgron (RU_RUS excepts 1251), carolreed4 (RU_RUS excepts 1251),
kulivocko (CZ_CZE excepts 1250)).

This fixes text in some games: bookofgron, carolreed4, driller, kulivocko,
oknytt, onehelluvaday.

* WINTERMUTE: Break savegame compatibility

sizeof(BaseFontTT) was changed, so let's break savegame compatibility

* COMMON: Add conversion tables for win1253 and win1257

* COMMON: Add string conversion from U32String back to Common::String

convertUtf32ToUtf8 code is based on Wintermute::ConvertUTF32toUTF8
convertFromU32String use convertUtf32ToUtf8 for UTF8 or lookup through
conversion table for single-byte encodings

* WINTERMUTE: Use Common::convert functions for non-UTF charsets

* WINTERMUTE: Fix whitespaces at detection tables

* WINTERMUTE: Add TODO comments
2019-06-30 16:45:46 +03:00
Paul Gilbert
7643382ff4 COMMON: Suport String in U32String assignment & equality operators 2019-01-01 00:40:17 -08:00
Andrei Prykhodko
47130eceb3 COMMON: changed code page constant name from ascii to utf8 2018-08-05 22:50:42 +03:00
Andrei Prykhodko
9948b2452f COMMON: named CodePage enum 2018-08-05 21:53:31 +03:00
Andrei Prykhodko
62c250a8be COMMON: added method to convert text from various code pages to Unicode 2018-08-05 20:32:25 +03:00
Eugene Sandulenko
79e158671e COMMON: Add simplistic UTF8->UTF32 converter 2018-06-18 00:08:01 +02:00
Johannes Schickel
854e22b38b COMMON: Make GPL headers consistent in themselves. 2014-02-18 02:39:33 +01:00
Johannes Schickel
4c15e51ab5 COMMON: Document U32String a bit better. 2013-11-23 21:34:54 +01:00
Johannes Schickel
b90400da44 COMMON: Add simple UTF-32 string class U32String. 2013-11-23 21:34:54 +01:00