1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 06:23:04 +01:00
Commit Graph

76 Commits

Author SHA1 Message Date
ζeh Matt
f6d78375b5 Remove pointless overloads of iequals, implicitly converts to views 2025-04-21 03:41:56 +03:00
ζeh Matt
a22c041379 Enable the use of std::string_view for find in ObjectRepository 2025-04-21 03:05:32 +03:00
Aaron van Geffen
fa06a49302 Update copyright year to 2025 (#23514) 2024-12-31 20:30:04 +01:00
Aaron van Geffen
35e117aca2 Rename String methods to use lowerCamelCase 2024-12-11 22:49:37 +01:00
Aaron van Geffen
5442b20a7a Move StrLogicalCmp, SafeStrCpy, SafeStrCat to String.hpp 2024-12-11 20:42:43 +01:00
Gymnasiast
749b331187 Replace C string in scenario name handling 2024-10-30 18:04:45 +01:00
Aaron van Geffen
80b63a5ae7 Add line breaks after template declarations (#23086)
* Add line breaks after template declarations

* Additional clang-format patches
2024-10-29 16:54:01 +01:00
Aaron van Geffen
cf516db6dc Split StringTypes.h off from String.hpp; adjust header includes 2024-09-10 23:55:53 +02:00
Aaron van Geffen
1b7bbee608 Move CodepointView class to its own header 2024-09-10 23:36:59 +02:00
Tulio Leao
8c56982613 Unify function to get string from hex 2024-08-19 19:52:14 -03:00
Aaron van Geffen
05e56517ab Adopt existing namespaces into OpenRCT2 namespace (#22368)
* Put all of TitleSequenceManager into the same namespace

* Move RideConstructionState into the OpenRCT2 namespace

* Adopt existing namespaces into OpenRCT2 namespace

This adds `using namespace OpenRCT2` to compilation units where appropriate,
as a means to get the codebase to compile until these units have been placed
in a namespace of their own.
2024-07-26 09:59:58 +02:00
Aaron van Geffen
3b42bbb2f3 Include cstdint and cstddef as needed at unit level 2024-07-09 16:49:47 +02:00
Aaron van Geffen
b5ef2693b0 Remove common.h include from all units 2024-07-09 16:45:19 +02:00
James103
1d8dc111f1 Replace 2023 with 2024 in copyright headers (#21139)
Replace all instances of the year 2023 with 2024 in all copyright headers
2024-01-01 12:52:28 +01:00
mrmbernardi
b5f7d4ee2c Fix #20607: Unicode string not limited properly (#20623) 2023-07-18 21:10:35 +01:00
ζeh Matt
687fbef025 Use u8string and u8string_view types 2023-07-06 01:25:27 +03:00
ζeh Matt
b011b8085d Move IEquals to String.cpp and cleanup the implementation 2023-07-06 00:41:59 +03:00
Matthias Moninger
379287ed0f Remove legacy stuff in common.h (#20523)
* Remove old interop macro

* Remove legacy string macro things

* Unbreak the posix/linux/unix builds

* Add String::IEquals and use it for case insensitive compare

* Add missing include for posix

* Replace _strnicmp with String::StartsWith

* Add LoByte and HiByte into Util.h, swap macros

* Fix android build

* Hopefully last of the string things

* Replace STUB directly with the warning
2023-07-02 12:59:20 +03:00
ζeh Matt
1f03bc89d7 Remove unused String::Duplicate 2023-02-19 23:59:15 +02:00
ζeh Matt
a0bc5d9f3f Remove unused functions 2023-02-19 23:59:15 +02:00
James103
73738bbdc8 Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
73
b9e677945d Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
Ted John
142b9ff243 Optimise object selection search
* Do case insensitive string matching for object search.
* Return as soon as first field is a hit.
2022-07-30 16:50:54 +02:00
jazzysoggy
c0853b56ad Fix Format_VA. Rename Format to StdFormat.
author jazzysoggy <39224097+jazzysoggy@users.noreply.github.com> 1655955994 -0400
committer jazzysoggy <39224097+jazzysoggy@users.noreply.github.com> 1656516326 -0400

Fixed Format_VA and renamed Format to StdFormat. Both now output to Std::String, while taking the same input as before. Changed functions that use these two to account for this output difference
2022-07-24 19:30:57 +02:00
Michael Steenbeek
db900b12db Create enum for codepages (#17181) 2022-05-10 12:55:39 +02:00
Gymnasiast
6fcfd481ab Rename String::Convert() to String::ConvertToUtf8() 2022-05-01 18:09:44 +02:00
Michael Steenbeek
9f74c7081b Create definitions for u8string and u8string_view 2022-01-25 16:41:45 +01:00
IntelOrca
34128dc262 Add new .park save format
Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
Co-authored-by: duncanspumpkin <duncanspumpkin@users.noreply.github.com>
Co-authored-by: ZehMatt <Zehmatt@users.noreply.github.com>
Co-authored-by: Broxzier <Broxzier@users.noreply.github.com>
2021-11-21 22:43:22 +01:00
Hielke Morsink
77141f57b0 Merge pull request #15416 from Broxzier/refactor/unnecessary-else
Remove unnecessary else blocks
2021-09-17 14:56:30 +02:00
Hielke Morsink
fc8e0cf9d7 A couple more nullopt returns (#15422) 2021-09-16 23:05:50 +02:00
Hielke Morsink
4b4b3333d6 Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
Hielke Morsink
b2dfeaf1b9 Introduce String::URLEncode 2021-09-05 15:25:44 +02:00
Duncanspumpkin
0957542503 Implement C++ solution to truncate UTF8 strings 2021-03-18 22:14:12 +01:00
Ted John
2b3e7b98b8 Roll our own implementation of parse 2021-02-21 03:14:19 +00:00
Ted John
2b197d0fb2 Fix parsing of shortcuts 2021-02-21 03:14:18 +00:00
skdltmxn
c093a50f3f Refactor to use string_view more properly 2021-01-07 01:52:10 +09:00
Ted John
17edaae02b Improve banner formatting fix 2020-11-29 01:19:51 +00:00
Ted John
699103fe86 Fix banner text formatting, import / export 2020-11-28 16:52:19 +00:00
Ted John
dfcd8a4bbc Apply code review comments 2020-11-27 18:54:57 +00:00
Ted John
92fcdfbd9b Fix GCC compiler errors 2020-11-27 18:54:57 +00:00
Ted John
b6a688e540 Refactor format tokens 2020-11-27 18:54:57 +00:00
Ted John
c6152efa4e Fix scrolling text 2020-11-27 18:54:56 +00:00
Ted John
2f7c1aab14 Start eradicating old format codes 2020-11-27 18:54:56 +00:00
Ted John
14377be487 Create new templated format string 2020-11-27 18:54:55 +00:00
Aaron van Geffen
7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Ted John
a1d9e52046 Rename ToUtf16 to ToWideChar
This is more correct as wchar_t size can differ, for example Linux typically uses 32 bits for wchar_t where as Windows uses 16 bits.
2019-07-22 23:44:03 +01:00
Aaron van Geffen
2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Michael Steenbeek
13c326eb50 Fix part of #7415: Korean scenario descriptions are mangled
OpenRCT2 used to incorrectly write UTF-8 to SV6 names and descriptions. This fixes reading such scenarios. It should also fix the game crashing when attempting to load such a scenario.

What this doesn't do is add support for the encoding that vanilla used for CJK, or add support for creating scenarios with Korean descriptions. That will only be feasible when switching to our own format.
2018-08-13 15:53:44 +02:00
clang-format
3a4a11f738 clang-format core 2018-07-23 16:00:03 +02:00
Michael Steenbeek
1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00