Commit Graph
76 Commits
Author SHA1 Message Date
lolbot-iichan ea98335f2d WINTERMUTE: Support CHARSET_TURKISH at StringUtil 2019-07-21 08:51:11 +03:00
Filippos Karapetis 71a9def71e WINTERMUTE: Add a warning for off-by-one errors in normalizeAngle() 2019-07-14 14:28:40 +03:00
kyranet 212cd5aa78 WINTERMUTE: Fixed normalizeAngle's output range from 0-360 to 0-359
WINTERMUTE: Enhanced BaseUtils::normalizeAngle to run the while if angle is greater than 359.

When normalizing an angle, we expect the number to be between 0 and
359 (since 360 is 0), this changes the util so 360 is transformed to 0.
The case for 359.8 (which this would make it -0.2) is covered by the following
while loop, which will increase it back to 359.8.
2019-07-14 13:57:18 +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
Torbjörn Andersson 70a2ca8b7d JANITORIAL: Silence more GCC 7 warnings
All these fall through were marked as deliberate, so again I've only
changed the comment to silence GCC.
2017-08-06 13:30:51 +02:00
Tobia Tesan 72376681af WINTERMUTE: Try to "correctly" handle dir paths
I put scare quotes around "correctly" because I can't swear this is the
intended behaviour of the original interpreter.

I don't think accessing filenames that end with / in the .DCPs is even
defined behaviour, so this is a best guess.
2016-12-26 12:05:41 +01:00
Tobia Tesan 9339490236 WINTERMUTE: only access -1th char of string if length > 0 in getFileName
Fixes #6594
2016-12-26 12:02:56 +01:00
Tobia Tesan b981edd1f7 WINTERMUTE: Turn AnsiString into Common::String in PathUtil
AnsiString is already typedefd to Common::String
2016-03-31 17:06:13 +02:00
Eugene Sandulenko e85cf8d54d WINTERMUTE: C++'ify code 2015-11-07 14:41:45 +01:00
Einar Johan Trøan Sømåen 77e2c637f7 WINTERMUTE: Remove unused Sqr-function. 2014-08-29 19:53:33 +02:00
Johannes Schickel fc5ef58fff WINTERMUTE: Make GPL headers consistent in themselves. 2014-02-18 02:39:40 +01:00
Johannes Schickel a6fff7a805 WINTERMUTE: Switch WideString to U32String. 2013-11-23 21:34:54 +01:00
Filippos Karapetis 4af998b96c WINTERMUTE: Move the isAscii() string changing code to another function 2013-11-08 12:17:48 +02:00
Filippos Karapetis 492cefacb6 WINTERMUTE: Allow utf8ToWide() and wideToUtf8() work with ASCII strings
This is needed for English versions of multilingual games, which use
UTF-8 strings, but we can treat them as plain ASCII, since wide and
UTF-8 strings are not yet supported in Wintermute. This allows at least
the English versions of these games to run.

This allows Reversion 2 and Shaban to start
2013-11-08 12:04:07 +02:00
Einar Johan Trøan Sømåen 2049f53621 WINTERMUTE: Replace CP1252-symbol ... with 3 full stops. 2013-08-20 18:31:45 +02:00
Johannes Schickel 1ce54c217a WINTERMUTE: Fix end of namespace comments. 2013-08-04 00:51:09 +02:00
Einar Johan Trøan Sømåen 980dc4a456 WINTERMUTE: Replace all NULLs with nullptr. 2013-01-26 18:07:07 +01:00
Einar Johan Trøan Sømåen 4095b76939 WINTERMUTE: Silence a warning. 2013-01-22 20:58:23 +01:00
Einar Johan Trøan Sømåen d322592037 WINTERMUTE: Guard ConfMan a bit better. 2013-01-22 19:18:29 +01:00
Einar Johan Trøan Sømåen 228785eda2 WINTERMUTE: Convert ' correctly from CP1252 2012-10-23 03:05:17 +02:00
Willem Jan Palenstijn b4090ead4d WINTERMUTE: Convert CRLF to LF 2012-09-04 22:17:23 +02:00
Einar Johan Trøan Sømåen e067520bb9 WINTERMUTE: Use tabs in enums 2012-08-31 21:03:29 +02:00
Einar Johan Trøan Sømåen 07c27b775c WINTERMUTE: Cleanup the header-guards. 2012-08-31 20:00:32 +02:00
Einar Johan Trøan Sømåen 8a212c3b6c WINTERMUTE: Add namespacing to the UTF-conversion code 2012-08-31 17:29:16 +02:00
Einar Johan Trøan Sømåen fed19cb66a WINTERMUTE: WinterMute -> Wintermute 2012-08-13 03:42:30 +02:00
Einar Johan Trøan Sømåen c422ae9d8a WINTERMUTE: Get rid of strncpy+manual termination. 2012-08-11 02:30:07 +02:00
Einar Johan Trøan Sømåen e32b79bff1 WINTERMUTE: Save the random-seed as well. 2012-08-07 13:32:26 +02:00
Einar Johan Trøan Sømåen 6b07218eb2 WINTERMUTE: Remove statics and silence spam in debug console. 2012-07-29 18:24:08 +02:00
Einar Johan Trøan Sømåen 20e2ec4ff4 WINTERMUTE: Remove unused functions from StringUtil:: 2012-07-29 18:00:15 +02:00
Einar Johan Trøan Sømåen 2e7d21fc52 WINTERMUTE: Replace BaseRegistry with ConfMan 2012-07-29 17:53:44 +02:00
Einar Johan Trøan Sømåen da0ba41903 WINTERMUTE: Remove more unused utils. 2012-07-29 14:56:39 +02:00
Einar Johan Trøan Sømåen e08a0d84a2 WINTERMUTE: Hardcode the Game.SaveDirectory return value in-engine for now. 2012-07-27 19:42:37 +02:00
Einar Johan Trøan Sømåen c7fa8e7d10 WINTERMUTE: Move settings-files to save-dir (gzipped xml now) 2012-07-27 19:35:20 +02:00
Einar Johan Trøan Sømåen 99d4c55e88 WINTERMUTE: Remove all unneccessary #if 0 blocks 2012-07-27 19:07:00 +02:00
Einar Johan Trøan Sømåen fbc19f3f0b WINTERMUTE: Fix a Clang-warning 2012-07-27 18:24:00 +02:00
Einar Johan Trøan Sømåen f6ac34ab9a WINTERMUTE: Get rid of almost all LLVM GCC 4.2 warnings. 2012-07-27 18:13:42 +02:00
Einar Johan Trøan Sømåen 3a49f2bad4 WINTERMUTE: More variable/function renaming VarName->varName 2012-07-26 22:20:55 +02:00
Einar Johan Trøan Sømåen 2c530bc6ed WINTERMUTE: var_name -> varName 2012-07-26 20:49:59 +02:00
Einar Johan Trøan Sømåen ef11f9d0c5 WINTERMUTE: Run Astyle with add-braces to break one-line statements into easier-to-read-code. 2012-07-26 15:59:26 +02:00
Einar Johan Trøan Sømåen 38507fa989 WINTERMUTE: AStyle-formatting. 2012-07-26 04:12:58 +02:00
Einar Johan Trøan Sømåen fa96c9ea18 WINTERMUTE: "delete []" -> "delete[]" 2012-07-25 21:05:03 +02:00
Einar Johan Trøan Sømåen aedb0aea50 WINTERMUTE: Remove dcgf.h from almost all includes. 2012-07-23 03:22:49 +02:00
Einar Johan Trøan Sømåen 7a818009b4 WINTERMUTE: Clean out unused utils. 2012-07-23 02:23:14 +02:00
Einar Johan Trøan Sømåen 803c421553 WINTERMUTE: Fix a few issues in PathUtil, mainly getFileNameWithoutExtension was off by one 2012-07-22 22:30:24 +02:00
Einar Johan Trøan Sømåen b5a07fef8e WINTERMUTE: Get rid of the C-prefix for class-definitions. 2012-07-21 21:01:47 +02:00
Einar Johan Trøan Sømåen 5683f07633 WINTERMUTE: Rename CamelCased filenames to prefixed_under_score-filenames
This is mostly a lead-up to namespacing the Ad/Base folders, and then
possibly removing the prefixes from the files, it also has the added
benefit of getting rid of the odd case-typos that makes for issues
on platforms that don't ignore case.
2012-07-21 19:15:33 +02:00
Einar Johan Trøan Sømåen d31b4883a6 WINTERMUTE: Disable ansiToWide for now, as the current implementation was wrong.
An odd side-effect was that the script-function SetHoverCursor in AdItem would
rename it's filenames from "folder\subfolder\filename.ext" to "folder'subfolder'filename.ext"
2012-07-20 14:24:07 +02:00
Einar Johan Trøan Sømåen 3ad839b32c WINTERMUTE: Rename PlatformSDL->platform_osystem 2012-07-20 00:45:20 +02:00
Einar Johan Trøan Sømåen 113961fd2a WINTERMUTE: Change all folder-names to lowercase. 2012-07-19 19:29:15 +02:00
Einar Johan Trøan Sømåen 49bac1ab4a WINTERMUTE: Use correct case for Rect32.h includes. 2012-07-19 17:06:45 +02:00