Commit Graph

2390 Commits

Author SHA1 Message Date
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
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
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
ζ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 383412252c
Only modify gLastEntranceStyle for the callee of the game action 2022-01-29 16:42:27 +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
Sam Atkins f4dfde39e7 Refactor NewsOptions as a Window subclass
Closes #13789.
2022-01-28 12:08:57 +00: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 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 6eec7b8d48
Merge pull request #16472 from duncanspumpkin/editor
Refactor Editor Object Selection Flags
2022-01-25 07:43:39 +00:00
Michael Steenbeek 4192fc5cc8
Fix leftover references to SC6 2022-01-24 20:03:20 +01:00
Gymnasiast 9191a8f884
Fix positioning of Steam overlay option 2022-01-24 17:48:05 +01:00
Gymnasiast 98cd39a375
Always use SNN for non-integer scaling 2022-01-24 17:46:22 +01:00
duncanspumpkin eb58e498e4 Rename type to conform to coding style 2022-01-19 17:45:51 +00:00
duncanspumpkin 6f9283a7f6 Refactor to remove double usage of flag 2022-01-19 17:33:54 +00:00
GalBr df5c4dd91c
Fix #15947, #15960: Cannot remove rotated flat rides
Replace _currentTrackPieceDirection with local variable. This change
fixes a problem where when trying to remove a rotated ride,
_currentTrackPieceDirection would be reset back to 0 by calling
ride_initialise_construction_window, causing TrackRemoveAction to not
being able to find and remove the ride.
Using a local variable with the current direction, saved before resetting
the global variable, fixes this issue.
2022-01-16 14:04:00 +01:00
GalBr f2f47aa492
Fix TrackDesignPreviewDrawOutlines using a local struct
TrackDesignPreviewDrawOutlines created and modified a local
TrackDesignState struct, so the calculated information was lost.
Now the function receives a ref to a TrackDesignState struct.
2022-01-15 21:24:59 +01:00
Duncan 7e46427059
refactor ride track groups to use new bitset (#16172) 2022-01-15 07:50:00 +00:00
GalBr b69448d075
Refactor MazeConstruction window to class (#16307) 2022-01-15 07:41:24 +00:00
Hielke Morsink 1d5c0361b5
Consistently shift 8-byte constants by widget indices 2022-01-10 23:26:31 +01:00
Gymnasiast 6bcf848b2f
Use C++ filesystem for more file/path functions 2022-01-08 19:07:48 +01:00
Hielke Morsink b4f264fe4d
Fix #16292: .park files cannot be added to title sequence 2022-01-05 12:44:48 +01:00
Michael Steenbeek 2b0d4e6b3d
Merge pull request #16352 from Gymnasiast/fix/16061
Fix #16061: Incorrect colours in minimap
2022-01-03 14:40:10 +01:00
Michael Steenbeek 819495800c
Fix #15943: Crash accessing unset w->focus (#16364) 2022-01-03 10:11:34 +00:00
Michael Steenbeek d7f5995bfd
Remove unintended execute rights 2022-01-01 19:58:28 +01:00
Michael Steenbeek 65500461e1
Fix #16073: Crash in Sub6E1F34SmallScenery() 2022-01-01 19:56:12 +01:00
Gymnasiast de2b893d99
Fix #16061: Incorrect colours in minimap 2022-01-01 16:52:49 +01:00
Michael Steenbeek 875115ec33
Fix #16343: Crash in Ride::PopulateVehicleTypeDropdown() 2022-01-01 15:07:42 +01:00
Michael Steenbeek 678dd0f69f
Merge pull request #16195 from frutiemax/ForwardDeclareFormatter
Forward declare Formatter
2021-12-30 23:01:42 +01:00
Michael Steenbeek c7f87d3aa9
Merge pull request #16310 from frutiemax/ted_description
Add description field to TrackElementDescriptor
2021-12-30 22:26:08 +01:00
frutiemax adb692b74e Forward declare Formatter 2021-12-30 12:17:51 -05:00
Hielke Morsink 4daae678c3
Remove unused include from Banner.cpp 2021-12-30 17:25:04 +01:00
Hielke Morsink e7d213ded1
Remove unused include from TopToolbar.cpp 2021-12-30 17:21:15 +01:00
Vinícius Hashimoto 4155bf9ce0
Close #13748: Refactor About window to class (#16297) 2021-12-27 18:44:06 -03:00
frutiemax 36f0cce65b Add description field to TrackElementDescriptor 2021-12-25 09:55:03 -05:00
spacek531 52d55f5341 refactor ride track groups to use new bitset
remove erroneous value from dummy rtd

make comment more descriptive

remove comment
2021-12-23 02:17:57 -08:00
Michael Steenbeek f65e12fc78
Close #12243: Merge pull request #16295 from GalBr/use-coords-objects-in-maze-functions
Use Coords objects in maze functions
2021-12-22 19:16:34 +01:00
Gal B 343f9bbca0 Refactor maze_set_track to use const CoordsXYZD& 2021-12-22 18:48:37 +02:00
Duncan ee297e9ed3
Fix #16287: Incorrect sv6 extension using console or system browser 2021-12-22 16:19:02 +01:00
Michael Steenbeek 25cb49f8ce
Pass paint_session as reference 2021-12-19 14:48:00 +00:00
Gymnasiast ef6f2cceee
Create RideConstruction.h 2021-12-18 20:27:13 +01:00
Gymnasiast 449da0d6bd
Convert ride_get_station_object() to method 2021-12-18 18:48:52 +01:00
Duncan d6e13476ef
Merge pull request #16208 from bkolstad1/window-refactor
Close #13768: Refactor window to class: DemolishRidePrompt
2021-12-14 21:25:23 +00:00