Commit Graph

23 Commits

Author SHA1 Message Date
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
Eugene Sandulenko
2165c26244 COMMON: Hide object destruction from Coverity also in U32String 2020-04-28 09:24:48 +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
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
D G Turner
a7c497af3b COMMON: Add Missing Default Switch Case to U32String Class
These are flagged by GCC if -Wswitch-default is enabled.
2019-10-06 09:51:01 +01:00
Eugene Sandulenko
dbf56a3b29 COMMON: Add methods to U32String to match String 2019-10-04 15:54:48 +02:00
Eugene Sandulenko
72a5d9d4ba JANITORIAL: Whitespace fixes 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
Peter Kohaut
377cf606dd COMMON: Fix U32String initialization issues
Bug 1:
If the original C string contained chars > 127 they would be stored
as huge u32 numbers due to the underflow as char is signed.
It still might end-up with invalid UTF32 characters, but now the caller
can control it.

Bug 2:
The inline storage was not properly initialized when U32String was
initalized from shorter non-UTF32 strings.
2019-07-18 01:00:01 +02: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
jepael
7e18d4c28d COMMON: Fix compiler warning
Cast the string character type to native type for comparison.
2019-04-21 22:19:58 +01: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
ca54a72072 COMMON: made code pages conversion arrays static and constant 2018-08-05 21:57:36 +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
Bastien Bouclet
955e18c648 COMMON: Use nullptr instead of NULL or 0 where appropriate 2018-05-10 08:35:46 +02:00
Adrian Frühwirth
3747d852ee JANITORIAL: Fix whitespace 2018-04-15 16:31:31 +02:00
Johannes Schickel
854e22b38b COMMON: Make GPL headers consistent in themselves. 2014-02-18 02:39:33 +01:00
Johannes Schickel
b90400da44 COMMON: Add simple UTF-32 string class U32String. 2013-11-23 21:34:54 +01:00