Commit Graph

794 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 319d759d71
fix TrackData.cpp (#19922) 2023-04-16 09:28:56 +01:00
Spacek531 6488f0397e link brake open to block brake open 2023-04-11 19:28:26 -07:00
ζeh Matt 8f82aa95b3
Move Direction out and rename it to Orientation to avoid name conflict 2023-04-07 22:46:25 +03:00
ζeh Matt 679f5aac2e
Rename members of EntitySpriteData 2023-04-07 19:47:26 +03:00
ζeh Matt dce21bc8ec
Split move sprite specific data into EntitySpriteData 2023-04-07 19:37:47 +03:00
Michael Steenbeek fd80b4c822
Refactor and clean up date handling (#19666)
* Refactor and clean up date handling

* Remove gDate, remove direct access to days_in_month

* Adjust the MultiLaunch test

* Bump network version

---------

Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
2023-04-02 09:25:41 +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 d6be08a410
Apply review suggestions 2023-02-22 15:58:05 +02:00
ζeh Matt ef8d08c5e5
Add assert to test if the ride slot is actually free 2023-02-22 00:01:44 +02:00
ζeh Matt 6a5bfa5cad
Ensure all rides names are cleared on map load 2023-02-21 23:45:11 +02:00
ζeh Matt b1667d3423
Use a dedicated Ride instance for previews 2023-02-21 23:44:03 +02:00
ζeh Matt d60890f7e5
Use ride id to determine if the slot is unused 2023-02-21 23:29:59 +02:00
ζeh Matt 063d97f4f2
Use fixed size storage for Rides, cleanup interface a bit 2023-02-21 23:20:48 +02:00
spacek531 df0edc92d0
Vehicle/rename update flags (#19363)
* rename VEHICLE_UPDATE_FLAG_ON_LIFT_HILL

* rename VEHICLE_UPDATE_FLAG_COLLISION_DISABLED

* rename VEHICLE_UPDATE_FLAG_WAIT_ON_ADJACENT

* rename VEHICLE_UPDATE_FLAG_REVERSING_SHUTTLE

* rename VEHICLE_UPDATE_FLAG_READY_DEPART

* rename VEHICLE_UPDATE_FLAG_TESTING

* rename VEHICLE_UPDATE_FLAG_6

* rename VEHICLE_UPDATE_FLAG_ZERO_VELOCITY

* rename VEHICLE_UPDATE_FLAG_BROKEN_CAR

* rename VEHICLE_UPDATE_FLAG_BROKEN_TRAIN

* rename VEHICLE_UPDATE_FLAG_ON_BRAKE_FOR_DROP

* rename VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES

* rename VEHICLE_UPDATE_FLAG_12

* rename VEHICLE_UPDATE_FLAG_ROTATION_OFF_WILD_MOUSE

* rename VEHICLE_UPDATE_FLAG_SINGLE_CAR_POSITION

* rename VEHICLE_UPDATE_FLAG_CRASHED

* name flag 12 to Reverse Incline Completed Lap

* name flag 6 to Currently Colliding

* fix formatting

* rename has/clear/set update flag

* fix formatting again

* move to namespace constexpr

* fix formatting

* the one that got away
2023-02-12 22:32:16 +00:00
spacek531 1dfbb5f124
Widen Vehicle::update_flags to 32 bits (#19340)
* Expand update_flags to uint32

* move IsCrashedVehicle to update_flags

* rename update_flags to Flags

* Update replays

---------

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-02-10 21:46:06 +00:00
ζeh Matt a2a06d6dde
Return const RideObjectEntry*, refactor uses and fix related access 2023-02-05 17:36:37 +02:00
ζeh Matt 76b94a150c
Cleanup UpdateMaxVehicles 2023-02-05 17:07:09 +02:00
ζeh Matt a509efd0ab
Cleanup VehicleCreateCar 2023-02-05 17:01:21 +02:00
ζeh Matt 6b814ddc9b
Cleanup use of GetRideTypeDescriptor 2023-02-05 16:40:58 +02:00
ζeh Matt 1a83702b2c
De-snake more functions 2023-02-05 16:32:18 +02:00
ζeh Matt 59a0def818
Rename some functions and pass Ride instance instead of ride id 2023-02-05 16:20:51 +02:00
ζeh Matt 2f8e208a9d
Refactor sprite_index to Id 2023-01-27 19:21:57 +02:00
Duncan e09f27df3c
Rename snake_case Class names (Remaining Bits) (#19237)
* Rename snake_case Class names

* Clang format

* Fix build issues
2023-01-21 19:57:17 +00: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
Michael Steenbeek 448c8fafd0
Rename base_height, clearance_height and owner 2023-01-19 20:36:30 +01:00
Duncan 23b6d1840e
Rename classes with snakes OpenRCT2/G*-M* 2023-01-19 15:13:23 +00:00
Hielke Morsink 0762fcb601
Rename snake_case functions in OpenRCT2/util folder 2023-01-18 22:44:13 +01:00
Hielke Morsink 917c091e6b
Rename snake_case functions in OpenRCT2/marketing folder 2023-01-17 23:13:39 +00:00
Michael Steenbeek 12874f2af7
Replace format_string(4) with OpenRCT2::FormatStringLegacy() (#19190)
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 21:56:30 +01:00
Michael Steenbeek d6f58c2f1f
Merge pull request #19194 from Gymnasiast/refactor/sub-loc
Rename sub_ and loc_ functions
2023-01-17 21:29:04 +01:00
Michael Steenbeek bb55c6ce66
Remove loadsasnakes (#19192)
* Rename snake_case methods in scenario folder

* Rename snake_case methods in title folder

* Rename snake_case methods in object folder

* Rename snake_case methods in platform folder

* Rename snake_case methods in windows folder

* Rename tile_inspector.h to TileInspectorGlobals.h

* Rename snake_case methods in ui/windows folder
2023-01-17 19:46:55 +00:00
Gymnasiast 3cc2d94b1b
Rename sub_ and loc_ functions 2023-01-17 19:05:14 +01:00
Stephan Spengler 31ea968480
Change openrct2/ride methods to UpperCamelCase, part 2 2023-01-17 17:42:29 +01:00
Hielke Morsink 6b7dc8fcdb
Rename snake_case functions in openrct2/src folder
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 13:24:51 +01:00
Michael Steenbeek bf5f7e8e71
Rename format_string(2) and is_user_string_id() (#19178)
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 08:59:07 +00:00
Stephan Spengler 76b918e7ed
Change openrct2/ride methods to UpperCamelCase, part 1 2023-01-17 01:32:54 +01:00
Michael Steenbeek b4480b344e
Rename snake_case functions from localisation folder 2023-01-16 23:12:35 +00:00
Gymnasiast 5309c80e29
Remove snake_case in interface folder 2023-01-16 22:20:41 +01:00
Hielke Morsink 6dafbbfb65
Rename global window functions to TitleCase (#19167) 2023-01-16 20:13:42 +00:00
Duncan 8a8d3105f3
Remove snake_case from first chunk of Drawing (#19164)
* Remove snake_case from first chunk of Drawing

* Address formatting
2023-01-16 13:50:43 +00:00
Gymnasiast 1f0d0d1529
Move CarEntrySetImageMaxSizes() to CarEntry.cpp 2023-01-11 18:11:49 +01:00
Gymnasiast d47f5d380f
Pass CarEntry as a ref in a few functions 2023-01-11 17:57:40 +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 09c8e4755f
Rename GetBrakeClosed() to IsBrakeClosed() 2022-12-31 14:06:22 +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