Commit Graph
151 Commits
Author SHA1 Message Date
duncanspumpkin f835a5b521 Apply clang-tidy to static variables 2022-03-18 00:38:26 -03:00
Silent 771637f24c Refactor filename_valid_characters into Platform::IsFilenameValid 2022-03-16 21:56:54 +01:00
Silent 3773fa4cb0 Refactor uses of path_append_extension 2022-03-10 20:18:17 +01:00
Michael Steenbeek c334c7a176 Merge pull request #16724 from Gymnasiast/refactor/remove-path_get_filename
Remove four old path functions
2022-03-02 22:25:08 +01:00
Hielke Morsink 55c71b0c74 Properly use utf8 strings where expected 2022-03-01 22:12:39 +01:00
Gymnasiast 376c79408a Replace path_set_extension with Path::WithExtension() 2022-02-26 18:26:24 +01:00
Gymnasiast 49b414a40e Replace calls to path_get_filename() 2022-02-26 17:20:07 +01:00
Charles Machalow 59c4beb3dd Fix bug where file extension can get added twice (#16720) 2022-02-26 06:25:06 +00:00
Charles Machalow 6406b18c98 Fix #16715. The first time we save a park, default to the park's name… (#16719)
* Fix #16715. Default to the park's name as the file name

* Mark Combine as nodiscard

The return value must be used for the function to do something
2022-02-26 06:23:30 +00:00
Michael Steenbeek 5edc561715 Close #11437: Migrate old platform methods 2022-02-18 21:57:00 +01:00
Ted John da89a4e413 Remove rct_window::enabled_widgets (#16643)
`enabled_widgets` was used to enable input for widgets. However I do not recall anywhere this being used to specifically disable a widget which doesn't use the dedicated `disabled_widgets` flag. I don't think there is any purpose in keeping this, so I have removed all uses of it.
2022-02-13 23:06:19 +00:00
Silent 09897ede9e Refactor last_*_directory and last_run_version to use u8string
Fixes a regression from #16631 causing a crash when
constructing u8string from a nullptr
2022-02-13 21:34:26 +01:00
Silent 46deac8620 Fix a crash in WindowLoadsaveOpen when last_game_directory is empty
The variable path was left unitialized, which worked fine
in Release builds most of the time, but consistently crashed in Debug.
2022-02-12 00:53:26 +01:00
Michael Steenbeek 63ed6c99a5 Make StrDecompToPrecomp() take C++ strings 2022-02-07 18:56:04 +01:00
Gymnasiast 2f0e6389da Use u8string in FileDialogDesc 2022-01-29 14:09:13 +01:00
Gymnasiast fd6b327adb Use emplace_back() instead of push_back() 2022-01-29 14:07:21 +01:00
Gymnasiast 55591b1b2f Merge old and new FileDialogDesc 2022-01-29 13:55:10 +01:00
Michael Steenbeek f43a4344ce Remove platform_get_user_directory() (#16530) 2022-01-29 09:01:05 -03:00
Michael Steenbeek 2c8c940caa Refactor get_file_extension_type() 2022-01-27 11:14:19 +00:00
Gymnasiast d7dcffbee8 Remove C string overload for Path::GetAbsolute() 2022-01-26 14:54:49 +01:00
Michael Steenbeek 4192fc5cc8 Fix leftover references to SC6 2022-01-24 20:03:20 +01:00
Gymnasiast 6bcf848b2f Use C++ filesystem for more file/path functions 2022-01-08 19:07:48 +01:00
frutiemax adb692b74e Forward declare Formatter 2021-12-30 12:17:51 -05:00
Duncan ee297e9ed3 Fix #16287: Incorrect sv6 extension using console or system browser 2021-12-22 16:19:02 +01:00
Duncan cc22b584fd Introduce RCT2 namespace (#16037)
* Introduce RCT2 namespace

* Drop RCT2:: prefix where possible

* Drop RCT2 from structure names

* Reduce header includes
2021-11-28 16:51:38 +00:00
Duncan bb2c7dbaca Clang tidy Part 1: Ui Project Function Names (#15956)
* Add NOLINT around STL using classes and vendor functions

* Apply clang-tidy to ui project function names

* Undo scripting clang-format

* Upper case OpenRCT2 and RCT2
2021-11-23 13:18:07 +00:00
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
Steve Blythe b15dc66acb Part of #12098: Use ScreenRect in gfx_filter_rect() (#15603) 2021-10-20 19:43:32 -03:00
Hielke Morsink 9dd9b27db4 Make WIDGETS_END constexpr 2021-09-26 11:11:42 +02:00
Duncan d2aca03ff6 Fix #15271. Use formatter to pass description args to text input (#15272)
* Fix #15271. Use formatter to pass description args to text input

Originally passed the variables via global vars which were not updated to 32bit during recent refactors. This removes the global and makes the interface cleaner and corrects the type

* Fix size of arguments
2021-08-24 19:12:05 +01:00
Ted John 5f853df1fd Remove gS6Info 2021-08-02 20:38:02 +02:00
Gymnasiast 676ef7205e Change all calls to DrawTextBasic to use Formatter 2021-08-01 15:14:43 +02:00
Hielke Morsink c887a049d2 Fix various Cppcheck warnings (#15081) 2021-07-24 23:41:50 +02:00
Hielke Morsink e54dc7e466 Use consistent left-shift notation for widgets (#14956) 2021-06-26 14:23:15 +02:00
Silent 94da3cf422 Fix #13445: Make FileScanner::ScanDirectory return a unique_ptr
Also fixes a resource leak in TitleSequence::GetSaves.
2021-05-20 19:22:36 +02:00
Geoff B 6c8493cb69 Close #14253: Replace font size tokens with adjusted DrawText calls 2021-03-27 14:40:17 +01:00
Michael Steenbeek 01ddea5fab Fix #14198: Crash when creating new folder 2021-03-06 20:07:18 +01:00
Gymnasiast 7fd049c22e Remove last remnants of gCurrentFontSpriteBase 2021-02-28 00:26:53 +01:00
Gymnasiast 503273793a Remove gCurrentFontSpriteBase from some functions 2021-02-28 00:26:20 +01:00
Gymnasiast 3e536e2711 Change gfx_draw_string_*_wrapped() to DrawTextWrapped() 2021-02-28 00:23:01 +01:00
Gymnasiast e2ebc9d43b Replace gfx_draw_string_left() with DrawTextBasic() 2021-02-28 00:23:00 +01:00
Ted John 3ed221f128 Add APIs for loading a saved game and adding a park 2021-02-08 22:27:28 +00:00
Mathias GibbensandMathias Gibbens b1e5a11bf3 Several more spelling fixes (#13752)
Signed-off-by: Mathias Gibbens <mathias@calenhad.com>

Co-authored-by: Mathias Gibbens <mathias@calenhad.com>
2021-01-10 18:23:35 +00:00
skdltmxn b0a8ebc808 Refactor to use push_back more efficient (#13726) 2021-01-08 20:59:55 +00:00
Tulio Leao 221aa8cece Close #12453: Refactor RCT2_EDITOR_STEP to strong enum 2020-12-23 20:07:53 -03:00
Tulio Leao 45cc84cfaf Remove unreachable default in list_item_sort 2020-12-23 18:02:39 -03:00
Tulio Leao f7c6e04658 Close #13622: Refactor SORT into strong enum 2020-12-23 18:02:39 -03:00
Łukasz Pękalski 4adf745237 Close #12403: Refactor FILTER_PALETTE_ID to use strong enum (#13273) 2020-12-05 15:13:59 -03:00
Ted John 1e5d998338 Remove more instances of format codes 2020-11-27 18:54:56 +00:00
ffrogman 7ed1804e61 Fix #12410: Refactor WINDOW_WIDGET_TYPES to use strong enum (#13453)
* Fix #12410: Refactor WINDOW_WIDGET_TYPES to use strong enum
2020-11-27 00:14:20 -03:00