1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00
Commit Graph

49 Commits

Author SHA1 Message Date
Michael Steenbeek
1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Michael Steenbeek
ec3a1e575e Replace Math::Min and Max with std variants 2018-06-20 17:11:35 +02:00
Hielke Morsink
0cf256ac9e Ready copyright notice for clang-format
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.

I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Aaron van Geffen
b836ad050d Rewrite CodePageFromUTF8 as CodePageFromUnicode. 2018-05-22 19:51:34 +02:00
Aaron van Geffen
3fd75906b6 Fix String::ToUtf8 and String::ToUtf16 on Linux.
wchar_t typically uses UTF-32 codepoints on Linux, unlike Windows, which uses UTF-16.
2018-05-22 19:51:34 +02:00
Aaron van Geffen
bab66d1eaf Fix MinGW compilation. 2018-05-22 17:37:07 +02:00
Ted John
71a2cb46d2 Fix ToUpper tests on Windows
LCMapStringEx does not unfold ligatures if there is no uppercase equivalent.
2018-05-22 17:37:07 +02:00
Aaron van Geffen
13e35285f1 Replace non-Windows versions of ToUtf8 and ToUtf16 with ICU calls. 2018-05-22 17:37:07 +02:00
Ted John
6109a9bf17 Improve Windows implementation of ToUpper 2018-05-22 17:37:07 +02:00
Ted John
085d85585a Use Windows API for utf8-utf16 conversions 2018-05-22 17:37:07 +02:00
Aaron van Geffen
8e919d2f84 Change ICU variant of String::ToUpper for string_view argument. 2018-05-22 17:37:07 +02:00
Ted John
386ab1b0fa Add windows implementation for ToUpper 2018-05-22 17:37:07 +02:00
Aaron van Geffen
f29b42cc26 Allow converting strings between code pages in both directions.
Co-authored-by: Fusxfaranto <fusxfaranto@gmail.com>
2018-05-22 17:37:07 +02:00
Aaron van Geffen
ea80f0ea56 Split off GetIcuCodePage to its own function. 2018-05-22 17:37:07 +02:00
Aaron van Geffen
ee8bf9bd4a Use ICU for converting strings to UTF-8 instead of our own tables.
Co-authored-by: Fusxfaranto <fusxfaranto@gmail.com>
2018-05-22 17:37:07 +02:00
Ted John
766997f15c Develop new imaging code 2018-05-13 01:11:56 +01:00
Hielke Morsink
8d10bfb5a1 Add namespace closing comments 2018-05-04 22:54:43 +02:00
Ted John
7da60f4950 Make log functions atomic
Use only one print call to stdout in log functions so that messages are not malformed.
2018-04-26 21:26:30 +02:00
Ted John
947a0625c8 Fix mingw builds 2018-04-18 13:16:20 +02:00
Ted John
deaa60f8f1 Refactor string conversion between RCT2 and UTF8
Use Win32 API for conversion on Windows for non-1252 code pages instead of built-in tables.
2018-04-18 13:16:20 +02:00
Ted John
63e9275b60 Protect against unknown ride types 2018-03-30 16:58:12 +01:00
Michał Janiszewski
3303246b09 Reduce header inclusions 2018-03-20 00:27:58 +01:00
Ted John
142facb8a3 Remove Memory::Duplicate and Memory::DuplicateArray (#7142) 2018-02-07 19:56:46 +00:00
Ted John
0fc0d16e85 Remove unused String::Substring 2018-02-06 18:19:23 +00:00
Ted John
0c71855769 Replace Memory::Copy with std::copy 2018-02-04 12:40:24 +00:00
Ted John
bb8b6a3f68 Replace Memory::Move with std::copy 2018-02-04 12:40:24 +00:00
Michael Steenbeek
755add6c9a Compile localisation folder as C++ 2018-01-06 18:32:25 +01:00
Aaron van Geffen
d768a467b7 Implement std::string variant of TrimStart; add tests.
This also makes String::TrimStart handle all-whitespace strings.
2017-12-25 00:30:21 +01:00
Aaron van Geffen
4bc2ad18c4 Trim ideographic spaces as well. 2017-12-25 00:30:21 +01:00
Aaron van Geffen
6c26009f19 Fix #6097: String::Trim wasn't taking multibyte chars into account.
Extends StringTest with multibyte tests.
NB: ストリング is a katakana transcription of 'string'.
2017-12-25 00:30:21 +01:00
Michael Steenbeek
1a9975d683 Compile util and cheats as C++ 2017-12-14 10:03:21 +01:00
vector-of-bool
57a8bbac23 Respect POSIX path separators on Windows (#6356) 2017-10-08 21:28:38 +02:00
Michał Janiszewski
00fd18809c Move extern "C" {} blocks to headers (#6282) 2017-09-18 17:05:28 +02:00
Ted John
8808444562 Refactor TrackDesignRepository to use FileIndex 2017-08-30 21:01:07 +01:00
Michał Janiszewski
79d76759bb Fix #5516: Update copyrights for 2017
Not all files were necessarily _changed_, but all were touched, see
https://github.com/OpenRCT2/OpenRCT2/pull/4932
2017-06-01 21:55:10 +02:00
Ted John
3fcd42fe2b Move more window code to UiContext 2017-05-29 22:38:43 +02:00
CraigCraig
e0b875398b Tons of spelling fixes (#5413)
[ci skip]
2017-04-30 06:39:24 +02:00
Ted John
0ec43e3611 Improve String::Split and add tests 2017-03-08 19:06:42 +00:00
Ted John
7ccce750a6 Use std::string instead of char * for UriHandler 2017-03-08 19:06:42 +00:00
Ted John
5a850cd155 Add some useful string functions 2017-03-08 19:06:42 +00:00
Ted John
3b341de835 Fix String::Trim and add test 2017-02-24 21:48:06 +00:00
Ted John
8d3bf515ed Fix trim function 2017-02-19 21:33:14 +00:00
Ted John
d5ee210797 Begin writing IniReader 2017-02-18 10:17:26 +00:00
Michał Janiszewski
7cb9d10d72 Fix wrong #define checks for DEBUG macro 2017-02-07 21:01:07 +01:00
Broxzier
60603ae10a Use types from common.h 2017-01-14 12:37:31 +01:00
Ted John
ca9c3cc5ee Fix more warnings, disable others 2017-01-12 13:00:12 +00:00
Ted John
11477c5869 Refactor more of TrackDesignRepository to std::string 2017-01-05 17:51:31 +00:00
Ted John
be035dcdb2 Refactor various methods to use std::string 2017-01-05 13:13:22 +00:00
Ted John
25bc798ff8 Move contents of src into project sub directory 2017-01-04 17:44:12 +00:00