Commit Graph

22972 Commits

Author SHA1 Message Date
Michael Steenbeek a0e2ab3a89
Add vertical bar and braces 2022-02-03 23:55:23 +01:00
Duncan cdd3c28b2e
Use intents to control scenery window (#16562)
* Use intents to control scenery window
2022-02-03 21:10:21 +00:00
Johan Mattsson c00cc90b1f
Fix bounds checks and a nullptr check 2022-02-03 21:42:12 +01:00
ζeh Matt 66c9c99ed2
Merge pull request #16570 from ZehMatt/refactor/constexpr-trackdata
Initialize track data table at compile time
2022-02-03 11:23:07 -08:00
ζeh Matt aed98b5d82
Initialize track data table at compile time 2022-02-02 21:10:32 +02:00
Duncan 5157b57a15
OpenRCT2 Limits (#16088)
* Move over max rides to limits file

* Move max stations to limits file

* Move over max inversions, golf holes, helices, custhistsize

* Move over max trains per ride

* Bring over Max cars per train and max circuits per ride

* Port over NumColourSchemes and max vehicle colours

* Fix compilation

* Move over max awards

* Move over max peep spawns and park entrances

* Fix rebase issues

* Remove future work

* Switch style

* Update copyright
2022-02-01 20:59:48 +00:00
Silent 8064ef288b
Fix money overflow in scenario_entrance_fee_too_high_check and more 2022-01-31 23:06:54 +01:00
ζeh Matt 19dca61ee8
Fix #16535: Entering construction mode unblocks all paths 2022-01-31 23:05:26 +01:00
GalBr 111f6479df
Move currentDirection creation to after element selection
This move is to fix an issue where ride_select_backwards_from_front() or
ride_select_forwards_from_back() can change _currentTrackPieceDirection
and cause currentDirection to be wrong, causing an error when trying to
delete the element.
2022-01-31 23:02:17 +01:00
Ted John f84c2851be
Fix SHGetPathFromIDListLongPath (#16545)
The function did not truncate the string afterwards, so you ended up with a very long string containing null terminators on the end. This wouldn't have caused an issue when passing it as a char *, but due to it now being passed as string or string_view, this causes issues.

It also wouldn't have worked for paths greater than MAX_PATH, because it wasn't passing the buffer size to the function.
2022-01-31 21:35:48 +00:00
Sadret 6d0bb48b68
[#16251] mark 'callback' argument of [query|execute]Action as optional (#16563) 2022-01-31 18:49:02 +00:00
Silent 45debeeb3f
Fix IMalloc* leak in Win32 ShowDirectoryDialog 2022-01-30 12:32:00 +01:00
ζeh Matt 284fff8961
Merge pull request #16544 from ZehMatt/desync/gLastStationStyle
Refactor usage of gLastEntranceStyle
2022-01-29 16:54:08 -08:00
Sam Atkins 99d3d17092
Clean-up OptionsWindow (#16529)
* Rename OptionsWindow tab constants for clarity

The new WIDX_FIRST_TAB constant can be used by code that just wants the
first tab without worrying about which it is.

* Remove use of this-> in OptionsWindow

* Replace widget_invalidate with InvalidateWidget

* WidgetSetCheckboxValue -> SetCheckboxValue

* Move repeated per-tab code into common methods

Previously, each FooPrepareDraw() method would call
CommonPrepareDrawBefore() at the start, and CommonPrepareDrawAfter() at
the end. Let's reduce this duplication by having OnPrepareDraw() call
these instead. :^)

The same goes for a few other repeated code snippets.

* Use WindowFocusOrCreate for OptionsWindow

* Fix #16504: Display RCT1-path tooltip

When the OptionsWindow was first refactored into a Window class, the
AdvancedTooltip() method was created but never called. Hooking it up
fixes the crash and makes the path tooltip appear again. :^)

* Make MAIN_OPTIONS_ENABLED_WIDGETS a constexpr

* Move OptionsWindow constants into the class

* WindowInitScrollWidgets() -> InitScrollWidgets()
2022-01-29 21:52:33 +00:00
ζeh Matt ba487bac70
Update replays 2022-01-29 17:51:59 +02:00
ζeh Matt 41e8146465
Bump up network version 2022-01-29 17:09:05 +02:00
ζeh Matt dea22ad951
Refactor RideCreateAction to pass entrance object explicitly 2022-01-29 17:07:31 +02:00
Michael Steenbeek 8b7f60d10d
Fix: Incorrect “Same price throughout park” for RCT1 import 2022-01-29 15:46:24 +01:00
Michael Steenbeek 4c41d2269a
Fix RCT2 Fruity Ices Stall colour
Error was introduced during the mass rename of objects in the late stages of the NSF.
2022-01-29 15:45:53 +01:00
ζeh Matt 383412252c
Only modify gLastEntranceStyle for the callee of the game action 2022-01-29 16:42:27 +02:00
Michael Steenbeek 657f13fec0
Merge pull request #16531 from Gymnasiast/refactor/file_dialog_desc
Merge old and new FileDialogDesc
2022-01-29 14:32:19 +01:00
ζeh Matt 269673e3aa
Profiler update (#16463)
* Add more functions to be profiled

* Add isEnabled method to Profiler scripting interface

* Bump up scripting version

* Apply review suggestions
2022-01-29 15:29:08 +02: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
OpenRCT2 git bot df77222390 Merge Localisation/master into OpenRCT2/develop 2022-01-29 04:08:33 +00:00
Michael Steenbeek 14374478a7
Use u8string_view in CSG functions (#16532) 2022-01-28 23:57:31 -03:00
Tulio Leao e0da662ff5
Merge pull request #16482 from AtkinsSJ/news-options-window 2022-01-28 23:54:26 -03:00
Michael Steenbeek 723401612f
Merge pull request #16521 from Gymnasiast/refactor/path-u8string
Use u8string in Path/File; replace Path::Append with Path::Combine
2022-01-28 22:39:36 +01:00
Gymnasiast 3ea0e2fea2
Remove no-longer-needed ifdef 2022-01-28 22:14:53 +01:00
Gymnasiast f8c74fe2f8
Use u8string in Path/File; replace Path::Append with Path::Combine 2022-01-28 21:52:44 +01:00
Sam Atkins f4dfde39e7 Refactor NewsOptions as a Window subclass
Closes #13789.
2022-01-28 12:08:57 +00:00
Sam Atkins b2a1c72867 Add Window::InitScrollWidgets()
This is just a wrapper around WindowInitScrollWidgets(), but better
matches the code style.
2022-01-28 12:08:57 +00:00
Michael Steenbeek 149b164ee8
Use u8string for custom paths 2022-01-27 14:21:46 +01:00
Michael Steenbeek 2c8c940caa
Refactor get_file_extension_type() 2022-01-27 11:14:19 +00:00
Michael Steenbeek 3359dc4509
Merge pull request #16518 from Gymnasiast/refactor/absolute-path
Clean up Path::GetAbsolute and platform_get_absolute_path()
2022-01-27 11:38:55 +01:00
Michael Steenbeek 46abcda068
Make File/Path calls more robust 2022-01-27 00:33:17 +01:00
Michael Steenbeek 3752a5ab05
Merge pull request #16490 from Gymnasiast/fix/16363
Close #16363: Allow listing .DAT files in JSON scenery groups
2022-01-26 17:13:35 +01:00
Gymnasiast f7adac3de2
Replace Platform::GetAbsolutePath() with fs:: equivalent 2022-01-26 15:19:15 +01:00
Gymnasiast d7dcffbee8
Remove C string overload for Path::GetAbsolute() 2022-01-26 14:54:49 +01:00
Gymnasiast 0577497c32
Remove platform_get_absolute_path() 2022-01-26 14:47:45 +01:00
OpenRCT2 git bot 79eca16ad4 Merge Localisation/master into OpenRCT2/develop 2022-01-26 04:09:02 +00:00
Hielke Morsink 5dd01f5511
Remove unused includes 2022-01-26 00:09:57 +01:00
Michael Steenbeek 9f74c7081b
Create definitions for u8string and u8string_view 2022-01-25 16:41:45 +01:00
Michael Steenbeek 28b10f6787
Merge pull request #16498 from Gymnasiast/remove/scaling-dropdown
Always use SNN for non-integer scaling
2022-01-25 10:55:17 +01:00
Michael Steenbeek c903d95512
Replace platform_open_directory_browser() with ShowDirectoryDialog() 2022-01-25 10:54:12 +01:00
Duncan 98fa424e7b
Merge pull request #16503 from Gymnasiast/refactor/replace-path-get-extension
Replace path_get_extension() with Path::GetExtension()
2022-01-25 08:35:38 +00:00
Duncan 6eec7b8d48
Merge pull request #16472 from duncanspumpkin/editor
Refactor Editor Object Selection Flags
2022-01-25 07:43:39 +00:00
OpenRCT2 git bot 9a37b31306 Merge Localisation/master into OpenRCT2/develop 2022-01-25 04:08:57 +00:00