Commit Graph

47 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
Michael Steenbeek cf9aad7885
Close #19214: Use consistent casing for RC and RCT (#19230) 2023-01-20 08:19:14 +00:00
Stephan Spengler a79d753d76
Change openrct2/ride methods to UpperCamelCase, part 3/3 (#19195) 2023-01-17 20:14:27 +00: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
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 36904cf3d0
Remove Reverse Incline Launched Shuttle mode from Junior RC (#18001)
This mode was not available in vanilla RCT2. We added it for RCT1 parity
before realising it was a better idea to just spin it off into its own
roller coaster (namely the Classic Mini RC). When we did eventually split
it, I overlooked this one.

Obviously, this mode still remains available on the Classic Mini RC.
2022-09-17 13:07:16 +02:00
frutiemax bf432cc943
Add name field to RideTypeDescriptor structure 2022-07-25 00:06:37 +02:00
Duncan 5760f11349
Simplify Track Cost calcs (#16940)
* Multiply out 5 in track cost calcs and use _GBP

* Fix typo on Hypercoaster conversion

* Use two decimals for literals converted by _GBP

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-04-07 11:35:11 +01:00
Michael Steenbeek 18be90f8b6
Split TRACK_SLOPE_STEEP into flags for up and down 2022-03-21 21:05:59 +01: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
Ted John 3c451a4af4
Use music objects instead of IDs 2021-09-01 10:26:23 +02:00
Łukasz Pękalski 3de233c796
Close #12395: Refactor PeepItem to use strong enum (#13311)
* refactor: integrated PEEP_ITEM into SHOP_ITEM

* refactor: converted merged enum to flag

Only former occurrences of PEEP_ITEM

* cleanUp: code cleaned after merging

* refactor: converted ShopItem to strong enum

code reformatting

* refactor: ShopItem enum items renamed

code formatted

* refactor: new getter and setter functions for Item...Flags

* refactor: replaced all occurrences of ItemStandardFlags

with appropriate getter and setter functions.
COMPARE_FIELD macro needs to be commented out or the flag has to stay public.

* refactor: all occurrences of ItemExtraFlags replaced

with proper function calls. COMPARE_FIELD macro issue not resolved.

* refactor: introduced new variable for unified item flags

* refactor: adapted accessor functions

accessor functions were modified to accommodate both standard and extra ShopItem flags

* refactor: ItemExtraFlags accessor functions are replaced

with general functions

* refactor: reverted to original uint32_t flag variables

* refactor: implemented suggested changes

* refactor: integrate additional comments

* refactor: incorporated requested changes

* refactor: incorporated requested changes

added static_cast<PeepThoughtType> in lines 1572 and 1590
2020-12-03 21:15:59 -03:00
Florian Probst 923b5f990d
Close #12438: Refactor RIDE_COMPONENT_TYPE to use strong enum (#13456)
* Part of #12438  Changed RIDE_COMPONENT_TYPE to enum class

(1/3)

Changed the enum RIDE_COMPONENT_TYPE to be enum class in RideData.h.
Shortened the enumerators.
And fixed

I split the changes I did into 3 commits because the enum is used in a total of 85 different files where I just replace the single line where they occur.

The changes in those 85 files are analogous to my change in line 328 in RideData.h in this commit.

* Part of #12438  changed all RIDE_COMPONENT_TYPE enumerators appearances

(2/3)

Changed every appearance of the old RIDE_COMPONENT_TYPE enumerators to the changed enumerators from last commit.

* Part of #12438

(3/3)

Used EnumValue() wherever a field or variable of the type RideComponentType was used as an index.

Havent checked if anything from these 3 commits on this branch got codestyle issues

* Part of #12438

used clang-format

* Closes #12438  Added Accessor function for RideComponentName

Added Accessor function GetRideComponentName to RideData.
to replace the use RideComponentNames[EnumValue(RideComponentType type)]

* Close #12438 moving GetRideComponentName to RideData Headerfile

Moved GetRideComponentName to RideData Headerfile since thats where it should be.
2020-11-26 15:23:47 -03:00
Matt 091145037e
Move the audio code into OpenRCT2 namespace 2020-10-07 00:34:42 +03:00
Tulio Leao 29955f28e0
Merge pull request #12976 from mwnciau/Refactor-TRACK_ELEM-enum
Refactor TRACK_ELEM_* enum
2020-10-01 22:05:44 -03:00
Simon Jarrett 52209af94d Rename TRACK_ELEM_* enums to TrackElemType::*
- Replace enum in Track.h with namespace and constexpr
- Find and replace all instances of TRACK_ELEM_* enums
2020-10-01 19:57:52 +01:00
Michael Steenbeek a850d76d60
Fix: Not all Junior RC pieces shown with "Show all track pieces" on 2020-09-29 19:57:34 +02:00
Łukasz Pękalski 065da23b3b
Close #12437, refactor: RIDE_MODE_* to strong enums (#12833)
* partial refactor: RIDE_MODE_* to strong enums

* Close #12437, refactor: RIDE_MODE_* to strong enums

* chore: code formatting

* refactor: RideMode, change enum names to CamelCase

and resolve casting order.

* chore: refactor due to code formatting

* Close #12437, refactor: RIDE_MODE_* to strong enums

Resolved comments

* chore: Formatting correction.

* Use EnumsToFlags constexpr

* refactor: resolved comments

added newline at the end of file

* refactor: Change case stack to default in Switch

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-09-28 14:09:59 +01:00
Gymnasiast cf664c8340
Close #11971: Replace ride groups with new ride types 2020-07-17 00:19:49 +02:00
frutiemax d969e93ea1
Fix #12112: Move TrackColourPreviews to RideTypeDescriptors (#12114) 2020-07-03 22:15:11 +02:00
frutiemax 57b50e46df
Part of #11964: Move RideTypeEnumNames to RideTypeDescriptors 2020-06-19 23:03:24 +02:00
frutiemax 51f32130b3
Part of #11964: Merge RideColourKey in RideTypeDescriptor (#11996) 2020-06-19 20:21:16 +02:00
frutiemax 57b121d448
Part of 11964: move RideColourPresets to RideTypeDescriptors 2020-06-19 18:04:43 +02:00
Michael Steenbeek ab9b8cd57e
Merge pull request #11983 from frutiemax/11964_RatingsCalculate 2020-06-18 18:22:11 +02:00
frutiemax 642f4f83a8 Merge RideRatingsCalculateFuncTable in RideTypeDescriptor 2020-06-18 09:29:27 -04:00
Michael Steenbeek 8a4724a691
Move covered track piece availability to RTD 2020-06-17 23:15:05 +02:00
frutiemax f6eb9f1cc5
Merge RideRatings in RideTypeDescriptor structure (#11975) 2020-06-17 22:22:52 +02:00
frutiemax de1c172c74
Move RideProperties and rideBonusValue to RideTypeDescriptors
Part of #11964.
2020-06-17 18:59:04 +02:00
Gymnasiast 96678a14eb
Move ride naming to RTD
This also means that all unused ride types will now have the same name. I have made an exception for the 'arbitrary ride type change' dropdown only.
2020-06-16 22:52:48 +02:00
Gymnasiast 9cf12e763d
Move RideHeights and max mass to RTDs 2020-06-16 20:57:55 +02:00
Gymnasiast f66d103d9a
Move build costs to RTD 2020-06-13 18:48:53 +02:00
Michael Steenbeek 8f29810e04
Move RideData4 to RideTypeDescriptors (#11939) 2020-06-13 11:29:00 +01:00
Gymnasiast 100236c2d2
Move available ride modes to RTD; ride mode cleanup 2020-04-26 11:07:19 +02:00
Michael Steenbeek 44f62a97c2
Move PhotoItem to RTD (#11415) 2020-04-24 04:47:40 +02:00
Michael Steenbeek e1e58423fc
Replace RideTypeHasRideGroups with flag (#11375) 2020-04-20 21:50:35 +02:00
Gymnasiast d2b71392cf
Move upkeep costs to RTD 2020-04-19 21:27:22 +02:00
Gymnasiast 7d50a2d186
Move alternate ride type to RTD 2020-04-19 18:44:38 +02:00
Gymnasiast 99d270388b
Move ride start piece to RTD 2020-04-19 18:05:57 +02:00
Michael Steenbeek deb56c2a72
Move LiftData to RTDs (#11347) 2020-04-19 14:41:26 +02:00
Gymnasiast 5d3bf2be20
Move category to RTD; move RideTypeIsIndependent to a flag 2020-04-18 15:22:41 +02:00
Gymnasiast c41fb64535
Move available breakdowns to RTD 2020-04-18 15:22:41 +02:00
Michael Steenbeek b4a763c751
Move naming convention to RTD (#11319) 2020-04-18 12:12:07 +02:00
Gymnasiast 20fd115d8d
Group some common flag combination into constexprs 2020-04-17 17:03:34 +02:00
Gymnasiast edd31d9f16
Move flags to RideTypeDescriptors 2020-04-17 17:03:33 +02:00
Gymnasiast 08ad1816d3
Move track paint function to RTDs 2020-02-22 20:15:00 +01:00
Michael Steenbeek 86a79e742f
Use RideTypeDescriptor for available track pieces 2020-02-22 20:13:44 +01:00