Commit Graph

294 Commits

Author SHA1 Message Date
kyphii 6dfc6225e2
"Reversed Trains" Option (#19305)
* Initial commit for backwards-facing trains

* Allow persistence for reversed cars across save/load

* Make log flume turntable compatible with new reversal implementation

* Style fixes + Better implementation of inverted bank angles

* Further Style Fixes

* Code cleanup from PR feedback

* Fix GetBankRotationForDrawing function declaration

* Use update flag for reversed state

* Replace modulo operation with bit mask

* Correct guest pathing destination when entering reversed cars

* More style fixes

* Add plugin support for reversed vehicles

* Fix formatting error

* Derive reversal from ride mode for car spawning

* Formatting

* Rename function to GetPaintBankRotation

* Add reversed trains modes to Multi Dimension Coaster

* Change name of isReversed plugin API parameter for consistency

* Replace reversal operating modes with separate ride setting

* Add ALLOW_REVERSED_TRAINS flag to more ride types

* Make clang-format happy

* More Formatting

* Fix ALLOW_REVERSED_TRAINS flag on a couple rides

* Exclude flat rides from Reverse Trains tickbox when cheats are enabled

* Formatting

* Use Disable Vehicle Limits cheat for checkbox appearance condition

* Use correct swinging sprites when cars are reversed

* Update changelog and Plugin/Network/Park version numbers

* Formatting

* Add separate error String ID for clarity

* Add name to contributors.md

* Fix ride vehicle preview window with reversed trains for RCT1 train types

* Bump version numbers again

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-21 19:22:33 +03:00
Spacek531 6488f0397e link brake open to block brake open 2023-04-11 19:28:26 -07:00
Raed 1bb1767577
Fix #19733: Favorite ride of X guests integer overflow (#19887)
* Fix #19733: Favorite ride of X guests integer overflow

Changed the variable for the number of guests favoring a ride to
match the maximum number of guests able to be in a park.

* Bump network stream and park file versions

* Added changelog entry for #19733 fix

* Reorder changelog entry
2023-04-10 20:03:25 +01:00
Michael Steenbeek dd624f9bff
Replace remaining usages of money16, money32 (#19469)
* Use money64 for ride prices and shop items

* Use money64 for park entrance fee

* Use money64 for gGuestInitialCash

* Use money64 for upkeep costs

* Use money64 for ride value

* Use money64 for marketing campaign cost

* Use money64 for object prices

* Use money64 for land prices

* Use money64 for guest expenditure

* Replace remaining occurrences of money32 with money64

* Update replays

* Bump network version

---------

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-03-02 21:55:42 +00:00
ζeh Matt b1667d3423
Use a dedicated Ride instance for previews 2023-02-21 23:44:03 +02:00
ζeh Matt 063d97f4f2
Use fixed size storage for Rides, cleanup interface a bit 2023-02-21 23:20:48 +02:00
eaeiv 96bfa633fe
Widens TotalRideValue to fix overflow reported in #19292 (#19326)
* Widens TotalRideValue to 64 bits

* Adds name to contributors file

* Adds totalRideValue overflow fix to changelog
2023-02-09 21:51:03 +00:00
ζeh Matt a2a06d6dde
Return const RideObjectEntry*, refactor uses and fix related access 2023-02-05 17:36:37 +02:00
Michael Steenbeek 09b1074d08
Merge pull request #19234 from Gymnasiast/objects-138
Objects v1.3.8 + fix #474: Mini Golf window allows selecting nonexistent players
2023-01-21 15:41:21 +01:00
Duncan 7d08372c80
Remove snake_case from Class names OpenRCT2/Ride*-S* (#19232)
* Remove snake_case from Class names OpenRCT2/Ride*-S*

* Clang format
2023-01-20 20:58:55 +00:00
Gymnasiast eb5fe27495
Fix #474: Mini Golf window allows selecting nonexistent players 2023-01-20 13:24:16 +01:00
Stephan Spengler 31ea968480
Change openrct2/ride methods to UpperCamelCase, part 2 2023-01-17 17:42:29 +01:00
Stephan Spengler 76b918e7ed
Change openrct2/ride methods to UpperCamelCase, part 1 2023-01-17 01:32:54 +01:00
Gymnasiast 8d659a5e2f
Pass rct_ride_entry as reference 2023-01-11 17:35:01 +01:00
Michael Steenbeek 412bf8f8be
Use ride references instead of pointers 2023-01-07 14:02:18 +01:00
Gymnasiast 1f3e74b48a
Remove obsolete ride_get_track_colour()
This was useful before the fields of Ride were rearranged to actually be a TrackColour struct.
2023-01-07 02:51:58 +01: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
spacek531 ecef614c93
Split Ride::Test into Ride::Test and Ride::Simulate 2022-12-20 22:56:52 +01:00
Gymnasiast 3af26d2fe7
Create Ride::ChangeStatusGetStartElement()
Co-authored-by: spacek531 <spacek531@users.noreply.github.com>
2022-12-20 22:45:48 +01:00
Gymnasiast f848fe5bd4
Create Ride::ChangeStatusDoStationChecks()
Co-authored-by: spacek531 <spacek531@users.noreply.github.com>
2022-12-20 22:43:10 +01:00
Gymnasiast 4f48ccc5c8
Create Ride::ChangeStatusCheckCompleteCircuit()
Co-authored-by: spacek531 <spacek531@users.noreply.github.com>
2022-12-20 21:59:28 +01:00
Gymnasiast 3329da538b
Create Ride::ChangeStatusCreateVehicles() to reduce codedup
Co-authored-by: spacek531 <spacek531@users.noreply.github.com>
2022-12-17 18:01:31 +01:00
Gymnasiast 89ed116664
Create Ride::ChangeStatusCheckTrackValidity() to reduce codedup
Co-authored-by: spacek531 <spacek531@users.noreply.github.com>
2022-12-17 17:38:33 +01:00
Gymnasiast a4f7ca4682
Refactor ride_construct() to RideConstructionStart() 2022-12-17 17:16:34 +01:00
Gymnasiast d0ae004b8f
Remove unused symbol ride_reset_all_names() 2022-12-17 17:08:02 +01:00
Gymnasiast 7f34d626f9
Remove leftover symbol ride_remove_vehicles() 2022-12-17 17:07:26 +01:00
Gymnasiast c244791eda
Refactor ride_find_track_gap() to Ride::FindTrackGap() 2022-12-17 17:00:29 +01:00
Duncan 7f085e2752
Update rating skipping unused ride ids (#14425)
* Skip empty ride ids when evaluating ride ratings

This isn't much of a problem atm but when we increase the limit it may start to become an issue

* Increment network version

* Update changelog
2022-11-04 20:17:31 +00:00
Gymnasiast 33f5fed0e2
Make GetFirstNonNullRideType() member function 2022-10-05 20:24:15 +02:00
duncanspumpkin 2c29190ff8 Remove snakes from entrance 2022-10-04 20:07:35 +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
Michael Steenbeek 31e2d7692c
Rename more instances of “vehicle” to “train” 2022-09-22 11:22:18 +02:00
spacek531 74ff5429a9
Add Classic Wooden Roller Coaster
Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
2022-08-26 23:53:03 +02:00
Gymnasiast f8a94c2e12
Move two functions out of _legacy.cpp 2022-08-13 23:00:53 +02:00
Michael Steenbeek d9e23e9dfa
Use ride_type_t instead of uint8_t in more places (#17803)
Part of preparation for making ride types into objects.
2022-08-13 21:49:19 +02:00
frutiemax 807e080d41
Add RideUpdate to RTD (#17752) 2022-08-13 10:36:43 -03:00
Michael Steenbeek 5661da1c68
Unwrap game action compat wrappers 2022-08-11 00:00:58 +02:00
spacek531 468084a401
Move supported track pieces return type to BitSet 2022-08-05 18:55:30 +00:00
Gymnasiast d3fd31c611
Rename rct_string_id to StringId 2022-07-31 22:30:13 +02:00
Michael Steenbeek 0bfc151ab9
Remove remaining usages of gGameCommandErrorText 2022-07-30 18:04:59 +02:00
Hielke Morsink e2da19f0f7
Add missing includes 2022-07-29 18:45:10 +02:00
Michael Steenbeek a75cc10dd5
Refactor Ride::Open, Ride::Test not to use gGameCommandErrorText 2022-07-28 14:23:33 +02:00
Nikolas Parshook 628da77c0e
Refactor ride construction window (#17578) 2022-07-26 15:17:25 +01:00
8street 213696ea27
Add option to sell merchandise in random colours
Co-authored-by: 8street <nikolai_e@rambler.ru>
2022-07-12 22:20:49 +00:00
Hielke Morsink 2936de5c86
Replace hardcoded 255/0xFF with TUNE_ID_NULL 2022-06-28 22:55:25 +02:00
Hielke Morsink 13db5a771b
Annotate hardcoded arrays and verify their sizes
This also reduces the number of lines within // clang-format comments
2022-06-16 23:51:24 +02:00
frutiemax 0791b221e5
Add MusicUpdateFunction field to RTD 2022-06-06 21:00:16 +02:00
X123M3-256 502f06af91
Add "Alpine Coaster" ride type (#16825)
* Implement "Alpine Coaster" ride type


Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2022-05-26 21:28:17 +00:00
X123M3-256 605112297d
Implement RIDE_ENTRY_FLAG_RIDER_CONTROLS_SPEED (#16837) 2022-04-06 08:38:24 -03:00
Hielke Morsink 7db9aeb709
Remove max queue length limit 2022-04-05 19:55:47 +02:00